Hello All,
Hope you all are doing well!!!
Hope you all are doing well!!!
Oracle SOA Suite provides support for specifying multiple partner link endpoint Locations. This capability is useful for failover purposes if the first endpoint is down.
“endpointURI” is the property that we need to add in partner link reference to support multiple endpoint location.
<property name=”endpointURI”>endpoint</property>
Below is sample code:
<reference name=”SayHello” ui:wsdlLocation=”SayHello.wsdl”>
<interface.wsdl interface=”http://xmlns.oracle.com/TestApplication/First/BPELProcess1#wsdl.interface(BPELProcess1)”/>
<binding.ws port=”http://xmlns.oracle.com/TestApplication/Second/BPELProcess1#wsdl.endpoint(bpelprocess1_client_ep/BPELProcess1_pt)”
location=”http://localhost:8001/soa-infra/services/default/First/bpelprocess1_client_ep?WSDL”>
<property name=”endpointURI”>http://localhost:8001/soa-infra/services/default/Second/bpelprocess1_client_ep</property>
</binding.ws>
</reference>
<interface.wsdl interface=”http://xmlns.oracle.com/TestApplication/First/BPELProcess1#wsdl.interface(BPELProcess1)”/>
<binding.ws port=”http://xmlns.oracle.com/TestApplication/Second/BPELProcess1#wsdl.endpoint(bpelprocess1_client_ep/BPELProcess1_pt)”
location=”http://localhost:8001/soa-infra/services/default/First/bpelprocess1_client_ep?WSDL”>
<property name=”endpointURI”>http://localhost:8001/soa-infra/services/default/Second/bpelprocess1_client_ep</property>
</binding.ws>
</reference>
Location attribute in the binding.ws tag is default location for the partner link.
Location=http://localhost:8001/soa-infra/services/default/First/bpelprocess1_client_ep?WSDL
Endpoint inside “endpointURI” is the alternate endpoint URI.
We have 3 composites.
- TestComposite
- SayHello
- SayHelloAlternate
TestComposite is calling SayHello composite but it should call SayHelloAlternate composite which is alternate composite in case “SayHello” is down.
Sample Partner Link reference
<reference name=”SayHello” ui:wsdlLocation=”SayHello.wsdl”>
<interface.wsdl interface=”http://xmlns.oracle.com/TestApplication/SayHello/BPELProcess1#wsdl.interface(BPELProcess1)”/>
<binding.ws port=”http://xmlns.oracle.com/TestApplication/SayHello/BPELProcess1#wsdl.endpoint(bpelprocess1_client_ep/BPELProcess1_pt)”
location=”http://localhost:8001/soa-infra/services/default/SayHelloAlternate/bpelprocess1_client_ep?WSDL”><property name=”endpointURI”>http://localhost:8001/soa-infra/services/default/SayHello/bpelprocess1_client_ep</property></binding.ws></reference>
<interface.wsdl interface=”http://xmlns.oracle.com/TestApplication/SayHello/BPELProcess1#wsdl.interface(BPELProcess1)”/>
<binding.ws port=”http://xmlns.oracle.com/TestApplication/SayHello/BPELProcess1#wsdl.endpoint(bpelprocess1_client_ep/BPELProcess1_pt)”
location=”http://localhost:8001/soa-infra/services/default/SayHelloAlternate/bpelprocess1_client_ep?WSDL”><property name=”endpointURI”>http://localhost:8001/soa-infra/services/default/SayHello/bpelprocess1_client_ep</property></binding.ws></reference>
When both “SayHello” and “SayHelloAlternate” composites are up then TestApplication will invoke “SayHello” partner link. That means it will take endpoint from “property”
- <property name=”endpointURI”>http://localhost:8001/soa-infra/services/default/SayHello/bpelprocess1_client_ep</property>
When SayHello is down then it will invoke “SayHelloAlternate” partner link. That means it will take endpoint from location attribute of the binding.ws tag
- location=”http://localhost:8001/soa-infra/services/default/SayHelloAlternate/bpelprocess1_client_ep?WSDL”
@Note:This is different from Dynamic partener Links, Dynamic links are used when we need to decide end point based on some business logic and this is used to process request in any end point fail-over cases.
Comments
Post a Comment