Asynchronously Calling a JAX-WS Web Service Operation

See Also 

When a client calls a JAX-WS web service operation asynchronously, the client does not need to wait for the response to be received. When a client use this communication style, it consumes the web services either through the "polling" approach or the "callback" approach.

Note: You can use the IDE to generate skeleton asynchronous methods, as explained below.

To call a web service operation asynchronously:

  1. Create a web service client.
  2. If the web service client is deployed from a web application, you can call the web service from a servlet or from a JSP page. If the web service client is deployed from a Java application, use a Java source file instead. So, do one of the following:
  3. In the Projects window, expand the Web Service References node, right-click the web service node (the first node within the Web Service References node), and choose Edit Web Service Attributes.
  4. In the Edit Web Service Attributes editor, within the PortType Operations node, expand the node with the same name as the web service operation you want to invoke.
  5. Select Enable Asynchronous Client. Click OK.
  6. Open the file in the Source Editor and do one of the following:

The IDE adds the code required for asynchronously calling the web service to the file.

See Also
About Web Services

Legal Notices