Create an Asynchronous JAX-WS Web Service and call it from Oracle BPEL 11g

This posting is the result of a simple requirement to take an existing JAX-WS Web service,
convert it to be asynchronous and call it from Oracle BPEL 11g

It turned out that this is not a trivial task...
BPEL has some very specific expectations about the WSDL for an asynchronous process.

One approach is to develop the service starting from a WSDL document that meets BPEL's requirements.
This is possible but requires considerable WSDL authoring skills.

The other approach is to modify the WSDL generated by Web Service Annotations in Java code
(Bottom up development) and instruct JAX-WS to use that WSDL instead of dynamically generating one from annotations.

This is the approach taken in this article. This posting details how to:

  • Modify a JAX-WS Web Service developed using a "Bottom up " approach to have an asynchronous method and callback.

  • Call the Asynchronous Service from Oracle BPEL 11g.

Read the full posting here.

Comments:

Excellent guide! I spent almost two days trying to get this to work before I found it. One question, though. If JAX-WS is instructed to use the bundled WSDL, what happens with the location (http://localhost:7101/WebServiceExamples-DepartmentDetailsService-context-root/DepartmentFinderService)?

Ideally the location should match the address where the service is deployed and that will vary between environments. Will this work out of the box, or is it necessary to add a replace step to the deployment script that updates the URL?

Posted by guest on August 07, 2012 at 10:58 AM EDT #

Hi,
I am glad you found the post helpful.
In my testing on WLS, the host and port in the location attribute of the service element were set correctly by the container, even when JAX-WS was using the bundled wsdl.

bob

Posted by guest on August 07, 2012 at 02:13 PM EDT #

You can disable WS-Addressing by setting a property in the composite.xml file.

The following Oracle support doc explains the setting involved and appropriate versions.

Oracle Support Document 1171219.1 (Troubleshoot known problems related to WS-Addressing in SOA Suite 11g) can be found at: https://support.oracle.com/epmos/faces/DocumentDisplay?id=1171219.1

In summary, the property oracle.soa.ws.outbound.omitWSA is added to the binding element for the remote service as follows

[snippet]
<binding.ws
......
<property name="oracle.soa.ws.outbound.omitWSA" type="xs:boolean"
many="false" override="may">true</property>
</binding.ws>
[/snippet]

This will disable the default generation of WS-Addressing headers which might confuse the remote service.

You can use correlation sets as an alternative to WS-Addressing.
The following link details an example of setting up an Async Call and callback using correlation sets, see Section 9.1.1.4

http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/bp_correlate.htm#SOASE1849

I have not tested this scenario but I think it should work as expected.

Bob

Posted by Bob Webster on January 25, 2013 at 04:15 PM EST #

Hi Bob,
Seems this "oracle.soa.ws.outbound.omitWSA" property only works for synchronous web service references, not for asynchronous web service references with callbacks like https://gist.github.com/4640098.

Thanks,
Guesd

Posted by guesd on January 25, 2013 at 11:03 PM EST #

ok, that's disappointing. I have not found any other settings that relate to disabling ws-addressing specifically for async calls.
Can you contact me via email at bob.webster@oracle.com and we can discuss possible alternatives.

thanks
bob

Posted by Bob Webster on January 29, 2013 at 09:58 AM EST #

Dear Bob,
yours is one of the few posts I find on this subject; unfortunately I didn't to manage to get it working; could you please make available the whole source so I can inspect better?

Posted by guest on June 04, 2013 at 11:40 AM EDT #

Hi, if you are following the steps you should have all the code.
Be sure to execute step 6 where some code generated using the wsimport utility.

The complete code is also available on GitHub, look for the following text and link near the bottom of the post.

"Both are available in a single zip from GitHub Here"

thanks
Bob

Posted by Bob Webster on June 04, 2013 at 12:20 PM EDT #

Hi Bob,
Very nice and detailed blog, Thanks . I have a similar requirement, I am trying to achieve this using EJB as the model.

I was able to follow all the steps but facing an issue while deploying the app . I am trying to deploy the app to a standalone server. I am getting this error and the deployment fails

Weblogic Server Exception: weblogic.management.DeploymentException: Error encountered during prepare phase of deploying WebService module 'empDetailsAysnchronousService-jar.jar'. wsdl "WEB-INF/wsdl/EmpDetailsService.wsdl" is not found in the deployment weblogic.utils.jars.JarFileDelegate@1f289cc1 - /SOAServer/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/empDetailsAsynchronousService-ear/t9eaun/empDetailsAysnchronousService-jar.jar
Caused by: weblogic.wsee.ws.WsException: wsdl "WEB-INF/wsdl/EmpDetailsService.wsdl" is not found in the deployment weblogic.utils.jars.JarFileDelegate@1f289cc1 - /SOAServer/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_user/empDetailsAsynchronousService-ear/t9eaun/empDetailsAysnchronousService-jar.jar

I have downloaded your app from GitHub , I have created my app and packaged the ear on similar lines. The only difference is that my project has EJB-JAR File instead of JAR File.

Can you please provide some pointers to fix this issue

Posted by Arun on July 01, 2013 at 01:02 PM EDT #

Post a Comment:
Comments are closed for this entry.
About

Picture of Bob

I am an Oracle Architect specializing in Service Oriented Architecture and Business Process Management.


Any code presented is for educational purposes only, no warranty or support is implied.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today