Dynamic SOAP Endpoint Routing via Oracle ESB

ESB can be used to do dynamic routing of SOAP Endpoints. The endpoints should have similar contract. This means that the Message Exchange Pattern and the Input/Output schemas for the endpoints should be same.

Consider two BPEL processes dummyBPELProcess and AnotherBPELProcess which have the same contract(MEP is 2 way SYNC and input/output XSDs are same) but different Endpoint URIs. We can write an ESB process that can route to any of these processes dynamically based on some lookup (XREFs,DVMs, DB, File, etc).

Follow these steps to do it …

1. Create an ESB process and route it to one of the processes (say dummyBPELProcess).

ESB Design

ESB Design

2. Then open the request XSL file in source mode and put these XPAth functions:
<xsl:variable name=”LocationIn” select=”‘endPoint URI of the BPEL Process to be called'”/>
<xsl:variable name=”LocationOut” select=”ehdr:setOutboundHeader(‘/shdr:ESBHeader/shdr:location’,$LocationIn, ‘shdr=http://xmlns.oracle.com/esb;’)”/>
In this case this becomes:
<xsl:variable name=”LocationIn” select=”‘http://OSSI-1278:8888/orabpel/TestBPELProcesses2/AnotherBPELProcess/1.0′”/&gt;
<xsl:variable name=”LocationOut” select=”ehdr:setOutboundHeader(‘/shdr:ESBHeader/shdr:location’,$LocationIn, ‘shdr=http://xmlns.oracle.com/esb;’)”/>
I have just hardcoded the endpoint for simplicity but will normally be a lookup.
As this shows we are overriding the endpoint to route to the AnotherBPELProcess instead of the dummyBPELProcess.

Routing XSL To be Modified

Routing XSL To be Modified

Putting the XPaths into the XSLT

Putting the XPaths into the XSLT

Thats about it … enjoy!!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: