In the Name field, enter a name for the Oracle Mediator service component. In the Routing Rules section, click Add Event Subscription. Click Add.

Getting Started with Oracle Mediator 18-13 Figure 18–10 Define Service Dialog

3. Do one of the following:

■ To use an existing WSDL file, click Find existing WSDLs to the right of the WSDL URL field. ■ To create a WSDL file, click Generate WSDL from schemas to the right of the WSDL URL field. For information about how to generate a WSDL file, see Section 18.5, Generating a WSDL File.

4. From the Port Type list, select a port.

5. From the Callback Port Type list, select a port for the response message in an

asynchronous interaction.

6. Click OK.

18.4.2 Creating an Oracle Mediator Based on a WSDL File

When you create an Oracle Mediator, you can base the interface definition on a WSDL file, which describes the interfaces of an Oracle Mediator, such as port types, operations, services, and schemas.

18.4.2.1 How to Create an Oracle Mediator Based on a WSDL File

The Interface Definition from WSDL template on the Create Mediator dialog box creates an Oracle Mediator based on a WSDL file that has already been created or that can be generated from a schema. To create an Oracle Mediator based on a WSDL file: 1. Create an Oracle Mediator as described in Section 18.3, Creating an Oracle Mediator . The Create Mediator dialog appears.

2. In the Name field, enter a name for the Oracle Mediator service component.

3. From the Template list, select Interface Definition from WSDL, as shown in

Figure 18–11 . 18-14 Oracle Fusion Middleware Developers Guide for Oracle SOA Suite Figure 18–11 Interface Definition from WSDL Template Selection on the Create Mediator Dialog

4. If you do not want to create an exposed service with SOAP bindings that is

automatically connected to your Oracle Mediator, deselect the Create Composite Service with SOAP Bindings option.

5. In the WSDL URL field, do one of the following:

■ To use an existing WSDL file, enter the name of the file or click Find existing WSDL files to browse for the file. ■ To create a new WSDL file, click Generate WSDL from schemas. For more information about these options, see Section 18.5, Generating a WSDL File.

6. From the Port Type list, select a port.

This parses the WSDL file that you specify in the WSDL URL field to display the list of port types.

7. From the Callback Port Type list, select a callback port.

A callback port is the one to which the response message is sent in an asynchronous communication.

8. Click OK.

18.4.2.2 What Happens When You Create an Oracle Mediator from a WSDL File

The Oracle Mediator files are generated under the specified application and project in the Application Navigator, and the new Oracle Mediator appears in the Mediator Editor in Design view. If the WSDL file you specify is located in a different directory from the project files, the file and its associated schema files are copied to the Oracle Mediator project. The appearance and source code of the Oracle Mediator varies depending on the name of the WSDL file and the port types and operations defined by the WSDL file. Figure 18–12 shows a sample Oracle Mediator created from a WSDL file.