Oracle Service Bus 11g communication with Oracle SOA Suite 11g, DirectBindings and SOA-DIRECT, part2

In this second part of the serie about communication between Oracle Service Bus and Composite Applications from the SOA Suite we will discuss the synchronous communication from the service bus to the composite application.
When developing composite applications, you could expose these services to the outside world to be used by customers. In these cases you could decide to make use of a service bus in front of the services to virtualize them.

Sync call from Oracle Service Bus to SOA Suite Composite

In this blog we will develop the next flow

Oracle SOA Suite Composite Application

In JDeveloper create a new SOA Application with an empty SOA Project in it.
For this blog i created a simple synchronous HelloWorld bpel process which will return the “Hello ” + the inputparameter string.

Direct Binding

To be able to invoke the bpel process we need to expose the service interface of the bpel process.
Drag the Direct Binding Service Adapter to the left swim lane.

For the service interface i will just re-use the wsdl of the bpel process.
In the first part of this serie we used ‘Reference’ type for the Direct Binding. In this case we want to invoke the composite from our Oracle Service Bus project, so we will be using the ‘Service’ Type.

And that’s pretty much it what is needed for the composite. The flow should look something like this

Deploy the application. If we lookup the process in the Enterprise Manager and select it we will see a overview of the next components in it

In the first part of the serie we used the Hello_PS_Direct with the ‘Reference’ usage for the DirectBinding and in this blog we will be using the ‘Service’ usage.

Oracle Service Bus

For the development of the Oracle Service Bus process we need a few components

  • Proxy Service
  • Business Service (invoking the bpel process)

Create a new OSB Configuration Project in Oracle Enterprise Pack for Eclipse.
Creata a new OSB Project.

