Tuesday, March 17, 2009

Calling (A)Sync BPEL services from OSB with ormi / opmn

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 transport. In this blog I 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
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.
Now we are ready to call a Synchronous BPEL service from OSB. Here is a overview picture how it works for a Synchronous Service
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.

For an Asynchronous BPEL we have to do a little more. See this overview picture.
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.


  1. how do you create service account please specify.

  2. Hi ,

    create in workshop or in the sbconsole a new service account then select static as resource type and off course as static username oc4jadmin and your password.

    use this account in the business service


  3. i tried following your steps to call synchronous bpel from osb but getting following error
    The invocation resulted in an error: The Oracle BPEL delivery service could not be accessed: java.lang.Exception: Failed to create "ejb/collaxa/system/DomainManagerBean" bean; exception reported is: "javax.naming.NameNotFoundException: ejb/collaxa/system/DomainManagerBean not found
    at com.evermind.server.rmi.RMIClientContext.lookup(
    at javax.naming.InitialContext.lookup(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    please suggest.

  4. Hi,

    Does your soa suite server have two oc4j containers and what is your bpel-10g endpoint url.

    your endpoint must connect to the right container

    thanks Edwin

  5. Yes it does have two instances. I changed it to point to local server just for testing.

    My Business Service end point is :


    But still i get following error

    The invocation resulted in an error: Unable to failover; nested exception is:
    javax.naming.CommunicationException: Server protocol was not ORMI, if uncertain about the port your server uses for ORMI then use the default, 23791 [Root exception is Server protocol was not ORMI, if uncertain about the port your server uses for ORMI then use the default, 23791].

    I thought may be my endpoint uri opmn was second preference so i moved it to first then tried still get following error

    javax.naming.CommunicationException: no message

    Please suggest.

  6. Hi,

    what is your bpel version number / patch level

    is your soa suite instance running on the same server as the osb else you have to change localhost

    and I don't think bpel is running in the home container.

    change home with your soa suite container name.

    or lookup the rmi port of the soa suite container

  7. How do i find BPEL version and patch level?

    Is it BPEL console tells

    I found following ports from EM
    RMI 12401 12401-12500 (Port Range)

    yes server is running locally but not on weblogic server it is soa suite

    I can send you files if you can share your email. I tried all option to set serialVersionUID as you said, still getting same issue.

    Mar 24, 2009 1:37:38 PM oracle.j2ee.rmi.RMIMessages EXCEPTION_ORIGINATES_FROM_TH
    WARNING: Exception returned by remote server: {0}
    com.evermind.server.rmi.RMIConnectionException: Disconnected: javax.xml.namespac
    e.QName; local class incompatible: stream classdesc serialVersionUID = 441862298
    1026545151, local class serialVersionUID = -916876369326528164
    at com.evermind.server.rmi.RmiCallQueue.notifyQueuedThreads(RmiCallQueue
    at com.evermind.server.rmi.RMIClientConnection.notifyQueuedThreads(RMICl
    at com.evermind.server.rmi.RMIClientConnection.resetState(RMIClientConne
    at com.evermind.server.rmi.RMIConnection.receiveDisconnect(RMIConnection
    at com.evermind.server.rmi.RMIClientConnection.receiveDisconnect(RMIClie
    at com.evermind.server.rmi.RMIConnection.handleOrmiCommand(RMIConnection
    at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RM
    at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.jav
    at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnec
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$

    Please suggest.

  8. Ok ,

    your version sounds well, but I think you need to have

    did you patch the bpeltransport ear of the osb with the jar of your soa home

    I found following ports from EM
    RMI 12401 12401-12500 (Port Range)
    you have two containers so there are two rmi ports active.

    yes server is running locally but not on weblogic server it is soa suite

    ok that is fine.

    I can send you files if you can share your email. I tried all option to set serialVersionUID as you said, still getting same issue.

    ok can you send your testcase to biemond at gmail dot com.

    and can you send me a pic of your AS overview and the opmn.xml located in opmn/conf/opmn.xml

    thanks Edwin

  9. Quick Question:

    When doing Async BPEL call, in WSDL it imports ws-addressing.xsd and one more xsd. I tried to refer at server location by giving http:// url but it didn't work. So do we really need to download and put physical xsd under the project or i was making some mistake to refer xsd. the way i was referring (tried two ways)

    both didn't work. Any idea how we can do it without importing schema into project?

  10. Hi,

    it should work, you use the bpel console and select the wsdl of the bpel instance, this link address is the right address.

    I don't know if OSB can retrieve the xsd. and maybe the xsd should be relative to the wsdl url.


  11. I'm able to invoking the async process but I'm getting this error from BPEL console

    exception on JaxRpc invoke: exception during SOAP invoke: No fault in soap fault payloadA Transport Exception occurred during an SB Transport message processing.; nested exception is: A Transport Exception occurred during an SB Transport message processing.; nested exception is: A Transport Exception occurred during an SB Transport message processing.

    Would you please mention the steps required to create and store a message in jms queue at OSB level.

  12. Hi,

    just create in the console of the OSB server ( /console ) a connection factory and a queue and target these object to the OSB server.

    create callback proxy server which uses the sb transport and only call the jms business server and use jms text message option.

    Now you can take a look in the console at your queue and go to monitor to see the message.


  13. Hi.

    To make this work you will need to use jdk 1.5 version 16 and soa suite with mlr3 patch or higher

    and need to apply patch 5507491

    thanks Edwin

  14. I share the same views. Liked your blog very much.

  15. Hi Edwin,

    How is the example of endpoint URI if we call BPEL (installed on top of Weblogic92) from OSB using t3 transport.

    Currently I use http transport but I'm not satisfy with the performance.

    Thanks before.


  16. Hi,

    You have to use bpel with the latest mlr patch and you can't use t3 , just use ormi

    this will be the url in osb



    in soa suite 11g you can use t3

    thanks Edwin

  17. I followed your link and copied the jar files from SOA Suite MLR#10 to OSB ,added the set java properties but after that when i restarted my osb server,i am getting following issues

    <Exception on
    No transport provider registered with ID: bpel-10g No transport provider registered
    ith ID: bpel-10g

    and i can no longer see the bpel-10 transport protocol in osb console

    Please suggest on the same.

  18. Hi,

    Ok that is strange and when you put the original back then you got it bpel-10g transport back.

    please compare the new with the old one.


  19. When i copy the original one it still is giving same issues to me.

    I am able to work with other transport protocol but bpel-10g transport is not working for me.

    I have set in setDomainEnv.bat

    set JAVA_PROPERTIES=-Dplatform.home=%WL_HOME% -Dwls.home=%WLS_HOME% -Dweblogic.home=%WLS_HOME% -Dcom.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0

    I believe WLS_HOME is nothing but ALSB_HOME

    Again i copied all the jar files and restarted the server.

    Am i missing something?I am struggling hard to get this fixed.

    I checked in other forum links they suggest the same steps what you have suggested.

    Is it specific to some particular MLR as i am on MLR10

  20. I just missed i am using OSB 10.3.1

  21. Hi,

    did you get the bpel-10g transport option with the original and patched ear.

    and check the server logging there must be an error.


  22. Hello i am getting following error Software caused connection abort: socket write error
    at Method)

    while calling business process .

    Please suggest

  23. Ok,

    socket errors, or you got an Operating System problem or you got the port number wrong of the oc4j container. please check the port number in the EM of the oc4j container.


  24. its a wonder post mate... i really like this...

  25. Hi Edwin,
    I have a simple requirement of calling SOA composite from OSB synchronously. I know this can be done by exposing direct binding in composite and consuming relevant WSDL in OSB Proxy. My question is -
    (1) why should we use direct binding. what if we use composite WSDL directly in OSB like any other web service? can you please provide pro & cons.
    (2) When I see composite instance in EM using direct binding approach I can see BPEL instance in EM. however when I open BPEL instance it shows all other instances as well those got created earlier by direct binding. I have to figure out relevant instance and then open it for flow trace. Not sure why it doesn't show only relevant instance. it looks little clumsy. that's why I asked 1st question above. what are your thoughts on this. can this be avoided ?

    1. Hi,

      it is about performance and transactions. with direct binding you all got this, with ws you got all the xml to java transformation and no transaction support. SOA suite does this internally when it detects it run on the same jvm even when you use http binding.

      it looks like a bug.


  26. Thanks Edwin this helps.