Friday, September 10, 2010

11g Dynamic partnerlink example

In one of my blog postings I had mentioned using dynamic partnerlinks in 11g but didn’t post an example since 11g was not out then. Well here is the example – I checked it against Sean Carey’s example from the BPEL Cookbook and there are is only one big change. Since there is no bpel.xml anymore all references to static WSDL’s are now located in the composite.xml. So in my very simple example:

<reference name="HelloWorld" ui:wsdlLocation="HelloWorld.wsdl">
<interface.wsdl interface="
http://xmlns.oracle.com/HelloWorld/HelloWorlf/HelloWorld#wsdl.interface(HelloWorld)"
callbackInterface="http://xmlns.oracle.com/HelloWorld/HelloWorlf/HelloWorld#wsdl.interface(HelloWorldCallback)"/>
<binding.ws port="
http://xmlns.oracle.com/HelloWorld/HelloWorlf/HelloWorld#wsdl.endpoint(client/HelloWorld_pt)"
location="HelloWorld.wsdl"/>
</reference>

There is still a reference to the local WSDL (not remote) which is used as a static interface to the actual WSDL that is passed at runtime. None of the other artifacts change in 11g i.e. the EndpopintReference variable, the ServiceName, Address and assign to Partnerlink – all stay the same.

In my example I am including a SequentialProcess.wsdl which is not used in the project but it can be used as a template for defining a static WSDL for future projects. At the moment my GoDynamicBPEL process is adding has the values for ServiceName and Address at design time, but these can be changed to pick up the values at runtime instead to make the process truly robust.

The project can be downloaded from here:

GoDynamic.zip

As always comments and feedback welcome.

DA