File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Asynchronous web service client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Asynchronous web service client" Watch "Asynchronous web service client" New topic

Asynchronous web service client

Subha Murthy

Joined: Aug 16, 2005
Posts: 15
We already coded a java client that makes synchronous calls. What are
the ways and easiest way to make it asynchronous?
Any help is highly appreciated.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
You can enable generation of portable artifacts that allow for asynchronous client invocation by using a binding file.
Example of a binding file that enables asynchronous invocation of the operation "addNumbers" in the portType "Calculator":

When you invoke wsimport, add the -b option and specify the location of the above binding file.
In my example, the endpoint interface will look like this:

Note the two versions of the addNumbersAsync method!
Best wishes!
Subha Murthy

Joined: Aug 16, 2005
Posts: 15
Thanks a lot for your response.

I agree. Here's the link:
subject: Asynchronous web service client
It's not a secret anymore!