Overview of the Asynchronous Request-Response Feature

2 Invoking a Web Service Using Asynchronous Request-Response 2-1 2 Invoking a Web Service Using Asynchronous Request-Response The following sections describe how to invoke a Web service using asynchronous request-response: ■ Section 2.1, Overview of the Asynchronous Request-Response Feature ■ Section 2.2, Using Asynchronous Request-Response: Main Steps ■ Section 2.3, Configuring the Host WebLogic Server Instance for the Asynchronous Web Service ■ Section 2.4, Writing the Asynchronous JWS File ■ Section 2.5, Updating the build.xml File When Using Asynchronous Request-Response ■ Section 2.6, Disabling The Internal Asynchronous Service ■ Section 2.7, Using Asynchronous Request Response With a Proxy Server

2.1 Overview of the Asynchronous Request-Response Feature

When you invoke a Web service synchronously, the invoking client application waits for the response to return before it can continue with its work. In cases where the response returns immediately, this method of invoking the Web service might be adequate. However, because request processing can be delayed, it is often useful for the client application to continue its work and handle the response later on, or in other words, use the asynchronous request-response feature of WebLogic Web services. You invoke a Web service asynchronously only from a client running in a WebLogic Web service, never from a stand-alone client application. The invoked Web service does not change in any way, thus you can invoke any deployed Web service both WebLogic and non-WebLogic asynchronously as long as the application server that hosts the Web service supports the WS-Addressing specification at http:www.w3.orgSubmission2004SUBM-ws-addressing-20040810 . When implementing asynchronous request-response in your client, rather than invoking the operation directly, you invoke an asynchronous flavor of the same operation. This asynchronous flavor of the operation is automatically generated by the jwsc Ant task. For example, rather than invoking an operation called getQuote directly, you would invoke getQuoteAsync instead. The asynchronous flavor of the operation always returns void, even if the original operation returns a value. You then include methods in your client that handle the asynchronous response or failures when it returns later on. You put any business logic that processes the return value of the Web service operation invoke or a potential failure in these methods. You use both 2-2 Programming Advanced Features of JAX-RPC Web Services for Oracle WebLogic Server naming conventions and JWS annotations to specify these methods to the JWS compiler. For example, if the asynchronous operation is called getQuoteAsync, then these methods might be called onGetQuoteAsyncResponse and onGetQuoteAsyncFailure .

2.2 Using Asynchronous Request-Response: Main Steps