- Developing SOA Applications with Oracle SOA Suite
- Using the BPEL Process Service Component
- Invoking an Asynchronous Web Service from a BPEL Process
- Creating a Dynamic Partner Link at Design Time for Use at Runtime
- How To Create a Dynamic Partner Link at Design Time for Use at Runtime
How To Create a Dynamic Partner Link at Design Time for Use at Runtime
To create a dynamic partner link at design time for use at runtime:
- Create a WSDL file that contains multiple services that use the same
portType.<service name="AmericanLoan"> <port name="LoanServicePort" binding="tns:LoanServiceBinding"> <soap:address location="host:port/soa-infra/services/domain_ name/AmericanLoan/client"/> </port> </service> <service name="AlliedLoan"> <port name="LoanServicePort" binding="tns:LoanServiceBinding"> <soap:address location="host:port/soa-infra/services/domain_ name/AlliedLoan/client"/> </port> </service> <service name="AcmeLoan"> <port name="LoanServicePort" binding="tns:LoanServiceBinding"> <soap:address location="host:port/soa-infra/services/domain_ name/AcmeLoan/client"/> </port> </service>
- Drag a SOAP binding component into the External References swim lane of the SOA Composite Editor.
The Create Web Service dialog appears.
- Define the web service, and click OK.
When complete, the reference binding component entry in the
composite.xmlfile that uses the WSDL looks as follows:<reference name="loanService"> <interface.wsdl interface="http://services.otn.com#wsdl.interface(LoanService)" callbackInterface="http://services.otn.com#wsdl.interface(LoanServiceCallback)" /> <binding.ws port= "http://services.otn.com#wsdl.endpoint(AmericanLoan/LoanService_pt)"/> </reference>Note:
-
Adding the
binding.ws portsetting is optional. This is because the port is overridden at runtime by properties passed from Oracle BPEL Process Manager. -
If there is no
portsetting, and there is no composite import of the concrete WSDL associated with this reference, you must specify the location of the concrete WSDL with alocationattribute.
-
- Double-click the BPEL process to enter Oracle BPEL Designer.
- Drag an Assign activity into the designer.
- Above the target partner link, select the XML Fragment icon, as shown in Figure 8-3. If you are using BPEL 2.0, drag the Literal icon.
- Drag the icon to the target partner link.
The XML Fragment dialog for BPEL 1.1 appears. If you are using BPEL 2.0, the Literal dialog appears.
- Assign an XML fragment containing the endpoint reference to the partner link, and click OK. Figure 8-4 provides details.
Figure 8-4 XML Fragment Dialog in BPEL 1.1

Description of "Figure 8-4 XML Fragment Dialog in BPEL 1.1"When complete, the BPEL file contains one of the services defined in the WSDL.
The following provides a BPEL 1.1 sample:
<EndpointReference xmlns="http://schemas.xmlsoap.org/ws/2003/03/addressing"> <Address>http://host:port/soa-infra/services/domain_name /AlliedLoan/client</Address> <ServiceName xmlns:ns1="http://services.otn.com" PortName="LoanServicePort">ns1:AlliedLoan</ServiceName> </EndpointReference>The following provides a BPEL 2.0 sample:
<assign> <copy> <from> <literal> <sref:service-ref> <services:EndpointReference> <services:Address>http://host:port/soa-infra/services/domain_ name/AlliedLoan/client</services:Address> <services:ServiceName xmlns:ns1="http://services.otn.com">ns1:AlliedLoan</services: ServiceName> </services:EndpointReference> </sref:service-ref> </literal> </from> <to partnerLink="LoanService"/> </copy> </assign>