Invoking Web Services Asynchronously 3-5
3.2 Steps to Invoke Web Services Asynchronously
This section describes the steps required to invoke Web services asynchronously. It is assumed that you have set up an Ant-based development environment and that
you have a working build.xml file to which you can add targets for running the jwsc Ant task and deploying the Web services. For more information, see Getting
Started With JAX-WS Web Services for Oracle WebLogic Server.
Table 3–3 Steps to Invoke Web Services Asynchronously
Step Description
1 Configure Web service
persistence to support asynchronous Web
service invocation. Configure Web service persistence on the servers hosting the
Web service and client to retain context information required for processing a message at the Web service or client. For more
information, see Section 3.3, Configuring Your Servers for
Asynchronous Web Service Invocation .
Note
: This step is not required if you are programming the Web service client using the standard JAX-WS RI
implementation and synchronous transport in Step 3, as described in
Section 3.7, Using the JAX-WS Reference Implementation
. 2
Configure Web service buffering to enable the
Web service to process requests asynchronously.
Optional This step is optional. To configure the Web service to process
requests asynchronously, configure buffering on the server hosting the Web service. Buffering enables you to store
messages in a JMS queue for asynchronous processing by the Web service. For more information, see
Section 3.3, Configuring Your Servers for Asynchronous Web Service
Invocation .
3 Build the client artifacts
required for asynchronous
invocation. To generate asynchronous polling and asynchronous callback
handler methods in the service endpoint interface, create an external binding declarations that enables asynchronous
mappings and pass the bindings file as an argument to the clientgen when compiling the client. See
Section 3.4, Building the Client Artifacts for Asynchronous Web Service
Invocation .
4 Implement the Web
service client based on the transport and
programming model required.
Refer to one of the following sections based on the transport and programming model required:
■
Use asynchronous client transport, as described in Section 3.5, Developing Scalable Asynchronous JAX-WS
Clients Asynchronous Client Transport .
Recommended as a best practice.
■
Enable asynchronous access from behind a firewall using MakeConnection. See
Section 3.6, Using Asynchronous Web Service Clients From Behind a Firewall
MakeConnection .
■
Implement standard JAX-WS programming models, such as asynchronous polling or per-request asynchronous
callback handling, using synchronous transport. See Section 3.7, Using the JAX-WS Reference
Implementation .
When using Web services in a cluster, review the guidelines described in
Section 3.10, Clustering Considerations for Asynchronous Web Service Messaging
. 5
Compile the Web service client and package the
client artifacts. For more information, see Compiling and Running the Client
Application in Getting Started With JAX-WS Web Services for Oracle WebLogic Server.
3-6 Programming Advanced Features of JAX-WS Web Services for Oracle WebLogic Server
3.3 Configuring Your Servers for Asynchronous Web Service Invocation