Partner Link Type
Create a standard BPEL activity, such as a receive, reply, or invoke. Add a partner link type definition to a new WSDL file or to an existing WSDL file.
A partner link type describes the kind of message exchange that two WSDL services intend to carry out. A partner link type characterizes this exchange by defining the roles played by each service and by specifying the port type provided by the service to receive messages appropriate to the exchange.
For an easy way to create and use partner link types and partner links, see What are Participants?.
A partner link type can include one role or two roles.
- •If a partner link type contains two roles, each of the services must implement its role by providing the specified port type. Using two roles indicates that there is a requirement for the calling service to receive some type of callback from the target service in the course of the conversation. For example, a service is invoked with a one-way operation (input message only). When it is ready to reply, it must send back a message to the process' receive activity.
- •If a partner link type contains only one role, no restriction exists on the calling web service regarding roles. The service described by the single role can complete the conversation simply by having its operation invoked without the need for issuing a callback.
The following illustration shows an example of a partner link type defining two roles.
For example, a partner link type named AuctionHouse_Seller describes two roles: AuctionHouse and Seller. The AuctionHouse role supports a port type of Seller that expects an input message of an item for sale. The Seller role supports a port type Seller_Answer that expects an input message from the auction house, regarding whether or not the item has sold. The output message is the name of the item for sale.
In this example, the port types are from the same service; however, port types can be from different services.
The partner link type is a WSDL extension. It can specify one or two roles. The port types can be from the same or from different WSDL files.
A partner link type definition can come from the following sources:
- •From a WSDL file where it is already defined, or where you can add a new definition.
- •From a separate WSDL file with its own namespace for the case where there are two port types, and they are from different services.
- •From a Process Developer BPEL process, where you create can a new definition and add it to a WSDL file.
You can add a new partner link type to a WSDL in the following ways:
- •From a Project Explorer WSDL
- •From a Service Reference
- •From an Interfaces View WSDL
These techniques are described in:
- •Adding a new Partner Link Type from a WSDL in Project Explorer
- •Adding a new Partner Link Type to a new WSDL using a Service Reference WSDL
- •Add a new Partner Link Type from Interfaces View
Adding a new Partner Link Type from a WSDL in Project Explorer
Use the following procedure to add a new partner link type from a WSDL in the project explorer:
- 1. Be sure that you have already imported a WSDL into an orchestration project. Typically, you import WSDL files into the standard wsdl folder.
- 2. Expand the WSDL to show the port type.
- 3. Right-mouse click on the port type and select Add to PartnerLink Type.
- 4. Complete the wizard that appears. For details, see Step 6 in Add a new Partner Link Type from Interfaces View.
Adding a new Partner Link Type to a new WSDL using a Service Reference WSDL
Use the following procedure to add a new parner link type to a new WSDL using a service reference WSDL:
- 1. Be sure that you have already imported a WSDL into the Service References folder of an orchestration project. This WSDL is a reference to a service already running on a server.
- 2. Expand the WSDL to show the port type.
- 3. Right-mouse click on the port type and select Add to PartnerLink Type.
- 4. Complete the wizard that appears. Note that you cannot add a partner link type to the existing remote WSDL. The wizard allows you to create a new WSDL that imports the service reference.
Add a new Partner Link Type from Interfaces View
Use the following procedure to add a new partner link type from Interfaces view:
- 1. Display the Interfaces view. This view is not part of the default perspective. To open it, select Window > Show View > Interfaces.
- 2. Ensure that the port type from the WSDL file you want to refer to is displayed in the list.
- 3. Expand a Port Type to display an operation you want to use, but does not have an associated Partner Link Type yet.
- 4. Select one of the following:
- - BPEL activity. This is a standard BPEL Web interaction activity that is described in the next step.
- - BPEL for People activity. This is an extension activity to BPEL that handles human interaction. For details, see Human Tasks in the Process Developer Help.
- 5. BPEL activity should be selected.
- 6. Drag the operation to the Process Editor canvas to open the Partner Link Type wizard, as shown.
- 7. Do one of the following
- - Select Use an existing Partner Link Type to select from the list, and then click Finish.
- - Select a Partner Link Type definition from Add to Partner Link Type, and add a second role (with its associated port type) to the current partner link type. A partner link type can have two roles; they represent two different services that communicate asynchronously. The picklist includes partner link types from Interfaces that currently have only one role. Type in a new role name in the Role text box, then click Finish.
- - Select Create Partner Link Type for a new Partner Link Type name and Role name, and then click Next.
- 8. If you created a new Partner Link Type in Step 5, you can add it to an existing WSDL file or create a new file for the definition. Do one of the following:
- - Type in an URL in the Create new WSDL file field to qualify all names and message types for this Partner Link Type definition. Then enter the WSDL filename and pathname in the Location field, as the example shows in the following illustration, or click Browse to create a new filename and location. Type the file name in the File name field of the Open dialog.
- - Select a WSDL file from Add to WSDL file to add your new Partner Link Type definition.
- 9. Click Finish.
If you add the Partner Link Type definitions to a new WSDL, Process Developer automatically adds the WSDL to Project Explorer and to the Imports node in Outline view.