03.10
“Develop With Pleasure” my ass.
I was trying to create that Java Web Service to talk to DocuShare, but I’m officially punting. Spent all morning trying to get a stupid HelloWorld web service to work. Fought with IntelliJ 8.1 – at first it wouldn’t compile the generated project. So I created a new one – it compiled. Deleted everything and started over: now it won’t generate the code – something about a library that could not be downloaded. Over an hour later, I figure out how to clear this up and get the code to compile (I completely deleted ~/Library/Caches/IntelliJIDEA8X). Another hour or so spent on why the “apt” tool was not run. Apt is Java’s Annotation Processor Tool, and needs to be run to generate artifacts from annotations placed in the source code. Eventually, I discover that apt has become part of javac in JDK 1.6, so there’s no need to run it separately. I also see a “jaxws” directory in my src directory, and discover that the files I need are actually there. When IntelliJ invoked javac, it seems to have placed the .class files in the source directory. Thanks – that’s great. So I simply copied them over to the output directory and whalla – it runs.
So after all this what do I have? I have a web service that only runs as a single-threaded standalone application, with no idea how to deploy this to Tomcat, and no client to access it. I think to myself: “maybe I can just add REST support and then quickly build a Delphi client to see how it works”. So I attempt to generate WADL from the Java source file, but immediately get an error:
Exception in thread “main” java.lang.NoClassDefFoundError: com/sun/jersey/api/core/ResourceConfig
Screw this. I’m done. I know I can get this going but this is taking way too long. If I not mistaken, once I move my Delphi code to the server and access it via our RemObjects layer, I should be able to turn the DocuShare RemObjects service into a WebService, thereby opening it up to other clients. And should the need arise to support document management systems other than DocuShare, we could create a Delphi interface, modify the DocuShare component to implement that interface, create a new implementation of the interface, and then change the code to create the correct implementation for the current installation.
No Comment.
Add Your Comment