What do you mean with running asynchronous at the server? Are you saying that you have a lot of threads implementing the service And that each thread end has to be reported to the client some way? Josef
-----Ursprüngliche Nachricht----- Von: Adil Allawi [mailto:[email protected]] Gesendet: Freitag, 1. April 2011 18:44 An: [email protected] Betreff: Pointers for building an asynchronous web service Can anyone recommend a tutorials with working samples to show how to build an asynchronous web service using axis2. Something that actually runs and works with Axis 2 1.5.4. There are a lot of articles out there but most are out-dated and/or only have incomplete code snippets. Here is what I am trying to do: I have a web service that takes a long time to complete. What I need to do have this run asynchronously on the server and then return the results to the client in a separate Listener. I am starting with a wsdl file and using wsdl2java to generate the client and server code (options -a -sd -ss). Running async on the client works fine but I cannot get it to run async on the server. I know I have to add: stub._getServiceClient().engageModule("addressing"); stub._getServiceClient().getOptions().setUseSeparateListener(true); to the client. And also to add: <parameter name="messageReceiver.invokeOnSeparateThread">true</parameter> to services.xml. But, I notice that my service skeleton class is still being called synchronously. The problem is that AbstractMessageReceiver.recieve() is not calling it in a thread because the message context replyTo is null. So the service is still being called synchronously. Also the client is not receiving a response - I expect this to be because the client expects the server to respond asynchronously. Thanks Adil --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
