Adding Interfaces to Mediation Flows

There are many ways to add interfaces to a mediation flow, the method you use depends upon the requirements of your application.

Prerequisites

Before you add interfaces to your mediation flow, plan the needs of your application and determine which target and mediation interfaces you need. Some planning considerations are discussed in Planning Target and Mediation Interfaces.

Procedure

  • You can add interfaces to a mediation flow using one of the following choices:
    • If you plan to have a one-to-one relationship between target and mediation interfaces, you might use the technique described in Creating New Mediation Flows From Existing Web Services.
    • If a WSDL file contains more than one port type, you can expand the WSDL file in the project tree and select only the interface you want to drag and drop into the mediation flow. You can also drag and drop the top-level WSDL file to add all interfaces within the WSDL file to the mediation flow.
    • If your target interfaces and mediation interfaces have different operations and schemas, drag and drop each interface from the Project Explorer into the appropriate area of the mediation flow.
      Note: Dragging and dropping an interface onto the mediation side of a flow creates an untargeted flow for each operation. When you select the mediation operation for an untargeted flow, the flow appears as a line ending in a question mark. You can then use a Generate Reply, Throw Fault, or End Mediation task on the flow without having to add a target interface. You can also drag and drop an untargeted flow to a target interface and mediate that interface.
    • Another way to add an interface to the target or mediation interface list is to use the menu icon at the top of the Mediation Interfaces area and Target Interfaces area of the mediation flow. The menu contains an Add Mediation Interface or Add Target Endpoint item, depending upon which side of the mediation flow you use. The Add menu opens a Select WSDL Port Type dialog where you can choose an interface to add.
      Note: You can add more than one copy of the same interface to the mediation interfaces side of the mediation flow. Doing so allows you to specify different business logic for the same interface. You can then expose each implementation of the interface to different clients.

      For example, you could use this functionality to offer different qualities of service to different clients.