5 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 PeopleSoft. Prior to using this material, you must be familiar with the following:

Overview of InterConnect Integration

Mediator provides a comprehensive application integration framework. Oracle Application Adapter for PeopleSoft used with Mediator enables you to seamlessly integrate enterprise software, eliminating the need to write 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 WebLogic Server, Mediator is a two-step process:

  1. Design Time: Oracle Application Adapter for PeopleSoft is configured in Application Explorer for services and events, as described in Chapter 2, "Configuring Oracle Application Adapter for PeopleSoft". Integration logic is modeled in iStudio. Metadata are stored in repositories.

  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 then select New Application Server.

    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 machine IP where the process needs to 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. Ensure 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 PeopleSoft 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 a New SOA Application for the Outbound Mediator Process

Perform the following steps to create a new SOA application for the outbound Mediator process:

  1. Open Oracle JDeveloper on your system.

  2. In the Application Navigator tab, click New Application.

    Application Navigator tab
    Description of the illustration bpel_out_comp1.gif

    The Create SOA Application wizard is displayed.

    Create SOA Application wizard
    Description of the illustration med_out_comp1.gif

  3. From the Application Template list, click SOA Application.

  4. Enter name for the new SOA application (for example, PSoft_Outbound_Mediator) and click Next.

    The Name your project page is displayed.

    Name your project pane
    Description of the illustration med_out_comp2.gif

  5. Enter a project name (for example, LOCATION_Invoke) and click Next.

    The Configure SOA settings page is displayed.

    Configure SOA settings pane
    Description of the illustration med_out_comp3.gif

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

    Application Navigator tab
    Description of the illustration med_out_comp4.gif

    The new SOA application (PSoft_Outbound_Mediator) and associated project (LOCATION_Invoke) are added to the Application Navigator tab in the left pane.

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 Component Palette tab (Service Adapters section) to the External References pane.

    External References pane
    Description of the illustration bpel_out_adapt1.gif

    The Create Third Party Adapter Service dialog is displayed.

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

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

  3. Ensure that Reference is selected from the Type 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 (for example, LOCATION_invoke.wsdl) from the following directory:

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

    The Localize Files dialog is displayed.

    Localize Files dialog box
    Description of the illustration bpel_out_adapt4.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 Files 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 (for example, LOCATION_invoke.jca) from the following directory:

    C:\oracle\Middleware\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 (Location) 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 component from the Component Palette tab (Service Components section) 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, LOCATION_Mediator).

  3. From the Template list, select Synchronous Interface.

  4. Click the Browse Input Elements 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, LOCATION_invoke.wsdl, Inline Schemas, schema, and select PS8.

  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 Output Elements 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, LOCATION_invoke.wsdl, Inline Schemas, schema, and select PS8.

  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 (LOCATION_ Mediator) and the third party adapter service component (Location).

    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 (LOCATION_ Mediator) 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_proc9.gif

  2. In the <<Filter Expression>> area, click the Select an existing mapper file or create a new one 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_proc10.gif

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

    The PS8_To_PS8.xsl tab is displayed.

    PS8_To_PS8.xsl tab
    Description of the illustration med_out_proc11.gif

  4. Map the ci:PS8 source element to the ci:PS8 target element.

    The Auto Map Preferences dialog is displayed.

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

  5. Retain the default values and click OK.

  6. Click the LOCATION_Mediator.mplan tab.

    LOCATION_Mediator.mplan tab
    Description of the illustration med_out_proc13.gif

    You are returned to the Routing Rules dialog.

    Routing Rules dialog box
    Description of the illustration med_out_proc14.gif

  7. In the Synchronous Reply area, click the Select an existing mapper file or create a new one 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_proc15.gif

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

    The PS8_To_PS8_2.xsl tab is displayed.

    PS8_To_PS8_2.xsl tab
    Description of the illustration med_out_proc16.gif

  9. Map the iWayResponse:PS8 source element to the iWayResponse:PS8 target element.

    The Auto Map Preferences dialog is displayed.

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

  10. 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_proc17.gif

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

    Save All icon
    Description of the illustration med_out_proc18.gif

    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, LOCATION_Invoke), select Deploy, and then click LOCATION_Invoke.

    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 dialog is displayed.

  6. Select a target SOA server and click Next.

    The Summary page is displayed.

    Summary pane
    Description of the illustration med_out_deploy5.gif

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

    The process is deployed successfully.

    SOA Log tab
    Description of the illustration med_out_deploy6.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 by using the following URL:

    http://localhost:7001/em
    
  2. Expand your domain in the left pane followed by the SOA folder.

    Oracle Enterprise Manager console
    Description of the illustration med_out_test1.gif

  3. Select an available project (for example, PSoft_Outbound_LOCATION_Mediator).

    Test button
    Description of the illustration med_out_test2.gif

  4. Click Test in the right pane.

    The Test Web Service page is displayed.

    Test Web Service pane
    Description of the illustration med_out_test3.gif

  5. Click the Request tab.

  6. Scroll down to the Input Arguments section.

    Request tab
    Description of the illustration bpel_out_test3.gif

  7. Select XML View from the list in the upper-left corner.

  8. Provide an appropriate input XML document in the Input Arguments area.

    For example:

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body xmlns:ci="urn:iwaysoftware:adapter:peoplesoft:location:ci:request"><ci:PS8>  <ci:component perform="browse">LOCATION</ci:component>  <ci:key name="SETID">SHARE</ci:key>  <ci:key name="LOCATION">ALBERTA</ci:key></ci:PS8></soap:Body></soap:Envelope>
    
  9. Click Test Web Service.

    The output response is received in the Response tab of the Oracle Enterprise Manager console.

    Response tab
    Description of the illustration bpel_out_test4.gif

