Thursday, March 27, 2014

Asynchronous web service in Jdeveloper 12c

When an asynchronous BPEL process is invoked, one can specify the callback information using WS-Addressing headers. When BPEL has to make a callback to deliver the asynchronous response, it will inspect those headers and use the specified value to send the response. When a BPEL process invokes another asynchronous process, it automatically sets the headers.

Jdeveloper 12c provides a mock web service which can be used to read the response.

It is important to understand how exactly the mock service works to get the response from the asynchronous web service. It does so by creating a mock service based on a WSDL
The WSDL can be located at http://host:port/asyncCallback?wsdl
Here host is the name of your machine and port is dynamically generate by Jdeveloper, It default value is 7199



The definition says

This is a dummy wsdl which has no structural relevance with the provider service to which this is associated with. The main purpose of this wsdl is to have the provider service node appear in the WSIL tree and in the app server navigator not to throw exceptions when clicked it.”

Using this mock WSDL Jdeveloper creates a mock service
http://host:port/asyncCallback
This mock service does not exist really.



To monitor the async service from jdev you can do the following

Go to Tools and select HTTP Analyzer
Following screen will come up



Select “Create New SOAP Request “as shown above
In the new page that will come up, click on open WSDL




Specify the WSDL



Select the include button for Reply to as shown above.
In the drop down box you can find two address coming automatically.
The first service is the mock service provided by Jdeveloper to capture the response from the web service.
http://localhost:7199/asyncCallback
This is a non-existing mock service which Jdeveloper internally creates to fetch the response data from the asynchronous service.




Select the callback URL from the drop down.

Test the service with some dummy data




Go to your HTTP analyzer

and get the post method from the list



Select the POST method to the Async Callback service and double click on it.

scroll down to review the result.




Validate the result by checking the audit details in soa process.


No comments: