Generation of webservice clients using asynchronous calls

Hi,

How do I generate a webservice client with JAX-WS that can use asynchronous calls by supplying a response handler? En example of an asynchronous client method call:

//async callback Method
public Future addNumbers(int number1, int number2, AsyncHandler]]>);

Markus

7 comments
Comment actions Permalink

Ok, I guess I'll have to wait or do it "outside" the IntelliJ plugin for now...

0
Comment actions Permalink

Actually, you can save wsdl file locally, insert customization manually (http://java.sun.com/webservices/docs/2.0/jaxws/customizations.html#1.2_Embedded_binding_declarations <jaxws:enableAsyncMapping/>) and invoke generate java from wsdl with given file

0
Comment actions Permalink

When I generate asynchronous methods, it works fine when I run them in junit tests in the IDEA, but when I deploy my webapp I get a java.lang.NoSuchMethodError on the asynchronous method.

Why?

I use Java 1.6.0_04 and Tomcat 6.0.14.

Thanks
Markus

0
Comment actions Permalink

another problem popped up....

0
Comment actions Permalink

Please post exact exception

0
Comment actions Permalink

This is the stack trace:

java.lang.NoSuchMethodError: om.face.gateway.icex.genius.ServiceSoap.getIssuerDataAsync(Ljava/lang/String;Ljava/lang/String;Ljavax/xml/ws/AsyncHandler;)Ljava/util/concurrent/Future;
at om.face.gateway.icex.genius.GeniusProxy.getIssuerDataAsync(GeniusProxy.java:165)
at om.face.gateway.icex.IssuerDataFetcher.getBasicIssuerInfoAsync(IssuerDataFetcher.java:97)
at om.face.gateway.icex.IssuerDataFetcher.fetchData(IssuerDataFetcher.java:79)
at om.face.gateway.icex.IcexSynchronizerProcess.process(IcexSynchronizerProcess.java:100)
at om.util.AbstractProcess.run(AbstractProcess.java:88)
at java.lang.Thread.run(Thread.java:619)

Here is the method I call:

public Future getIssuerDataAsync(AsyncHandler]]> asyncHandler)
{
return this.getServiceSoap().getIssuerDataAsync(this.getMentisUser(), this.getMentisPwd(), asyncHandler);
}

"this" is an instance of a class extending the class Service, generated by IntelliJ.

When I make that call directly with the genrated classes I get the same result:
URL url = new URL("http://xxxxxxxxxxxxxxxxx");
Service service = new Service(url, new QName("http://tempuri.org/", "Service"));
Future f = service.getServiceSoap().getIssuerDataAsync("xxxxxxxxxx", "yyyyyyyyyyy", this.callBackHandler);

When I build the project, the compiler obviously doesn't complain, and I manage to deploy the app in Tomcat 6.0.14 using IntelliJ...

Thanks,
Markus

Edited by: Markus Källander on Apr 10, 2008 11:51 AM

Edited by: Markus Källander on Apr 10, 2008 12:10 PM

0

Please sign in to leave a comment.