I am a WebService learner and digging through all this stuff isn't easy with all that maybe-outdated-but-still-usable technology floating around. Here's my thing.
My goal is to create a WebService that can be called to perform a time-consuming task. This should be done asynchronously since the client is required to continue working. On my way to achieve this I have stumbled upon JAX-WS 2.0 and it's possibility to create web services via annotation. It also allows asynchronous calls with the @oneway annotation.
Now, I to my understanding (and from several different sources on the web) it seems like I need a server working synchronously which returns a Response<?> (for a polling approach). For a callback approach it seem to be needing an AsyncHandler and sometimes a Future<?>.
Here's how that is supposed to look:
Here's the endpoint code:
I am using
Java 1.6.0_26 and Eclipse Indigo with WTP. I have not actively deployed this code to any server, I am just running this Publisher class above. Everything was working fine until either Response, Future or AsyncHandler are added to the code.
Before that the WSDL was retrievable via
http://localhost:8080/services?wsdl. I was able to run a client based on this code using wsimport from a *.bat like this:
wsimport -d ..\src -keep -p
test http://localhost:8080/services?wsdl
Now it's giving me this exception, which means I don't even get to the point where my Publisher generates the WSDL:
From what I know this tells me JAXB isn't able to work with these interfaces because it can't translate them. But if that's the case, why do I find tutorials with this code at
IBM and
Apache Axis 2?
Thanks for your help.