Communication with the Oracle SOA Suite components will make use of the new SOA-DIRECT transport available in the Oracle Service Bus 11g.

  • The SOA-DIRECT transport provides native connectivity between the Oracle Service Bus and the Oracle SOA Suite service components.
  • The SOA-DIRECT transport supports wsdl type services with soap1.1 and soap1.2 or XML Bindings.
  • The SOA-DIRECT transport supports the following features: (copy/paste)
    • Invocation of any SOA binding component services through Java remote method invocation (RMI)
    • WS-Addressing, including optional auto-generation of ReplyTo properties for asynchronous callbacks
    • Identity propagation
    • Transaction propagation
    • Attachments
    • Optimized RMI transport for invoking SOA services
    • High availability and clustering support
    • Failover and load balancing (not available for services in the Service Callback role
    • Connection and application retries on errors

To be able to invoke the bpel service we will need the service endpoint.
In JDeveloper go to the ‘Application Server Navigator’. Select the soasuite applicationserver > SOA > soa_server1 > default > your composite name > name of your expose service interface. Right mouse click on it and select ‘Copy Path’.

If we look into the wsdl we will see it created two services for us (soap1.1 and soap1.2) with the t3 endpoint in it.

    <wsdl:service name="DServiceHelloWorld">
        <wsdl:port name="DServiceHelloWorldDirectBindingPort11" binding="client:HelloBPELProcessDirectBinding1.1">
            <soap:address location="t3://xesoa11g.iteye.local:8001/default/DirectBindingComposite!1.0/DServiceHelloWorld" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
        </wsdl:port>
        <wsdl:port name="DServiceHelloWorldDirectBindingPort12" binding="client:HelloBPELProcessDirectBinding1.2">
            <soap12:address location="t3://xesoa11g.iteye.local:8001/default/DirectBindingComposite!1.0/DServiceHelloWorld" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"/>
        </wsdl:port>
    </wsdl:service>

In your Oracle Service Bus project (switch ide again), import the wsdl resource from the location we just copied. The import will create a wsdl + xsd from the bpel process for us.

Create a new Busines Service in this project and use the next settings.

We’ll be using a wsdl based business service, and for this interface we will use the wsdl we just imported.

By default the soa-direct transport is selected with the t3 endpoint of our bpel process (direct binding interface).

On the SOA-DIRECT Transport tab we can select some other settings. Since we will be invoking a synchronous bpel process the ‘Synchronous client’ option will do just fine and the rest isn’t needed.

  • JNDI Service Account – Configurat security credentials for the jndi lookup of the target soa service
  • Role – Synchronous Client/Asynchronous Client/Service Callback, depending on the service you invoke
  • Callback Proxy – needed for the Asynchronous Client, specify the proxyservice where to deliver the callback
  • Fault Proxy- needed for the Asynchronous Client, specify the proxyservice where to deliver the fault situations
  • WS-Addressing version, needed for Asynchronous Client, specify the version of WS-Addressing is provided in the request or proxy service pipeline
  • Dispatch Policy – Select the instance of Oracle WebLogic Server Work Manager that you want to use for the dispatch policy for this endpoint

From the business service generate the proxy service. This will be a SOAP over HTTP service based on the same wsdl of the business service.

We should end up with the next list of resources

Publish the Oracle Service Bus project to the server.
Test the proxy service and see if the outcome is correct

Request

Response

Go back to the Enterprise Manager console, and see if a new instance got created.
Instance

audit trail

The steps we need to communicate sync from the Oracle Service Bus with the Composite Application :
Create a composite application with Direct Binding Service Reference. Import the resources in your Oracle Service Bus project. Create a business services based on these ans use the SOA-DIRECT transport to communicate with the composite application.

In the other parts of this serie i will discuss the asynchronous flows between the Oracle Service Bus and the Composite Applications.

Share this Post:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

24 Responses to “Oracle Service Bus 11g communication with Oracle SOA Suite 11g, DirectBindings and SOA-DIRECT, part2”

commenter

Hi,
Looking forwaard to your asynchronous version of this post. I could not make it work, the Call Back Proxy selected in the Request Business Service is passed on to BPEL with hostname as “localhost”
Thanks
Bjorn-Erik

commenter

Any luck on the asynchronous flows between OSB and BPEL? .. I tried and is very difficult to follow the required manual settings of WS-Addressing info for tha call backs.. tried following docs from http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15866/soa.htm#BABIGAHI but its as confusing as hell. do you know how to manipulate the WS-Addressing headers for the SOA Composite to proporly call back the proxy service??

commenter

Hi,
How did u create a Empty SOA Project and made it synchronous?Because in JDev it asks u to create a empty SOA Project or “Composite With BPEL”. In Composite with BPEl we get the option for Sync or Async. How did u associate Direct Binding to Sync. Bpel process

commenter

Create empty composite.
Create sync bpel in it.
Create direct binding and re-use the wsdl of the sync bpel

commenter

Hi,
I tried above process but when i invoke BPEL Service via Business Service created in OSB. I’m getting below exception in OSB.This is a Synchronous call.So please suggest me a way forward.

Correlation definition not registered.
The correlation set definition for operation getLinePlantAvailabilityDetails, process MLPA/MLPACore!9.7*soa_9bdfb5c6-3735-4dc3-a305-3402b24d3008/ManageLinePlantAvailabilityProcess, is not registered with the server.
The correlation set was not defined in the process.
Redeploy the process to the container.

commenter

in you sca composite you created a direct binding for the bpel service you’re trying to invoke from within OSB?
When you check this wsdl….is the service sync or async ? (can you paste the porttype part?)

you’ve imported this wsdl in the osb project and used it for the business service ?

i only received the correlation message you showed in my current testcase when dealing with async invocation.

commenter

Hi,
1.’in you sca composite you created a direct binding for the bpel service you’re trying to invoke from within OSB?’

Ans: yes i created direct binding in my bpel process and i’m tryin to invoke it from my business service in osb.

2.’When you check this wsdl….is the service sync or async ? ‘

Ans: porttype part in wsdl is as below…

3.you’ve imported this wsdl in the osb project and used it for the business service ?
Ans:I used this wsdl in my Business service to BPEL Process

can you confirm if we can use SOA-DIRECT for communication between OSB to BPEL if OSB and BPEL servers are different domains?

commenter

I guess porttype is missed in above ..so pasting here…

commenter

commenter

Below is porttype..i guess my xml tags are considered as html and not displayed so replaced with ‘

‘wsdl:portType name=”ManageLinePlantAvailabilityProcess”‘
‘ wsdl:operation name=”getLinePlantAvailabilityDetails”‘
‘ wsdl:input message=”client:ManageLinePlantAvailabilityProcessRequestMessage”/’
‘ wsdl:output message=”client:ManageLinePlantAvailabilityProcessResponseMessage”/’
‘wsdl:fault name=”FaultDetails” message=”client:ManageLinePlantAvailabilityProcessResponseMessage”/’
‘/wsdl:operation’
‘/wsdl:portType’

commenter

Hi Krishna and Eric,

Have you managed to solve above problem? Can you confirm if we can use SOA-DIRECT for communication between OSB to BPEL if OSB and BPEL servers are different servers and domains?
My problem is ;
Correlation definition not registered.
The correlation set definition for operation execute, process default/Basics!1.0*soa_6b1b99af-1c49-4ed6-908f-ad3fc4668dc9/basicBPEL, is not registered with the server.
The correlation set was not defined in the process.
Redeploy the process to the container.

By the way, I am using Weblogic 10.3.3 and OSB & SOA Suite 11g.

Thanks,
osman

commenter

Hi !

Great article !

I’ve just tried the soa-direct binding to call a BPEL from an OSB proxy.

The proxy inserts a row into a table A, calls the BPEL that inserts a row in an other table B and then does a rollback.
The insertion into B is rollbacked but the row inserted into A (from OSB) is not rollbacked …

What do I need to do to ensure a single transaction and the rollback of the two insertions ?

Thanks !

commenter

I think you need to play a bit with the routing options (qos) on the route to the bpel process
http://www.nl.capgemini.com/oracleblog/2010/10/jms_transactions_in_the_oracle.php

commenter

i want to create a proxy service master which take 4 paramaeters as follow
-master business service
1- username 2-password 3-phonunumber 4- vouchernumber

then i need to map to open session business service
that will take 1-username 2- password from the same previous input

then recharge business service will take 1-phonenumber 2-voucher number from master service, and session object from open session

then call to closesession business service that will take the session output from opensession and will send the output “status” to the masterproxy :)

