Caliing BPEL processes from OSB
- Synchronus and
With OSB 10.3 ( BEA Aqualogic Service Bus ) you can call BPEL services with the ormi or opmn protocol ( just like OESB ). With version 10.3, OSB support the bpel 10.1.3.4 transport. In this postI will show you how to call the BPEL services from OSB. Calling OSB services from BPEL is also possible but I’ll explain this in an other blog entry. I got this working with the MLR5 patch for Soa suite 10.1.3.4.
First we have to do some hacking else we can get this error com.evermind.server.rmi.RMIConnectionException: Disconnected: javax.xml.namespace.QName; local class incompatible: stream classdesc serialVersionUID
First we have to add a java parameter to the OSB server. Go to domains\osb_domain\bin folder and edit the setDomainEnv file and add this line to this file. set JAVA_PROPERTIES=-Dplatform.home=%WL_HOME% -Dwls.home=%WLS_HOME% -Dweblogic.home=%WLS_HOME% -Dcom.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0
Step 2 is to replace the bpel jars in the bpel transport ear. Go folder osb_10.3\lib\transports and open bpel10gtransport.ear and replace the following jar files orabpel.jar, orabpel-common.jar , xmlparserv2.jar and oc4jclient.jar with the ones you can find in the soa suite 10.1.3 home.
First we create a proxy service in the OSB where we use the WDSL of the BPEL service.
Create message flow where we call the Business service which uses the BPEL transport.
Create the OSB Business service where we use the input operation of the BPEL wsdl. OSB detects that this is a BPEL wsdl
Select the bpel-10g transport. As endpoint we can choose between opmn or ormi. For ormi we can use this url ormi://localhost:12401/default/BPELProcess_Sync Where 12401 is the rmi port of the OC4J container and BPELProcess_Sync is the name of the BPEL service. Don’t use orabpel in the url. You can also use opmn://localhost:6003/home/default/BPELProcess_Sync where 6003 is the opmn port and home is the name of the OC4J container.
Because this is the wsdl of a Synchronous BPEL proces we have to choose Synchronous client and select a service account ( this contains the oc4jadmin username / password )
That’s all for a Synchronous BPEL service.
Import the wsdl of the Asynchronous BPEL process and use this in a new Proxy Service.
Do the same for a new Business service, this business service is called from the message flow of the just created proxy service.
Select as protocol bpel-10g and use as endpoint opmn://localhost:6003/home/default/BPELProcess_Async.
Now we have to select Asynchronous Client and as callback proxy we have to select a return proxy service and select a service account ( this contains the oc4jadmin username / password )
Now we create a call back proxy service where we select the callback operation of the BPEL service.
Now we have to select SB as protocol
this proxy service calls a business service with the same BPEL wsdl callback operation.
I store the result of the BPEL service in JMS queue
that’s all for the Asynchronous BPEL service. For more information see the OSB bpel transport page.
I found this useful post at edwin’s blog and then decided to save it to my blog for future reference.