Configuring a Mediator Inbound Process

The following example describes how to configure a Mediator inbound process to your PeopleSoft 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 a New SOA Application for the Inbound Mediator Process

Perform the following steps to create a new SOA application for the inbound Mediator process:

  1. Open Oracle JDeveloper on your system.

  2. In the Application Navigator tab, click New Application.

    Application Navigator tab
    Description of the illustration bpel_out_comp1.gif

    The Create SOA Application wizard is displayed.

    Create SOA Application wizard
    Description of the illustration med_in_comp1.gif

  3. From the Application Template list, click SOA Application.

  4. Enter name for the new SOA application (for example, PSoft_Inbound_Mediator) and click Next.

    The Name your project page is displayed.

    Name your project pane
    Description of the illustration med_in_comp2.gif

  5. Enter a project name (for example, LOCATION_SYNC_Receive) and click Next.

    The Configure SOA settings page is displayed.

    Configure SOA settings pane
    Description of the illustration med_in_comp3.gif

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

    Application Navigator tab
    Description of the illustration med_in_comp4.gif

    The new SOA application (PSoft_Inbound_Mediator) and associated project (LOCATION_SYNC_Receive) are added to the Application Navigator tab in the left pane.

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 Component Palette tab (Service Adapters section) to the Exposed Services pane.

    Exposed Services pane
    Description of the illustration bpel_in_adapt1.gif

    The Create Third Party Adapter Service dialog is displayed.

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

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

  3. Ensure that Service is selected from the Type 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_in_adapt3.gif

  5. Browse and select an inbound WSDL file (for example, LOCATION_SYNC.VERSION_1_receive.wsdl) 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 bpel_in_adapt4.gif

  7. Click OK.

    The inbound WSDL file and associated receive/request XML 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 bpel_in_adapt5.gif

  8. Click the Find JCA Files 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_in_adapt6.gif

  9. Browse and select the JCA properties file (for example, LOCATION_SYNC.VERSION_1_receive.jca)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_in_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_in_adapt8.gif

  12. Click OK.

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

    Exposed Services pane
    Description of the illustration bpel_in_adapt9.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 component from the Component Palette tab (Service Components section) 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, LOCATION_SYNC_Mediator).

  3. From the Template 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 Welcome page.

    Adapter Configuration Wizard
    Description of the illustration med_in_proc4.gif

  6. Click Next.

    The Service Name page is displayed.

    Service Name pane
    Description of the illustration med_in_proc5.gif

  7. 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_proc6.gif

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

  9. Click Next.

    The Operation page is displayed.

    Operation pane
    Description of the illustration med_in_proc7.gif

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

  11. Click Next.

    The File Configuration page is displayed.

    File Configuration pane
    Description of the illustration med_in_proc8.gif

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

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

  14. Click Next.

    The Messages page is displayed.

    Messages pane
    Description of the illustration med_in_proc9.gif

  15. Click browse for schema file, 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_proc10.gif

  16. Expand Project WSDL Files, LOCATION_SYNC.VERSION_1_receive.wsdl, Inline Schemas, and schema.

  17. Select the available schema (for example, LOCATION_SYNC)

  18. Click OK.

    You are returned to the Messages page.

    Messages pane
    Description of the illustration med_in_proc11.gif

  19. Click Next.

    The Finish page is displayed.

    Finish pane
    Description of the illustration med_in_proc12.gif

  20. Click Finish.

  21. 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_proc13.gif

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

    Oracle JDeveloper workspace area
    Description of the illustration med_in_proc14.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 pane.

    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 Select an existing mapper file or create a new one 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 LOCATION_SYNC_To_LOCATION_SYNC.xsl tab is displayed.

    LOCATION_SYNC_To_LOCATION_SYNC.xsl tab
    Description of the illustration med_in_route4.gif

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

    The Auto Map Preferences dialog is displayed.

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

  5. Retain the default values and click OK.

    The mapping is now complete.

    completed mapping
    Description of the illustration med_in_route6.gif

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

    Save All icon
    Description of the illustration med_in_route7.gif

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

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