any one can help me here? its urgent

commenter

In your proxyservice you could create a flow with several service callouts…all the same business service but calling different operations.
The response for every service callout you assing to a seperate variable and use this variable to construct the request-input from the service callout after the current one.

commenter

Hi all ,

I am facing some problem in osb.

<> < BINDING.JCA-11624
DBActivationSpec Polling Exception.
Query name: [FineOne_Source_Polling_AdaptorSelect], Descriptor name: [FineOne_Source_Polling_Adaptor.InterfaceTable]. Polling the database for events failed on this iteration.
Caused by BINDING.JCA-12509
Unable to post inbound message.
Unable to post inbound message to Composite.
The JCA Listener of the JCA Binding Component was unsuccessful in delivering an inbound message from the endpoint due to the following reason: oracle.tip.adapter.sa.api.JCABindingException: [JCATransport:381951]JCA inbound request only invocation failed, exception: java.security.PrivilegedActionException: com.bea.wli.sb.transports.TransportException: Invoke JCA outbound service failed with connection error, exception: com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/FinnoneCAS_OSB_Integration/Resources/Adaptor/FinnoneCASDatabaseServices/MCAS_CAS_Stage_2MCAS_SP_SPInvoker [ MCAS_CAS_Stage_2MCAS_SP_SPInvoker_ptt::MCAS_CAS_Stage_2MCAS_SP_SPInvoker(InputParameters,OutputParameters) ] – WSIF JCA Execute of operation ‘MCAS_CAS_Stage_2MCAS_SP_SPInvoker’ failed due to: Get object error.
Error retrieving the value of a parameter vSSID.
An error occurred when retrieving the value of parameter vSSID after invoking the CHOLA.dbo.CAS_Stage_2MCAS_SP API. Cause: com.microsoft.sqlserver.jdbc.SQLServerException: The value is not set for the parameter number 0.
; nested exception is:
BINDING.JCA-11810
Get object error.
Error retrieving the value of a parameter vSSID.
An error occurred when retrieving the value of parameter vSSID after invoking the CHOLA.dbo.CAS_Stage_2MCAS_SP API. Cause: com.microsoft.sqlserver.jdbc.SQLServerException: The value is not set for the parameter number 0.
Check to ensure that the parameter has been correctly registered as a valid IN/OUT or OUT parameter of the API. This exception is considered retriable, likely due to a communication failure. To classify it as non-retriable instead add property nonRetriableErrorCodes with value “0” to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers.

PLz help me on this..

commenter

The record you try to poll, does it have valid value for vSSID ?

commenter

Hi,
I am following the Invoking a SCA composite synchronously
from an OSB service recipe of your cookbook
still receiving: The invocation resulted in an error: Correlation definition not registered.
The correlation set definition for operation process, process default/CustomerManagement!1.0*soa_3ba14b8b-808b-49ec-9858-c0524d5335eb/CustomerManagentSync, is not registered with the server.
The correlation set was not defined in the process.
Redeploy the process to the container.

Any hints?
TIA!

I am using Oracle Service Bus Version: [Oracle Service Bus 11.1 Sun Dec 18 03:49:34 PST 2011 1447174]

Oracle Weblogic Server Version: [WebLogic Server 10.3.6.0 Tue Nov 15 08:52:36 PST 2011 1441050 ]

commenter

Can you try removing the ws binding of the composite so only the direct binding is left. Verify this both in design view as in the source of the composite if everything of the ws binding is removed.
Redeploy the process and try again.

commenter

I am sorry to tell you that neither that recipe nor the next async version, with or without the ws binding works. Both fail with the exception mentioned above.
Any other ideas?
TIA!

commenter

Can you the steps mentioned in the comments on this articles from edwin his blog : http://biemond.blogspot.nl/2009/11/calling-soa-suite-direct-binding.html

He mentioned the same error and got it working.

commenter

Thank you for your time, after both deletions the recipes work fine!

commenter

An excellent article that explains Direct binding call from OSB to SOA-BPEL, How ever, can you please shed some light on hot to implement direct binding from SOA to SOA?

Leave a Reply:

Name (required):
Mail (will not be published) (required):
Website:
Comment (required):
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>