Skip Headers
Oracle® Fusion Middleware Application Adapter for SAP R/3 User's Guide for Oracle WebLogic Server
11g Release 1 (11.1.1)
E17057-01
  Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

6 Integration With Mediator Service Components in the Oracle SOA Suite

This chapter contains the following examples:

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 3, "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

To configure a new Application Server connection in Oracle JDeveloper:

  1. Open Oracle JDeveloper on your system.

  2. From the menu bar, click View and select Application Server Navigator.

    Oracle JDeveloper View menu
    Description of the illustration config_appserver1.gif

    The Application Server tab is displayed.

    Application Server tab
    Description of the illustration config_appserver2.gif

  3. Right-click Application Servers and select New Application Server from the context menu.

    The Create Application Server Connection Wizard is displayed.

    Create Application Server Connection Wizard
    Description of the illustration config_appserver3.gif

  4. Accept the default selection (Standalone Server) and click Next.

    The Name and Type page is displayed.

    Name and Type pane
    Description of the illustration config_appserver4.gif

  5. Specify a new name for the Application Server connection and click Next.

    The Authentication page is displayed.

    Authentication pane
    Description of the illustration config_appserver5.gif

  6. Specify a valid user name (for example, weblogic) and a password (for example, welcome1) for your new connection.

  7. Click Next.

    The Configuration page is displayed.

    Configuration pane
    Description of the illustration config_appserver6.gif

  8. Specify the Oracle WebLogic host name (for example, localhost), which is the system IP where the process must deploy and Oracle WebLogic domain (for example, base_domain).

  9. Click Next.

    The Test page is displayed.

    Test pane
    Description of the illustration config_appserver7.gif

  10. Click Test Connection.

  11. Make sure that the test status is successful.

  12. Click Next.

    The Finish page is displayed.

    Finish pane
    Description of the illustration config_appserver8.gif

  13. Click Finish.

    The new Application Server connection is listed in the left pane (Application Server tab), as shown in the following image.

    Application Server tab
    Description of the illustration config_appserver9.gif

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.

Prerequisites

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

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 name for the new SOA Application and click Next.

    Name your application pane
    Description of the illustration med_out_comp1.gif

    The Name your project page is displayed.

    Name your project pane
    Description of the illustration med_out_comp2.gif

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

    The Configure SOA settings page is displayed.

    Configure SOA settings pane
    Description of the illustration med_out_comp3.gif

  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.

    External References pane
    Description of the illustration med_out_adapt1.gif

    The Create Third Party Adapter Service dialog is displayed.

    Create Third Party Adapter Service dialog box
    Description of the illustration med_out_adapt2.gif

  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.

    SOA Resource Browser dialog box
    Description of the illustration bpel_out_adapt3.gif

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

    C:\oracle\Middleware\home_GA\Oracle_SOA1\soa\thirdparty\ApplicationAdapters\wsdls
    
  6. Click OK.

    The Localize Files dialog is displayed.

    Localize Files dialog box
    Description of the illustration med_out_adapt3.gif

  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.

    Create Third Party Adapter Service dialog box
    Description of the illustration bpel_out_adapt5.gif

  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.

    SOA Resource Browser dialog box
    Description of the illustration bpel_out_adapt6.gif

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

    C:\oracle\Middleware\home_GA\Oracle_SOA1\soa\thirdparty\ApplicationAdapters\wsdls
    
  10. Click OK.

    The following message is displayed.

    Copy File message
    Description of the illustration bpel_out_adapt7.gif

  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.

    Create Third Party Adapter Service dialog box
    Description of the illustration bpel_out_adapt8.gif

  12. Click OK.

    The third party adapter service component (GetDetail) is created in the External References pane, as shown in the following image.

    External References pane
    Description of the illustration bpel_out_adapt9.gif

    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.

    Components pane
    Description of the illustration med_out_proc1.gif

    The Create Mediator dialog is displayed.

    Create Mediator dialog box
    Description of the illustration med_out_proc2.gif

  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.

    Type Chooser dialog box
    Description of the illustration med_out_proc3.gif

  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.

    Create Mediator dialog box
    Description of the illustration med_out_proc4.gif

  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.

    Type Chooser dialog box
    Description of the illustration med_out_proc5.gif

  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.

    Create Mediator dialog box
    Description of the illustration med_out_proc6.gif

  10. Click OK.

  11. Create a connection between the outbound Mediator process component (CompanyCode_ GetDetail) and the third party adapter service component (GetDetail).

    Oracle JDeveloper workspace area
    Description of the illustration med_out_proc7.gif

    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.

    Components pane
    Description of the illustration med_out_proc8.gif

    The Routing Rules dialog is displayed.

    Routing Rules dialog box
    Description of the illustration med_out_route1.gif

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

    The Request Transformation Map dialog is displayed.

    Request Transformation Map dialog box
    Description of the illustration med_out_route2.gif

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

    The following mapping page is displayed.

    Mapping pane
    Description of the illustration med_out_route3.gif

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

    The Auto Map Preferences dialog is displayed.

    Auto Map Preferences dialog box
    Description of the illustration med_out_route4.gif

  5. Retain the default values and click OK.

    You are returned to the Routing Rules dialog.

    Routing Rules dialog box
    Description of the illustration med_out_route5.gif

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

    The Reply Transformation Map dialog is displayed.

    Reply Transformation Map dialog box
    Description of the illustration med_out_route6.gif

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

    The following mapping page is displayed.

    Mapping pane
    Description of the illustration med_out_route7.gif

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

    The Auto Map Preferences dialog is displayed.

    Auto Map Preferences dialog box
    Description of the illustration med_out_route4.gif

  9. Retain the default values and click OK.

    The mapping is complete, as shown in the following image.

    completed mapping
    Description of the illustration med_out_route8.gif

  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.

    Deploy context menu
    Description of the illustration med_out_deploy1.gif

    The Deployment Action page is displayed.

    Deployment Action pane
    Description of the illustration med_out_deploy2.gif

  2. Ensure that Deploy to Application Server is selected.

  3. Click Next.

    The Deploy Configuration page is displayed.

    Deploy Configuration pane
    Description of the illustration med_out_deploy3.gif

  4. Leave the default values selected and click Next.

    The Select Server page is displayed.

    Select Server pane
    Description of the illustration med_out_deploy4.gif

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

    The SOA Servers page is displayed.

    SOA Servers pane
    Description of the illustration med_out_deploy5.gif

  6. Select a target SOA server and click Next.

    The Summary page is displayed.

    Summary pane
    Description of the illustration med_out_deploy6.gif

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

    The process is deployed successfully.

    Authorization Request dialog box
    Description of the illustration med_out_deploy7.gif

    If an Authorization Request dialog is displayed during the deployment process, provide the required user name and password and click OK.

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.

    Oracle Enterprise Manager console
    Description of the illustration med_out_invoke1.gif

  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.

    Request tab
    Description of the illustration med_out_invoke2.gif

  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 the following image.

    Response tab
    Description of the illustration med_out_invoke3.gif

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.

Prerequisites

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

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 name for the new SOA Application and click Next.

    Name your application pane
    Description of the illustration med_in_comp1.gif

    The Name your project page is displayed.

    Name your project pane
    Description of the illustration med_in_comp2.gif

  3. Enter a project name and click Next.

    The Configure SOA settings page is displayed.

    Configure SOA settings pane
    Description of the illustration med_in_comp3.gif

  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.

    Exposed Services pane
    Description of the illustration bpel_in_adapt.gif

    The Create Third Party Adapter Service dialog is displayed.

    Create Third Party Adapter Service dialog box
    Description of the illustration med_in_adapt1.gif

  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.

    SOA Resource Browser dialog box
    Description of the illustration med_in_adapt2.gif

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

    C:\oracle\Middleware\home_GA\Oracle_SOA1\soa\thirdparty\ApplicationAdapters\wsdls
    
  6. Click OK.

    The Localize Files dialog is displayed.

    Localize Files dialog box
    Description of the illustration med_in_adapt3.gif

  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.

    Create Third Party Adapter Service dialog box
    Description of the illustration med_in_adapt4.gif

  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.

    SOA Resource Browser dialog box
    Description of the illustration med_in_adapt5.gif

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

    C:\oracle\Middleware\home_GA\Oracle_SOA1\soa\thirdparty\ApplicationAdapters\wsdls
    
  10. Click OK.

    The following message is displayed.

    Copy File message
    Description of the illustration med_in_adapt6.gif

  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.

    Create Third Party Adapter Service dialog box
    Description of the illustration med_in_adapt7.gif

  12. Click OK.

    The third party adapter service component (CC_GetDetail_Mediator_IB) is created in the Exposed Services pane, as shown in the following image.

    Exposed Services pane
    Description of the illustration med_in_adapt8.gif

    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.

    Components pane
    Description of the illustration med_in_proc1.gif

    The Create Mediator dialog is displayed.

    Create Mediator dialog box
    Description of the illustration med_in_proc2.gif

  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 the following image.

    Components pane
    Description of the illustration med_in_proc3.gif

  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.

    Service Name pane
    Description of the illustration med_in_proc4.gif

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

    The Adapter Interface page is displayed.

    Adapter Interface pane
    Description of the illustration med_in_proc5.gif

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

  8. Click Next.

    The Operation page is displayed.

    Operation pane
    Description of the illustration med_in_proc6.gif

  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.

    File Configuration pane
    Description of the illustration med_in_proc7.gif

  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.

    Messages pane
    Description of the illustration med_in_proc8.gif

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

    The Type Chooser dialog is displayed.

    Type Chooser dialog box
    Description of the illustration med_in_proc9.gif

  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.

    Messages pane
    Description of the illustration med_in_proc10.gif

  18. Click Next.

    The Finish page is displayed.

    Finish pane
    Description of the illustration med_in_proc11.gif

  19. Click Finish.

  20. Create a connection between the inbound Mediator process component and the third party adapter service component.

    Oracle JDeveloper workspace area
    Description of the illustration med_in_proc12.gif

  21. Create a connection between the inbound Mediator process component and the File adapter component.

    Oracle JDeveloper workspace area
    Description of the illustration med_in_proc13.gif

    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.

    inbound Mediator process component
    Description of the illustration med_in_route1.gif

    The Routing Rules dialog is displayed.

    Routing Rules dialog box
    Description of the illustration med_in_route2.gif

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

    The Request Transformation Map dialog is displayed.

    Request Transformation Map dialog box
    Description of the illustration med_in_route3.gif

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

    The following mapping page is displayed.

    Mapping pane
    Description of the illustration med_in_route4.gif

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

    The Auto Map Preferences dialog is displayed.

    Auto Map Preferences dialog box
    Description of the illustration med_out_route4.gif

  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".