a scenario where an application is built using SOA Async processes and needs to
be consumed in a WebService Proxy. In this blog, we will be demonstrating how
to implement this use case. To achieve this, we will follow a two step process:
Jdeveloper with SOA extension installed.
To begin with step 1, create a SOA Application
and name it SOA_AsyncApp.
invokes Create SOA Application wizard. In the wizard, choose composite with
BPEL process in Step 3.
are going to build an async processes, in Create BPEL Process dialog, choose
Asynchronous BPEL Process from Template drop-down. We will be using BPEL 1.1
Specification for our process. Also, make sure the process is exposed as a SOAP
see the two one-way operations listed in the process wsdl as it is an async
drop assign activity from Components onto the SOA Composite.
assign activity to insert a new rule from input variable payload to output
variable payload. Click on the Plus symbol to add the rule.
the Async service setup is complete and the project containing Async process
can be deployed to a SOA server. With this, we are done with Step 1 of our use case.
create a proxy for this service, create a custom Application SOA_AsyncProxy.
Invoke Create Web Service Proxy wizard and in Step 2 of wizard, give WSDL of
the service developed in Part1 of this blog. In Step 3, check ‘Generate As Async ’ checkbox
and give Callback Package name CallBackPackage.
step 5, make sure generate async method radio button is selected and finish the
is generated, run the Callback Service from under the package CallBackPackage. This
service will listen to the response from the asynchronous service. Give target
URL of Callback Service in proxy class and call the process with appropriate
Run the proxy.
Following sequence of actions will take place after proxy is run:
proxy will invoke the SOA process asynchronously and continue with other tasks.
async service will store the request and send receipt confirmation (202) to the
service processes the request and acting as a proxy for Callback Service, sends
the response back to the Callback Service.
service, deployed on the proxy side receives the response and sends a
confirmation to the async SOA service (202).
the callback service receives the response, it has to map the response to the
request. This is achieved using WS-Addressing Headers. The proxy must set two
fields to establish the correlation: 1) ReplyTo address (address of the
Callback Service) and 2) A unique Id to identify the request.
behavior can be verified by logging in to EM console and examining the flow
instance of BPEL Process.
correct payload in the callbackProxy confirms that async operation has been