In this post I would like to highlight some key points while configuring dynamic partnerlinks in BPEL. The most important point to be remembered when using dynamic partnerlinks is that you need to ensure each process that you wish to call has to be based on exactly the same WSDL. The message types, namespaces, port types, bindings etc...everything have to be same just the endpoint url will be different.
If the above is taken care of then configuration wise things are simple :
A. First create the patnerlink with a template WSDL file.
B. Then add the following namespace to your bpel process xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing"
C. Import the schema from above namespace URL to your project.
D. Based on this namespace, create an “EndpointReference” variable.
If the above is taken care of then configuration wise things are simple :
A. First create the patnerlink with a template WSDL file.
B. Then add the following namespace to your bpel process xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing"
C. Import the schema from above namespace URL to your project.
D. Based on this namespace, create an “EndpointReference” variable.
<variable name=
"partnerReferenceDetails"
element=
"wsa:EndpointReference"
/>
E.Initialize the endpoint-reference by copying the following xml-fragment to the endpoint reference.
<EndpointReference xmlns=
"http://schemas.xmlsoap.org/ws/2003/03/addressing"
>
<Address/>
</EndpointReference>
F. You can use a bpel preference to store the end point URL so that at runtime this can be changed easily. Copy the determined endpoint url into the address node of the EndpointReference variable.
<copy>
<from expression=
'ora:getPreference("EndPointURL")'
/>
<to variable=
"
partnerReferenceDetails"
query=
"/wsa:EndpointReference/wsa:Address"
/>
</copy>
G. Finally before invoking the partnerlink copy the Endpoint Reference to the partnerlink
<copy>
<from variable=
"
partnerReferenceDetails"
query=
"/wsa:EndpointReference"
/>
<to partnerLink=
"DummyServiceWSDL"
/>
</copy>
Comments
Post a Comment