Monday, 14 July 2014

Multiple End Point URI Set On partner Link

We can use endPointURI proporty to set multiple end points for a partner link. In case of any fail over of a uri it will invoke the other one. If all the endPOintURIs fail then default uri which is mentioned with wsdlLocation in the Reference tag will invoke.

For Example : 

Create a synchronous BPEL process and deploy it with 3 different versions which have return different output messages. Create another synchronous bpel process to test the multiple endpointURI. In the composite of this process create a partner link and set it with a BPEL process rev1.0. Go to source mode and add multiple endpointURI proporties in the reference tag. Follwo the below code snipet.

 <reference name="invkHelloworld"
             ui:wsdlLocation="http://localhost:8001/soa-infra/services/TESTING/HelloWorld!1.0/BPELProcess1.wsdl">
    <interface.wsdl         interface="http://xmlns.oracle.com/SOADemo/HelloWorld/BPELProcess1#wsdl.interface(BPELProcess1)"/>
    <binding.ws port="http://xmlns.oracle.com/SOADemo/HelloWorld/BPELProcess1#wsdl.endpoint(bpelprocess1_client_ep/BPELProcess1_pt)"
                location="http://localhoste:8001/soa-infra/services/TESTING/HelloWorld!1.0/bpelprocess1_client_ep?WSDL"
                soapVersion="1.1">
      <property name="endpointURI"> http://localhost:8001/soa-infra/services/TESTING/HelloWorld!2.0/bpelprocess1_client_ep?WSDL </property>
      <property name="endpointURI">http://localhost:8001/soa-infra/services/TESTING/HelloWorld!3.0/bpelprocess1_client_ep?WSDL</property>
      <property name="weblogic.wsee.wsat.transaction.flowOption"
                type="xs:string" many="false">WSDLDriven</property>
    </binding.ws>
  </reference>

Deploy and test the code. Check the following outputs

  • It will invoke the HelloWorld rev 3.0 by default if all the services are up.
  • If HelloWorld rev 3.0 is down then it invokes previous end point uri.
  • If all the end points are dow then it invokes default uri which is mentioned in location tag of <binding.ws>


Happy Coding :)



1 comment: