Thursday, February 24, 2011

SOA Suite-Direct Binding-SOA composite to SOA composite

When we call a web service our input request is converted into XML data and is passed on to the request as web service deals with XML only.This is a normal call to use a soap over http ,however when we use direct binding then this intermediate step of converting our request to XML is by passed rather java client directly invokes the service.In this exercise we will show how we can use direct binding to call a soa composite.
We will check this in two scenario first of all we will create an inbound request using direct binding and then an outbound request very much similar to what has been explained in the Oracle document

Create a new bpel process and deselect the Exposed as webservice option.

This will be a simple bpel process with an assign activity copying input variable to output



So my composite and process will look something like this



Now drag and drop a direct binding from component pallete in to the left swimplane of your composite
And in the WSDL url point it to the wsdl of the BPEL process you have just created.
Set your port type and callback port type as per your process.





Now once you select the wsdl and ports say ok and apply now your process will look like this.




deploy this process to your server and go to em console to check that

You will find that the test button is disabled for this process





This is because this is not exposed as a web service so in order to call this composite we again need an outbound service to call this composite so we will now create another process to call this direct binding
Expose this service as web service as shown below




Now drag and drop a direct binding in right swimlane called as external reference



Now in the resource pallete choose the wsdl for your direct web service



Once you will select that you will find that the address and provider url is automatically filled as shown below




Asy ok and Now connect the BPEL process with the direct reference as shown in the composite.

Now go to you bpel process and use an invoke activity to invoke the direct binding.
Use appropriate assign statement and save the project.

So in all you process and composite should look like this.


Deploy this to your server and test it.



2 comments:

Unknown said...

Have you tried to invoke soa to soa direct binding cross domains?

Mikku said...

Vikas,

I have not tried to invoke soa direct binding across domains. Even within domains from my personal experience i have seen that direct binding creates a lot of issues. If you are going for a cross domain i will suggest to go ahead with SOAP call rather than direct binindg.