views:

469

answers:

3

I need to make asynchronous calls to .NET web services from java since synchronous calls are too slow. I know in .NET this is easily done since the stub (proxy) class created by wsdl.exe also generates methods for asynchronous calls(BeginMethod()/EndMethod()). I created the service stub using eclipse Ganymede but no asynchronous method call were generated. How do you do this in java? Thanks in advance

A: 

Check this out. It should help.

Asynchronous JAX-WS Web Service Client End-to-End Scenario

Mr. Will
I checked that one already but it supposes an async WS already exists..
Igor Zelaya
Ahh, sorry I couldn't help.
Mr. Will
A: 

Can you call the webservice from another thread with and include a callback?

Kane
Do you have any code snippet?
Igor Zelaya
A: 

Since you are using Eclipse, you are probably using Axis2 to generate the Web Services client. Axis2 is capable of generating an asynchronous client. Have a look at the instructions here. You need to select the "Generate async" or "Generate both sync and async" option. This is an article for asynchronous web services with Axis2. It refers mainly to the service (not the client), but the client code isn't much different.

All Java Web Services Framework support asynchronous operations. You just need to configure the generator properly.

kgiannakakis