As part of orchestrating services, it is often found necessary to call certain services whose end points (addresses) are not necessarily known at design time. In this article we will see how Dynamic partner links of BPEL 2.0 spec helps in achieving this.
In a JBI environment typically the concrete information such as endpoints and addresses sit with Binding Components(BC). With that in context, user should understand that when an end point is dynamically used in BPEL, at runtime, the BPEL Service Engine(SE) queries available BCs to see if any of them understand the endpoint. In the event a BC responds positively, (regardless of which BC), the end point will be used to call out. The underlying JBI framework handles all of this for the users.
It needs to be noted that the current dynamic partner implementation mandates the presence of three fields of the WS-A schema. Address field, service name field and the portName field. The current implementation expects that the service and portName should have been deployed to the BC.
<ns1:EndpointReference>
<wsa:Address>
http://localhost:8080/stockQuoteService/stockQuotePort
</wsa:Address>
<wsa:ServiceName PortName="stockQuotePort">
ns3:stockQuoteService
</wsa:ServiceName>
</ns1:EndpointReference>
, where BPEL calls EJB services dynamically
article.