7 Integration With Mediator Service Components in the Oracle SOA Suite

This chapter describes integration with Mediator service components in the Oracle SOA Suite. It contains the following topics:

The scenarios shown in this chapter require the following prerequisites.

Prerequisites

The following are installation and configuration requirements:

The examples in this chapter present the configuration steps necessary for demonstrating service and event integration with SAP. Prior to using this material, you must be familiar with the following:

Overview of Mediator Integration

Mediator provides a comprehensive application integration framework. Oracle Application Adapter for SAP R/3 used with Mediator enables you to seamlessly integrate enterprise software, eliminating custom code. Functional modeling, as opposed to custom coding solutions, allows for software reuse and reduces the complexity and management challenges that arise over the software lifecycle. This integration model consists of two components--high-level integration logic and low-level platform services.

Adapter integration with Oracle Mediator is a two-step process:

  1. Design Time: Oracle Application Adapter for SAP R/3 is configured in Application Explorer for services and events, as described in Chapter 4, "Configuring Oracle Application Adapter for SAP R/3". Integration logic is modeled in Mediator.

  2. Runtime: The underlying platform treats this metadata as run-time instructions to enable the communication between participating applications.

Configuring a New Application Server Connection

For more information on how to configure a new Application Server connection in Oracle JDeveloper, see Configuring a New Application Server Connection.

Configuring a Mediator Outbound Process

The following example describes how to configure a Mediator outbound process to your SAP system, using a Mediator project in Oracle JDeveloper.

Samples have been provided for this use case scenario under the etc/sample folder of the Application Adapters installation.

Prerequisites

Before you design a Mediator outbound process, you must generate the respective WSDL file using Application Explorer. For more information, see "Generating WSDL for Request/Response Service".

Creating an Empty Composite for SOA

Perform the following steps to create an empty composite for SOA:

  1. Create a new SOA application.

  2. Enter a name for the new SOA Application and click Next, as shown in Figure 7-1.

    Figure 7-1 Name Your Application Page

    Name your application pane
    Description of "Figure 7-1 Name Your Application Page"

    The Name your project page is displayed, as shown in Figure 7-2.

    Figure 7-2 Name Your Project Page

    Name your project pane
    Description of "Figure 7-2 Name Your Project Page"

  3. Enter a project name (for example, sampleTest) and click Next.

    The Configure SOA settings page is displayed, as shown in Figure 7-3.

    Figure 7-3 Configure SOA Settings Page

    Configure SOA settings pane
    Description of "Figure 7-3 Configure SOA Settings Page"

  4. From the Composite Template list, select Empty Composite and click Finish.

Defining a Mediator Outbound Process

This section describes how to define a Mediator outbound process, which consists of the following stages:

  1. Configuring a Third Party Adapter Service Component

  2. Configuring an Outbound Mediator Process Component

  3. Configuring the Routing Rules

Configuring a Third Party Adapter Service Component

Perform the following steps to create a third party adapter service component:

  1. Drag and drop the Third Party Adapter component from the Service Adapters pane to the External References pane, as shown in Figure 7-4.

    Figure 7-4 Third Party Adapter Component

    External References pane
    Description of "Figure 7-4 Third Party Adapter Component"

    The Create Third Party Adapter Service dialog is displayed, as shown in Figure 7-5.

    Figure 7-5 Create Third Party Adapter Service Dialog

    Create Third Party Adapter Service dialog box
    Description of "Figure 7-5 Create Third Party Adapter Service Dialog"

  2. Enter a name for the third party adapter service.

  3. Ensure that Reference is selected from the Type drop-down list (default).

  4. Click the Find existing WSDLs icon, which is located to the right of the WSDL URL field.

    The SOA Resource Browser dialog is displayed, as shown in Figure 7-6.

    Figure 7-6 SOA Resource Browser Dialog

    SOA Resource Browser dialog box
    Description of "Figure 7-6 SOA Resource Browser Dialog"

  5. Browse and select an outbound WSDL file from the following directory:

    <ADAPTER_HOME>\soa\thirdparty\ApplicationAdapters\wsdls
    
  6. Click OK.

    The Localize Files dialog is displayed, as shown in Figure 7-7.

    Figure 7-7 Localize Files Dialog

    Localize Files dialog box
    Description of "Figure 7-7 Localize Files Dialog"

  7. Click OK.

    The outbound WSDL file and associated request and response XML schema files (.xsd) are imported to the project folder that has been created.

    You are returned to the Create Third Party Adapter Service dialog, as shown in Figure 7-8.

    Figure 7-8 Create Third Party Adapter Service Dialog

    Create Third Party Adapter Service dialog box
    Description of "Figure 7-8 Create Third Party Adapter Service Dialog"

  8. Click the Find JCA file icon, which is located to the right of the JCA File field.

    The SOA Resource Browser dialog is displayed, as shown in Figure 7-9.

    Figure 7-9 SOA Resource Browser Dialog

    SOA Resource Browser dialog box
    Description of "Figure 7-9 SOA Resource Browser Dialog"

  9. Browse and select the JCA properties file from the following directory:

    <ADAPTER_HOME>\soa\thirdparty\ApplicationAdapters\wsdls
    
  10. Click OK.

    A Copy File confirmation message is displayed, as shown in Figure 7-10.

    Figure 7-10 Copy File Confirmation Message

    Copy File message
    Description of "Figure 7-10 Copy File Confirmation Message"

  11. Click Yes.

    A copy of the JCA properties file is made in the project folder.

    You are returned to the Create Third Party Adapter Service dialog, as shown in Figure 7-11.

    Figure 7-11 Create Third Party Adapter Service Dialog

    Create Third Party Adapter Service dialog box
    Description of "Figure 7-11 Create Third Party Adapter Service Dialog"

  12. Click OK.

    The third party adapter service component (GetDetail) is created in the External References pane, as shown in Figure 7-12.

    Figure 7-12 Third Party Adapter Service Component (Get Detail)

    External References pane
    Description of "Figure 7-12 Third Party Adapter Service Component (Get Detail)"

    You are now ready to configure an outbound Mediator process component.

Configuring an Outbound Mediator Process Component

Perform the following steps to configure an outbound Mediator process component:

  1. Drag and drop the Mediator Process component from the Service Components pane to the Components pane, as shown in Figure 7-13.

    Figure 7-13 Mediator Process Component

    Components pane
    Description of "Figure 7-13 Mediator Process Component"

    The Create Mediator dialog is displayed, as shown in Figure 7-14.

    Figure 7-14 Create Mediator Dialog

    Create Mediator dialog box
    Description of "Figure 7-14 Create Mediator Dialog"

  2. In the Name field, enter a name to identify the new outbound Mediator process component (for example, CompanyCode_GetDetail).

  3. From the Template drop-down list, select Synchronous Interface.

  4. Click the Browse icon, which is located to the right of the Input field to select the associated XML request schema file.

    The Type Chooser dialog is displayed, as shown in Figure 7-15.

    Figure 7-15 Type Chooser Dialog

    Type Chooser dialog box
    Description of "Figure 7-15 Type Chooser Dialog"

  5. Expand Project WSDL Files, CC_GetDetail_invoke_Nov18.wsdl, Inline Schemas, and select CompanyCode.GetDetail.

  6. Click OK.

    You are returned to the Create Mediator dialog, as shown in Figure 7-16.

    Figure 7-16 Create Mediator Dialog

    Create Mediator dialog box
    Description of "Figure 7-16 Create Mediator Dialog"

  7. Click the Browse icon, which is located to the right of the Output field to select the associated XML response schema file.

    The Type Chooser dialog is displayed, as shown in Figure 7-17.

    Figure 7-17 Type Chooser Dialog

    Type Chooser dialog box
    Description of "Figure 7-17 Type Chooser Dialog"

  8. Expand Project WSDL Files, CC_GetDetail_invoke_Nov18.wsdl, Inline Schemas, schema, and select CompanyCode.GetDetailResponse.

  9. Click OK.

    You are returned to the Create Mediator dialog, as shown in Figure 7-18.

    Figure 7-18 Create Mediator Dialog

    Create Mediator dialog box
    Description of "Figure 7-18 Create Mediator Dialog"

  10. Click OK.

  11. Create a connection between the outbound Mediator process component (CompanyCode_ GetDetail) and the third party adapter service component (GetDetail), as shown in Figure 7-19.

    Figure 7-19 Created Connection

    Oracle JDeveloper workspace area
    Description of "Figure 7-19 Created Connection"

    You are now ready to configure the routing rules.

Configuring the Routing Rules

Perform the following steps to configure routing rules for the Mediator outbound process component:

  1. Double-click the outbound Mediator process component (CompanyCode_ GetDetail) in the Components pane, as shown in Figure 7-20.

    Figure 7-20 Mediator Process Component

    Components pane
    Description of "Figure 7-20 Mediator Process Component"

    The Routing Rules dialog is displayed, as shown in Figure 7-21.

    Figure 7-21 Routing Rules Dialog

    Routing Rules dialog box
    Description of "Figure 7-21 Routing Rules Dialog"

  2. In the <<Filter Expression>> area, click the icon to the right of the Transform Using field.

    The Request Transformation Map dialog is displayed, as shown in Figure 7-22.

    Figure 7-22 Request Transformation Map Dialog

    Request Transformation Map dialog box
    Description of "Figure 7-22 Request Transformation Map Dialog"

  3. Select the Create New Mapper File option and click OK.

    The following mapping page is displayed, as shown in Figure 7-23.

  4. Map the iWayRequest:CompanyCode.GetDetail source element to the iWayRequest:CompanyCode.GetDetail target element.

    The Auto Map Preferences dialog is displayed, as shown in Figure 7-24.

    Figure 7-24 Auto Map Preferences Dialog

    Auto Map Preferences dialog box
    Description of "Figure 7-24 Auto Map Preferences Dialog"

  5. Retain the default values and click OK.

    You are returned to the Routing Rules dialog, as shown in Figure 7-25.

    Figure 7-25 Routing Rules Dialog

    Routing Rules dialog box
    Description of "Figure 7-25 Routing Rules Dialog"

  6. In the Synchronous Reply area, click the icon to the right of the Transform Using field.

    The Reply Transformation Map dialog is displayed, as shown in Figure 7-26.

    Figure 7-26 Reply Transformation Map Dialog

    Reply Transformation Map dialog box
    Description of "Figure 7-26 Reply Transformation Map Dialog"

  7. Select the Create New Mapper File option and click OK.

    A mapping page is displayed, as shown in Figure 7-27.

  8. Map the iWayResponse:CompanyCode.GetDetail.Response source element to the iWayResponse:CompanyCode.GetDetail.Response target element.

    The Auto Map Preferences dialog is displayed, as shown in Figure 7-28.

    Figure 7-28 Auto Map Preferences Dialog

    Auto Map Preferences dialog box
    Description of "Figure 7-28 Auto Map Preferences Dialog"

  9. Retain the default values and click OK.

    The mapping is completed, as shown in Figure 7-29.

    Figure 7-29 Completed Mapping

    completed mapping
    Description of "Figure 7-29 Completed Mapping"

  10. Click the Save All icon in the menu bar to save the new outbound Mediator process component that was configured.

    You are now ready to deploy the Mediator outbound process.

Deploying the Mediator Outbound Process

Perform the following steps to deploy the Mediator outbound process.

  1. Right-click the project name in the left pane (for example, sampleTest), select Deploy from the context menu, and click sampleTest, as shown in Figure 7-30.

    Figure 7-30 SampleTest Option

    Deploy context menu
    Description of "Figure 7-30 SampleTest Option"

    The Deployment Action page is displayed, as shon in Figure 7-31.

    Figure 7-31 Deployment Action

    Deployment Action pane
    Description of "Figure 7-31 Deployment Action"

  2. Ensure that Deploy to Application Server is selected.

  3. Click Next.

    The Deploy Configuration page is displayed, as shown in Figure 7-32.

    Figure 7-32 Deploy Configuration Page

    Deploy Configuration pane
    Description of "Figure 7-32 Deploy Configuration Page"

  4. Leave the default values selected and click Next.

    The Select Server page is displayed, as shown in Figure 7-33.

    Figure 7-33 Select Server Page

    Select Server pane
    Description of "Figure 7-33 Select Server Page"

  5. Select an available application server that was configured and click Next.

    The SOA Servers page is displayed, as shown in Figure 7-34.

    Figure 7-34 SOA Servers Page

    SOA Servers pane
    Description of "Figure 7-34 SOA Servers Page"

  6. Select a target SOA server and click Next.

    The Summary page is displayed, as shown in Figure 7-35.

  7. Review and verify all the available deployment information for your project and click Finish.

    The process is deployed successfully, as shown in Figure 7-36.

    Figure 7-36 Successful Deployment Message

    Authorization Request dialog box
    Description of "Figure 7-36 Successful Deployment Message"

Invoking the Input XML Document in the Oracle Enterprise Manager Console

Perform the following steps to invoke the input XML document in the Oracle Enterprise Manager console.

  1. Logon to the Oracle Enterprise Manager console, as shown in Figure 7-37.

    Figure 7-37 Oracle Enterprise Manager Console

    Oracle Enterprise Manager console
    Description of "Figure 7-37 Oracle Enterprise Manager Console"

  2. Expand your domain in the left pane followed by the SOA folder.

  3. Select an available project in the left pane.

  4. Click Test.

  5. Click the Request tab, as shown in Figure 7-38.

  6. Provide an appropriate input value in the Input Arguments area and click Test Web Service.

    The output response is received in the Oracle Enterprise Manager console, as shown in Figure 7-39.

    Figure 7-39 Oracle Enterprise Manager Console

    Response tab
    Description of "Figure 7-39 Oracle Enterprise Manager Console"

Configuring a Mediator Inbound Process

The following example describes how to configure a Mediator inbound process to your SAP system, using a Mediator project in Oracle JDeveloper.

Samples have been provided for this use case scenario under the etc/sample folder of the Application Adapters installation.

Prerequisites

Before you design a Mediator inbound process, you must generate the respective WSDL file using Application Explorer. For more information, see "Generating WSDL for Event Integration".

Creating an Empty Composite for SOA

Perform the following steps to create an empty composite for SOA:

  1. Create a new SOA application.

  2. Enter a name for the new SOA Application and click Next, as shown in Figure 7-40.

    Figure 7-40 Name Your Application Page

    Name your application pane
    Description of "Figure 7-40 Name Your Application Page"

    The Name your project page is displayed, as shown in Figure 7-41.

    Figure 7-41 Name Your Project Page

    Name your project pane
    Description of "Figure 7-41 Name Your Project Page"

  3. Enter a project name and click Next.

    The Configure SOA settings page is displayed, as shown in Figure 7-42.

    Figure 7-42 Configure SOA Settings Page

    Configure SOA settings pane
    Description of "Figure 7-42 Configure SOA Settings Page"

  4. From the Composite Template list, select Empty Composite and click Finish.

Defining a Mediator Inbound Process

This section describes how to define a Mediator inbound process, which consists of the following stages:

  1. Configuring a Third Party Adapter Service Component

  2. Configuring an Inbound Mediator Process Component With a File Adapter

  3. Configuring the Routing Rules

Configuring a Third Party Adapter Service Component

Perform the following steps to create a third party adapter service component:

  1. Drag and drop the Third Party Adapter component from the Service Adapters pane to the Exposed Services pane, as shown in Figure 7-43.

    Figure 7-43 Third Party Adapter Component

    Exposed Services pane
    Description of "Figure 7-43 Third Party Adapter Component"

    The Create Third Party Adapter Service dialog is displayed, as shown in Figure 7-44.

    Figure 7-44 Create Third Party Adapter Service Dialog

    Create Third Party Adapter Service dialog box
    Description of "Figure 7-44 Create Third Party Adapter Service Dialog"

  2. Enter a name for the third party adapter service (for example, CC_GetDetail_Mediator_IB).

  3. Ensure that Service is selected from the Type drop-down list (default).

  4. Click the Find existing WSDLs icon, which is located to the right of the WSDL URL field.

    The SOA Resource Browser dialog is displayed, as shown in Figure 7-45.

    Figure 7-45 SOA Resource Browser Dialog

    Surrounding text describes Figure 7-45 .
  5. Browse and select an inbound WSDL file from the following directory:

    <ADAPTER_HOME>\soa\thirdparty\ApplicationAdapters\wsdls
    
  6. Click OK.

    The Localize Files dialog is displayed, as shown in Figure 7-46.

    Figure 7-46 Localize Files Dialog

    Localize Files dialog box
    Description of "Figure 7-46 Localize Files Dialog"

  7. Click OK.

    The inbound WSDL file and associated receive/request schema file (.xsd) are imported to the project folder that has been created.

    You are returned to the Create Third Party Adapter Service dialog, as shown in Figure 7-47.

    Figure 7-47 Create Third Party Adapter Service Dialog

    Create Third Party Adapter Service dialog box
    Description of "Figure 7-47 Create Third Party Adapter Service Dialog"

  8. Click the Find JCA file icon, which is located to the right of the JCA File field.

    The SOA Resource Browser dialog is displayed, as shown in Figure 7-48.

    Figure 7-48 SOA Resourve Browser Dialog

    SOA Resource Browser dialog box
    Description of "Figure 7-48 SOA Resourve Browser Dialog"

  9. Browse and select the JCA properties file from the following directory:

    <ADAPTER_HOME>\soa\thirdparty\ApplicationAdapters\wsdls
    
  10. Click OK.

    The following message is displayed, as shown in Figure 7-49.

    Figure 7-49 Copy File Confirmation Message

    Copy File message
    Description of "Figure 7-49 Copy File Confirmation Message"

  11. Click Yes.

    A copy of the JCA properties file is made in the project folder.

    You are returned to the Create Third Party Adapter Service dialog, as shown in Figure 7-50.

    Figure 7-50 Create Third Party Adapter Service Dialog

    Create Third Party Adapter Service dialog box
    Description of "Figure 7-50 Create Third Party Adapter Service Dialog"

  12. Click OK.

    The third party adapter service component (CC_GetDetail_Mediator_IB) is created in the Exposed Services pane, as shown in Figure 7-51.

    Figure 7-51 Third Party Adapter Service Component

    Exposed Services pane
    Description of "Figure 7-51 Third Party Adapter Service Component"

    You are now ready to configure an inbound Mediator process component.

Configuring an Inbound Mediator Process Component With a File Adapter

Perform the following steps to configure an inbound Mediator process component with a File adapter.

  1. Drag and drop the Mediator Process component from the Service Components pane to the Components pane, as shown in Figure 7-52.

    Figure 7-52 Mediator Process Component

    Components pane
    Description of "Figure 7-52 Mediator Process Component"

    The Create Mediator dialog is displayed, as shown in Figure 7-53.

    Figure 7-53 Create Mediator Dialog

    Create Mediator dialog box
    Description of "Figure 7-53 Create Mediator Dialog"

  2. In the Name field, enter a name to identify the new inbound Mediator process component (for example, CC_GetDetail_Mediator_IB).

  3. From the Template drop-down list, select Define Interface Later.

  4. Click the OK.

    The new Mediator process component is added to the Components pane, as shown in Figure 7-54.

    Figure 7-54 Mediator Process Component

    Components pane
    Description of "Figure 7-54 Mediator Process Component"

  5. Drag and drop the File Adapter component from the Service Adapters pane to the External References pane.

    The Adapter Configuration Wizard is displayed, showing the Service Name page, as shown in Figure 7-55.

    Figure 7-55 Adapter Configuration Wizard

    Service Name pane
    Description of "Figure 7-55 Adapter Configuration Wizard"

  6. Type a name for the new File adapter in the Service Name field and click Next.

    The Adapter Interface page is displayed, as shown in Figure 7-56.

    Figure 7-56 Adapter Interface Page

    Adapter Interface pane
    Description of "Figure 7-56 Adapter Interface Page"

  7. Ensure that the Define from operation and schema (specified later) option is selected.

  8. Click Next.

    The Operation page is displayed, as shown in Figure 7-57.

    Figure 7-57 Operation Page

    Operation pane
    Description of "Figure 7-57 Operation Page"

  9. Select Write File from the list of Operation Type options and specify an Operation Name (for example, Write).

  10. Click Next.

    The File Configuration page is displayed, as shown in Figure 7-58.

    Figure 7-58 File Configuration Page

    File Configuration pane
    Description of "Figure 7-58 File Configuration Page"

  11. Specify a location on your file system where the output file is written.

  12. In the File Naming Convention field, specify a name for the output file.

  13. Click Next.

    The Messages page is displayed, as shown in Figure 7-59.

    Figure 7-59 Messages Page

    Messages pane
    Description of "Figure 7-59 Messages Page"

  14. Click Browse, which is located to the right of the URL field.

    The Type Chooser dialog is displayed, as shown in Figure 7-60.

    Figure 7-60 Type Chooser Dialog

    Type Chooser dialog box
    Description of "Figure 7-60 Type Chooser Dialog"

  15. Expand Project WSDL Files, BAPI_COMPANYCODE_GETDETAIL_receive.wsdl, Inline Schemas, and schema.

  16. Select the available schema (for example, BAPI.CompanyCode.GetDetail)

  17. Click OK.

    You are returned to the Messages page, as shown in Figure 7-61.

    Figure 7-61 Messages Page

    Messages pane
    Description of "Figure 7-61 Messages Page"

  18. Click Next.

    The Finish page is displayed, as shown in Figure 7-62.

  19. Click Finish.

  20. Create a connection between the inbound Mediator process component and the third party adapter service component, as shown in Figure 7-63.

    Figure 7-63 Created Connection

    Oracle JDeveloper workspace area
    Description of "Figure 7-63 Created Connection"

  21. Create a connection between the inbound Mediator process component and the File adapter component, as shown in Figure 7-64.

    Figure 7-64 Created Connection

    Oracle JDeveloper workspace area
    Description of "Figure 7-64 Created Connection"

    You are now ready to configure the routing rules.

Configuring the Routing Rules

Perform the following steps to configure routing rules for the Mediator inbound process component:

  1. Double-click the inbound Mediator process component in the Components page, as shown in Figure 7-65.

    Figure 7-65 Inbound Mediator Process Component

    inbound Mediator process component
    Description of "Figure 7-65 Inbound Mediator Process Component"

    The Routing Rules dialog is displayed, as shown in Figure 7-66.

    Figure 7-66 Routing Rules Dialog

    Routing Rules dialog box
    Description of "Figure 7-66 Routing Rules Dialog"

  2. In the <<Filter Expression>> area, click the icon to the right of the Transform Using field.

    The Request Transformation Map dialog is displayed, as shown in Figure 7-67.

    Figure 7-67 Request Transformation Map Dialog

    Request Transformation Map dialog box
    Description of "Figure 7-67 Request Transformation Map Dialog"

  3. Select the Create New Mapper File option and click OK.

    The mapping page is displayed, as shown in Figure 7-68.

  4. Map the iWayEvent:BAPI_COMPANYCODE_GETDETAIL source element to the iWayEvent:BAPI_COMPANYCODE_GETDETAIL target element.

    The Auto Map Preferences dialog is displayed, as shown in Figure 7-69.

    Figure 7-69 Auto Map Preferences Dialog

    Auto Map Preferences dialog box
    Description of "Figure 7-69 Auto Map Preferences Dialog"

  5. Retain the default values and click OK.

    You are returned to the Routing Rules dialog. The mapping is now complete.

  6. Click the Save All icon in the menu bar to save the new inbound Mediator process component that was configured.

    You are now ready to deploy the Mediator inbound process. You can follow the same procedure in "Deploying the BPEL Inbound Process".

    Once event messages are triggered through SAP GUI, output XML is received in the location that was specified for the File adapter component. For more information on triggering events in SAP R/3, see "Triggering an Event in SAP R/3".