Skip Headers
Oracle® Fusion Middleware Application Adapter for SAP R/3 (SAP JCo 3.0) User's Guide for Oracle WebLogic Server
11g Release 1 (11.1.1.4.0)

Part Number E17656-04
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

6 Integration With BPEL Service Components in the Oracle SOA Suite

Oracle Application Adapter for SAP R/3 integrates seamlessly with Business Process Execution Language (BPEL) Process Manager to facilitate Web service integration. Oracle BPEL Process Manager is based on the Service-Oriented Architecture (SOA). It consumes adapter services exposed as Web Service Definition Language (WSDL) documents.

This chapter contains the following topics:

Overview

To integrate with Oracle BPEL Process Manager, Oracle Application Adapter for SAP R/3 must be deployed in the same WLS container as Oracle BPEL Process Manager. The underlying adapter services must be exposed as WSDL files, which are generated during design time in Oracle Adapter Application Explorer (Application Explorer) for both request-response (outbound) and event notification (inbound) services of the adapter. For more information, see "Generating WSDL (J2CA Configurations Only)".

The generated WSDL files are used to design the appropriate BPEL processes for inbound or outbound adapter services. A completed BPEL process must be successfully compiled in JDeveloper and deployed to a BPEL server. Upon deployment to the BPEL server, every newly built process is automatically deployed to the Oracle Enterprise Manager console, where you run, monitor, and administer BPEL processes, and listen to adapter events.

Deployment of Adapter

During installation, Oracle Application Adapter for SAP R/3 is deployed as a J2CA 1.0 resource adapter within the WLS container. The adapter must be deployed in the same WLS container as Oracle BPEL Process Manager.

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, as shown in Figure 6-1.

    Figure 6-1 Application Server Navigator

    Oracle JDeveloper View menu
    Description of "Figure 6-1 Application Server Navigator"

    The Application Server tab is displayed, as shown in Figure 6-2.

    Figure 6-2 Application Server Tab

    Application Server tab
    Description of "Figure 6-2 Application Server Tab"

  3. Right-click Application Servers and select New Application Server.

    The Create Application Server Connection Wizard is displayed, as shown in Figure 6-3.

    Figure 6-3 Create Application Server Connection Wizard

    Create Application Server Connection Wizard
    Description of "Figure 6-3 Create Application Server Connection Wizard"

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

    The Name and Type page is displayed, as shown in Figure 6-4.

    Figure 6-4 Name and Type Page

    Name and Type pane
    Description of "Figure 6-4 Name and Type Page"

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

    The Authentication page is displayed, as shown in Figure 6-5.

    Figure 6-5 Authentication Page

    Authentication pane
    Description of "Figure 6-5 Authentication Page"

  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, as shown in Figure 6-6.

    Figure 6-6 Configuration Page

    Configuration pane
    Description of "Figure 6-6 Configuration Page"

  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, as shown in Figure 6-7.

  10. Click Test Connection.

  11. Make sure that the test status is successful.

  12. Click Next.

    The Finish page is displayed, as shown in Figure 6-8.

  13. Click Finish.

    The new Application Server connection is listed in the left pane (Application Server tab), as shown in Figure 6-9.

    Figure 6-9 New Application Server Connection

    Application Server tab
    Description of "Figure 6-9 New Application Server Connection"

Designing an Outbound BPEL Process for Service Integration

The following tools are required to complete your outbound design-time configuration:

Note:

The examples in this chapter demonstrate the use of JDeveloper.

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

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

Generating WSDL for Request/Response Service

Perform the following steps to generate a WSDL for request/response service:

  1. Start Application Explorer and connect to a defined MySAP target (a J2CA configuration).

    For more information on defining a target and connecting to SAP R/3, see "Defining a Target to SAP R/3".

  2. Expand the MySAP target to which you are connected.

  3. Expand Remote Function Modules, Financial Accounting, 0002 -- Company Code Business Object, and then select BAPI_COMPANYCODE_GETDETAIL, as shown in Figure 6-10.

    Figure 6-10 Connected MySAP_Target

    Application Explorer
    Description of "Figure 6-10 Connected MySAP_Target"

  4. Right-click the BAPI_COMPANYCODE_GETDETAIL node.

    A menu is displayed, as shown in Figure 6-11.

    Figure 6-11 BAPI_COMPANYCODE_GETDETAIL Node

    BAPI_COMPANYCODE_GETDETAIL node
    Description of "Figure 6-11 BAPI_COMPANYCODE_GETDETAIL Node"

  5. Click Create Outbound JCA Service (Request/Response).

    The Export WSDL dialog is displayed, as shown in Figure 6-12.

    Figure 6-12 Export WSDL Dialog

    Export WSDL dialog box
    Description of "Figure 6-12 Export WSDL Dialog"

  6. Click OK.

You can now create an empty composite for SOA, which is the first step that is required to define a BPEL outbound process in JDeveloper.

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 6-13.

    Figure 6-13 Name Your Application Page

    Name your application pane
    Description of "Figure 6-13 Name Your Application Page"

    The Name your project page is displayed, as shown in Figure 6-14.

    Figure 6-14 Name Your Project Page

    Name your project pane
    Description of "Figure 6-14 Name Your Project Page"

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

    The Configure SOA settings page is displayed, as shown in Figure 6-15.

    Figure 6-15 Configure SOA Settings Page

    Configure SOA settings pane
    Description of "Figure 6-15 Configure SOA Settings Page"

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

Defining a BPEL Outbound Process

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

  1. Configuring a Third Party Adapter Service Component

  2. Configuring an Outbound BPEL Process Component

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 6-16.

    Figure 6-16 Third Party Adapter Component

    External References pane
    Description of "Figure 6-16 Third Party Adapter Component "

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

    Figure 6-17 Create Third Party Adapter Service Dialog

    Create Third Party Adapter Service dialog box
    Description of "Figure 6-17 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 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 6-18.

    Figure 6-18 SOA Resource Browser Dialog

    SOA Resource Browser dialog box
    Description of "Figure 6-18 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 6-19.

    Figure 6-19 Localize Files Dialog

    Localize Files dialog box
    Description of "Figure 6-19 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 6-20.

    Figure 6-20 Create Third Party Adapter Service Dialog

    Create Third Party Adapter Service dialog box
    Description of "Figure 6-20 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 6-21.

    Figure 6-21 SOA Resource Browser Dialog

    SOA Resource Browser dialog box
    Description of "Figure 6-21 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.

    The Copy File message is displayed, as shown in Figure 6-22.

    Figure 6-22 Copy File Message

    Copy File message
    Description of "Figure 6-22 Copy File 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 6-23.

    Figure 6-23 Create Third Party Adapter Service Dialog

    Create Third Party Adapter Service dialog box
    Description of "Figure 6-23 Create Third Party Adapter Service Dialog"

  12. Click OK.

    The third party adapter service component (GetDetail) is created and displayed in the External References pane, as shown in Figure 6-24.

    Figure 6-24 Third Party Adapter Service Component

    External References pane
    Description of "Figure 6-24 Third Party Adapter Service Component"

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

Configuring an Outbound BPEL Process Component

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

  1. Drag and drop the BPEL Process component from the Service Components pane to the Components pane, as shown in Figure 6-25.

    Figure 6-25 BPEL Process Component

    Components pane
    Description of "Figure 6-25 BPEL Process Component"

    The Create BPEL Process dialog is displayed, as shown in Figure 6-26.

    Figure 6-26 Create BPEL Process Dialog

    Create BPEL Process dialog box
    Description of "Figure 6-26 Create BPEL Process Dialog"

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

    By default, the BPEL 1.1 Specification option is selected. The BPEL 2.0 Specification option is also available.

  3. From the Template list, select Synchronous BPEL Process.

  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 6-27.

    Figure 6-27 Type Chooser Dialog

    Type Chooser dialog box
    Description of "Figure 6-27 Type Chooser Dialog"

  5. Expand Project Schema Files, GetDetail_invoke_request.xsd, and select CompanyCode.GetDetail.

  6. Click OK.

    You are returned to the Create BPEL Process dialog, as shown in Figure 6-28.

    Figure 6-28 Create BPEL Process Dialog

    Create BPEL Process dialog box
    Description of "Figure 6-28 Create BPEL Process 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 6-29.

    Figure 6-29 Type Chooser Dialog

    Type Chooser dialog box
    Description of "Figure 6-29 Type Chooser Dialog"

  8. Expand Project Schema Files, GetDetail_invoke_response.xsd, and select CompanyCode.GetDetailResponse.

  9. Click OK.

    You are returned to the Create BPEL Process dialog, as shown in Figure 6-30.

    Figure 6-30 Create BPEL Process Dialog

    Create BPEL Process dialog box
    Description of "Figure 6-30 Create BPEL Process Dialog"

  10. Click OK.

  11. Create a connection between the outbound BPEL process component (cc_ getdetail) and the third party adapter service component (GetDetail), as shown in Figure 6-31.

    Figure 6-31 Created Connection

    Oracle JDeveloper workspace area
    Description of "Figure 6-31 Created Connection"

  12. Double-click the outbound BPEL process component (cc_ getdetail) in the Components pane, as shown in Figure 6-32.

    Figure 6-32 Outbound BPEL Process Component

    Oracle JDeveloper workspace area
    Description of "Figure 6-32 Outbound BPEL Process Component"

  13. Drag and drop the Invoke activity component to the Components pane and place it between the receiveInput activity component and the replyOutput activity component, as shown in Figure 6-33.

    Figure 6-33 Invoke Activity Component

    Oracle JDeveloper workspace area
    Description of "Figure 6-33 Invoke Activity Component"

  14. Create a connection between the new Invoke activity component (Invoke1) and the third party adapter service component (GetDetail), as shown in Figure 6-34.

    Figure 6-34 Created Connection

    Oracle JDeveloper workspace area
    Description of "Figure 6-34 Created Connection"

    The Edit Invoke dialog is displayed, as shown in Figure 6-35.

    Figure 6-35 Edit Invoke Dialog

    Edit Invoke dialog box
    Description of "Figure 6-35 Edit Invoke Dialog"

  15. Click the Plus sign icon, which is located to the right of the Input field to configure a new input variable.

    The Create Variable dialog is displayed, as shown in Figure 6-36.

    Figure 6-36 Create Variable Dialog

    Create Variable dialog box
    Description of "Figure 6-36 Create Variable Dialog"

  16. Accept the default values that are provided for the new input variable and click OK.

    You are returned to the Edit Invoke dialog, as shown in Figure 6-37.

    Figure 6-37 Edit Invoke Dialog

    Edit Invoke dialog box
    Description of "Figure 6-37 Edit Invoke Dialog"

  17. Click the Plus sign icon, which is located to the right of the Output field to configure a new output variable.

    The Create Variable dialog is displayed, as shown in Figure 6-38.

    Figure 6-38 Create Variable Dialog

    Create Variable dialog box
    Description of "Figure 6-38 Create Variable Dialog"

  18. Accept the default values that are provided for the new output variable and click OK.

    You are returned to the Edit Invoke dialog, as shown in Figure 6-39.

    Figure 6-39 Edit Invoke Dialog

    Edit Invoke dialog box
    Description of "Figure 6-39 Edit Invoke Dialog"

  19. Click Apply and then OK.

  20. Drag and drop the Assign activity component to the Components pane and place it between the Receive activity component (receiveInput) and the Invoke activity component (Invoke1), as shown in Figure 6-40.

    Figure 6-40 Assign Activity Component

    Oracle JDeveloper workspace area
    Description of "Figure 6-40 Assign Activity Component"

  21. Double-click the new Assign activity component (Assign1), as shown in Figure 6-41.

    Figure 6-41 Assign Activity Component

    Oracle JDeveloper workspace area
    Description of "Figure 6-41 Assign Activity Component"

    The Edit Assign dialog is displayed, as shown in figure Figure 6-42.

    Figure 6-42 Edit Assign Dialog

    Edit Assign dialog
    Description of "Figure 6-42 Edit Assign Dialog"

  22. In the left pane, under Variables, expand InputVariable, and then select payload.

  23. In the right pane, under Variables, expand Invoke1_GetDetail_InputVariable, and then select input_GetDetail.

  24. Drag and map the payload variable to the input_GetDetail variable as shown in Figure 6-43.

    Figure 6-43 Edit Assign Dialog

    Edit Assign dialog
    Description of "Figure 6-43 Edit Assign Dialog"

    The mapped variables are populated in the highlighted area as shown in Figure 6-44.

    Figure 6-44 Edit Assign Dialog

    Edit Assign dialog
    Description of "Figure 6-44 Edit Assign Dialog"

  25. Click Apply and then OK.

  26. Drag and drop the Assign activity component to the Components pane and place it between the Invoke activity (Invoke1) and the Reply activity (replyOutput), as shown in Figure 6-45.

    Figure 6-45 Assign Activity Component

    Oracle JDeveloper workspace area
    Description of "Figure 6-45 Assign Activity Component"

  27. Double-click the new Assign activity component (Assign2), as shown in Figure 6-46.

    Figure 6-46 New Assign Activity Component

    Oracle JDeveloper workspace area
    Description of "Figure 6-46 New Assign Activity Component"

    The Edit Assign dialog is displayed, as shown in Figure 6-47.

    Figure 6-47 Edit Assign Dialog

    Edit Assign dialog
    Description of "Figure 6-47 Edit Assign Dialog"

  28. In the left pane, under Variables, expand Invoke1_GetDetail_OutputVariable, and then select output_GetDetail.

  29. In the right pane, under Variables, expand outputVariable and select payload.

  30. Drag and map the output_GetDetail variable to the payload variable as shown in Figure 6-48.

    Figure 6-48 Edit Assign Dialog

    Edit Assign dialog
    Description of "Figure 6-48 Edit Assign Dialog"

    The mapped variables are populated in the highlighted area as shown in Figure 6-49.

    Figure 6-49 Edit Assign Dialog

    Edit Assign dialog
    Description of "Figure 6-49 Edit Assign Dialog"

  31. Click Apply and then OK.

    Figure 6-50 Composite.xml File

    Oracle JDeveloper workspace area
    Description of "Figure 6-50 Composite.xml File"

  32. Double-click composite.xml in the left pane, as shown in Figure 6-50.

    Figure 6-51 Save All Icon

    Oracle JDeveloper workspace area
    Description of "Figure 6-51 Save All Icon"

  33. Click the Save All icon in the menu bar to save the new outbound BPEL process component that was configured, as shown in Figure 6-51.

    You are now ready to deploy the BPEL outbound process.

Deploying the BPEL Outbound Process

Perform the following steps to deploy the BPEL outbound process.

  1. Right-click the project name in the left pane (for example, CompanyCode_GD), select Deploy, and then click CompanyCode_GD, as shown in Figure 6-52.

    Figure 6-52 CompanyCode_GD Option

    Deploy context menu
    Description of "Figure 6-52 CompanyCode_GD Option"

    The Deployment Action page is displayed, as shown in Figure 6-53.

    Figure 6-53 Deployment Action Page

    Deployment Action pane
    Description of "Figure 6-53 Deployment Action Page"

  2. Ensure that Deploy to Application Server is selected.

  3. Click Next.

    The Deploy Configuration page is displayed, as shown in Figure 6-54.

    Figure 6-54 Deploy Configurations Page

    Deploy Configuration pane
    Description of "Figure 6-54 Deploy Configurations Page"

  4. Leave the default values selected and click Next.

    The Select Server page is displayed, as shown in Figure 6-55.

    Figure 6-55 Select Server Page

    Select Server pane
    Description of "Figure 6-55 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 6-56.

    Figure 6-56 SOA Servers Page

    SOA Servers pane
    Description of "Figure 6-56 SOA Servers Page"

  6. Select a target SOA server and click Next.

    The Summary page is displayed, as shown in Figure 6-57.

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

    The process is deployed successfully, as shown in Figure 6-58.

    Figure 6-58 Successful Deployment Message

    Authorization Request dialog box
    Description of "Figure 6-58 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 6-59.

    Figure 6-59 Oracle Enterprise Manager Console

    Oracle Enterprise Manager console
    Description of "Figure 6-59 Oracle Enterprise Manager Console"

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

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

  4. Click Test, as shown in Figure 6-60.

  5. Click the Request tab, as shown in Figure 6-61.

  6. Provide an appropriate input value in the Value field and click Test Web Service.

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

    Figure 6-62 Output Response

    Response tab
    Description of "Figure 6-62 Output Response"

    Perform the following steps to invoke the input XML document using XML View:

    1. Select XML View from the list, as shown in Figure 6-63.

      Figure 6-63 Input Arguments List

      Input Arguments section
      Description of "Figure 6-63 Input Arguments List"

    2. Provide an appropriate input XML document 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 6-64.

      Figure 6-64 Received Output Response

      Response tab
      Description of "Figure 6-64 Received Output Response"

Testing Outbound BPEL and Mediator Processes

When testing an outbound BPEL process or an outbound Mediator process from the Oracle Enterprise Manager console, do not use the XML envelopes that are generated by these consoles. Instead, remove them and use the XML payloads that are generated from the schemas, which conform to the WSDLs for namespace qualifications.

The Mediator data flows can be tested using the Enterprise Manager console. When creating a Mediator data flow and interactions, the Web services are created and registered with the Oracle Application Server. For more information on creating a Mediator outbound process, see Chapter 7, "Integration With Mediator Service Components in the Oracle SOA Suite".

Designing an Inbound BPEL Process for Event Integration

This section demonstrates how Oracle Application Adapter for SAP R/3 integrates with SAP R/3 to receive event data. In this example, an SAP R/3 event occurs when a customer record is added to a SAP R/3 system.

The following tools are required to complete your adapter design-time configuration:

Note:

The examples in this chapter demonstrate the use of JDeveloper.

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

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

Generating WSDL for Event Integration

You must create a separate channel for every inbound J2CA service and select that channel when you generate WSDL for inbound interaction using Application Explorer.

Note:

If two or more events share the same channel, then event messages may not be delivered to the right BPEL process.

Creating a Channel

To create a channel:

  1. Start Application Explorer and connect to a J2CA configuration.

  2. In the left pane, expand the Events node.

  3. Expand the MySAP node.

    The Ports and Channels nodes appear in the left pane, as shown in Figure 6-65.

    Figure 6-65 MySAP Channel Node

    add channel
    Description of "Figure 6-65 MySAP Channel Node"

  4. Right-click Channels and select Add Channel.

    The Add Channel dialog is displayed, as shown in Figure 6-66.

    Figure 6-66 Add Channel Dialog

    Add Channel dialog box
    Description of "Figure 6-66 Add Channel Dialog"

    Perform the following steps:

    1. Enter a name for the channel, for example, SAP_Channel.

    2. Enter a brief description (optional).

    3. From the Protocol list, select Application Server - mySAP.

  5. Click Next.

    The Application Server dialog is displayed, as shown in Figure 6-67. The following tabs are available:

    • User (Required)

    • System (Required)

    • Security

    • Advanced

    Figure 6-67 Application Server Dialog

    Application Server dialog box
    Description of "Figure 6-67 Application Server Dialog"

  6. For the User tab, enter the appropriate information for your SAP R/3 channel based on the information in the following table.

    Table 6-1 User Tab Parameters

    Target Parameter Description

    Client

    The client number defined for the SAP R/3 application for client communications.

    User

    A valid user ID for the SAP R/3 application.

    Password

    A valid password for the SAP R/3 application.

    Authentication Mode

    The authentication mode you want to use when connecting to your SAP R/3 system. By default, Password is selected from the list.


  7. Click the System tab, as shown in Figure 6-68.

  8. For the System tab, enter the appropriate information for your SAP R/3 channel based on the information in the following table.

    Table 6-2 System Tab Parameters

    Target Parameter Description

    Gateway host

    A host name for the SAP R/3 Gateway.

    Gateway service

    A service for the SAP R/3 Gateway.

    Program ID of the server

    An SAP R/3 program ID you want to use for this channel.

    Application Server

    The name of the SAP R/3 application server you are using.

    System Number

    An SAP R/3 system number.


  9. For the Security tab (optional), enter the appropriate information for your SAP R/3 channel based on the information in the following table.

    Table 6-3 Security Tab Parameters

    Target Parameter Description

    SNC mode

    By default, SNC is disabled. To enable SNC, select 1 from the list.

    SNC partner

    Enter the name of the RFC server or message server (load balancing) that provides the SNC services.

    SNC level

    From the list select the version of the SNC library.

    SNC name

    Enter the name of the SNC library you are using.

    SNC library path

    Enter the path to the SNC library.


  10. For the Advanced tab (optional), enter the appropriate information for your SAP R/3 channel based on the information in the following table.

    Table 6-4 Advanced Tab Parameters

    Target Parameter Description

    IDOC Format

    Select an IDOC type from the list:

    • XML (default)

    • XML-CDATA-ENVELOPED

    • NATIVE IDOC

    IDOC release

    The IDOC versioning you want to use for your connection.

    IDOC release provider

    The IDOC release provider for your connection. Select IDOC DOCREL field (default), SAP release, or user input from the list.

    SAP trace

    Select this option to enable SAP traces.

    The SAP traces are stored in the following locations during design time and run time:

    Design Time:

    <ADAPTER_HOME>\soa\thirdparty\ApplicationAdapters\tools\iwae\bin
    

    Run Time:

    <ADAPTER_HOME>\user_projects\domains\base_domain
    

    The file name formats that are used for the SAP traces are as follows (for design time and run time):

    • rfc02664_04332.trc

    • JCO100226_043846994.trc

    Processing Mode

    Select the type of synchronous processing from the list. Possible values include REQUEST and REQUEST_RESPONSE.


  11. Click OK.

    The channel appears under the channels node in the left pane. An X over the icon indicates that the channel is currently disconnected.

    Note:

    Do not start the channel, as it is managed by BPEL PM Server. If you start the channel for testing and debugging purposes, then stop it before run-time.

Generating WSDL for Event Notification

After you create a channel and verify that it is not started, you must generate WSDL for the event using Application Explorer.

  1. Start Application Explorer.

  2. Expand the Adapters node.

    A list of all adapters is displayed, as shown in Figure 6-69.

    Figure 6-69 Adapters Node

    Expanded adapter list
    Description of "Figure 6-69 Adapters Node"

    Perform the following steps:

    1. Expand the MySAP node.

      A list of your available targets is displayed, as shown in Figure 6-70.

      Figure 6-70 Disconnected MySAP Target Node

      Disconnected SAPTarget node
      Description of "Figure 6-70 Disconnected MySAP Target Node"

    2. Click a target name under the MySAP node, for example, SAPTarget..

      The Connection dialog displays the saved parameters.

  3. Verify your connection parameters.

  4. Right-click the target name and select Connect.

    The x icon disappears, indicating that the node is connected, as shown in Figure 6-71.

    Figure 6-71 Connected MySAP Target

    Connected SAP target
    Description of "Figure 6-71 Connected MySAP Target"

  5. Expand the ALE(IDOCs) node and select MATMAS - Material Master.

    The MATMAS list is displayed, as shown in Figure 6-72.

    Figure 6-72 MATMAS Material Master List

    Select Matmas
    Description of "Figure 6-72 MATMAS Material Master List"

  6. Right-click MATMAS01 from the MATMAS list.

    Figure 6-73 Create Inbound JCA Service (Event) Option

    Create Inbound JCA Service
    Description of "Figure 6-73 Create Inbound JCA Service (Event) Option"

  7. Select Create Inbound JCA Service (Event), as shown in Figure 6-73.

    The Export WSDL dialog is displayed, as shown in Figure 6-74.

    Figure 6-74 Export WSDL Dialog

    Export WSDL dialog box
    Description of "Figure 6-74 Export WSDL Dialog"

    Perform the following steps:

    1. In the Name field, specify a name for the WSDL file.

    2. From the Channel list, select the channel you created for this inbound service.

      Important: You must create a separate channel for every event. Verify that the channel is stopped before run-time.

    3. Three check boxes for Root, Namespace, and Schema validation are also available. Selection of multiple validation options is allowed.

      - Root validation is used to validate the root element in the inbound XML document.

      - Namespace validation is used to validate the namespace in the inbound XML document.

      - Schema validation is used to validate the inbound XML document with the schema in the WSDL document.

      During run time, validation is processed based on the validation options that are selected. If multiple validation options are selected, then during run time if the first validation option fails, the remaining validation options are not processed. Root and namespace validations are considered modest levels of validation. Schema validation is a stricter validation level. It is recommended to use root and namespace validation options, unless the root element and namespace are different between the IDOCs in the SAP environment.

  8. Click OK.

    You can now create an empty composite for SOA, which is the first step that is required to define a BPEL inbound process in JDeveloper.

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 6-75.

    Figure 6-75 Name Your Application Page

    Name your application pane
    Description of "Figure 6-75 Name Your Application Page"

    The Name your project page is displayed, as shown in Figure 6-76.

    Figure 6-76 Name Your Project Page

    Name your project pane
    Description of "Figure 6-76 Name Your Project Page"

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

    The Configure SOA settings page is displayed, as shown in Figure 6-77.

    Figure 6-77 Configure SOA Settings Page

    Configure SOA settings pane
    Description of "Figure 6-77 Configure SOA Settings Page"

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

Defining a BPEL Inbound Process

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

  1. Configuring a Third Party Adapter Service Component

  2. Configuring an Inbound BPEL Process Component

Creating 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 6-78.

    Figure 6-78 Third Party Adapter Component

    Exposed Services pane
    Description of "Figure 6-78 Third Party Adapter Component"

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

    Figure 6-79 Create Third Party Adapter Service Dialog

    Create Third Party Adapter Service dialog box
    Description of "Figure 6-79 Create Third Party Adapter Service Dialog"

  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, as shown in Figure 6-80.

    Figure 6-80 SOA Resource Browser Dialog

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

  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 6-81.

    Figure 6-81 Localize Files Dialog

    Localize Files dialog box
    Description of "Figure 6-81 Localize Files Dialog"

  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, as shown in Figure 6-82.

    Figure 6-82 Create Third Party Adapter Service Dialog

    Create Third Party Adapter Service dialog box
    Description of "Figure 6-82 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 6-83.

    Figure 6-83 SOA Resource Browser Dialog

    SOA Resource Browser dialog box
    Description of "Figure 6-83 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 message is displayed, as shown in Figure 6-84.

    Figure 6-84 Copy File Confirmation Message

    Copy File message
    Description of "Figure 6-84 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 6-85.

    Figure 6-85 Create Third Party Adapter Service Dialog

    Create Third Party Adapter Service dialog box
    Description of "Figure 6-85 Create Third Party Adapter Service Dialog"

  12. Click OK.

    The third party adapter service component (matmas) is created and displayed in the Exposed Services pane, as shown in Figure 6-86.

    Figure 6-86 Third Party Adapter Service Component

    Exposed Services pane
    Description of "Figure 6-86 Third Party Adapter Service Component"

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

Creating an Inbound BPEL Process Component

Perform the following steps to create an inbound BPEL process component:

  1. Drag and drop the BPEL Process component from the Service Components pane to the Components pane, as shown in Figure 6-87.

    Figure 6-87 BPEL Process Component

    Components pane
    Description of "Figure 6-87 BPEL Process Component"

    The Create BPEL Process dialog is displayed, as shown in Figure 6-88.

    Figure 6-88 Create BPEL Process Dialog

    Create BPEL Process dialog box
    Description of "Figure 6-88 Create BPEL Process Dialog"

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

    By default, the BPEL 1.1 Specification option is selected. The BPEL 2.0 Specification option is also available.

  3. From the Template list, select Base on a WSDL.

  4. Uncheck the Expose as SOAP service check box.

  5. 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 6-89.

    Figure 6-89 SOA Resource Browser Dialog

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

  6. Select an inbound WSDL file from the following directory:

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

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

    Figure 6-90 Localize Files Dialog

    Localize Files dialog
    Description of "Figure 6-90 Localize Files Dialog"

  8. Uncheck the Rename duplicate files option.

  9. Click OK.

    You are returned to the Create BPEL Process dialog, as shown in Figure 6-91.

    Figure 6-91 Create BPEL Process Dialog

    Create BPEL Process dialog box
    Description of "Figure 6-91 Create BPEL Process Dialog"

  10. Click OK.

    Figure 6-92 Created Connection

    Oracle JDeveloper workspace area
    Description of "Figure 6-92 Created Connection"

  11. Create a connection between the third party adapter service component (matmas) and the inbound BPEL process component (matmas_inbound), as shown in Figure 6-92.

  12. Double-click composite.xml in the left pane.

    Figure 6-93 Save All Icon

    Save All icon
    Description of "Figure 6-93 Save All Icon"

  13. Click the Save All icon in the menu bar to save the new inbound BPEL process component that was configured, as shown in Figure 6-93.

    You are now ready to deploy the BPEL inbound process.

Deploying the BPEL Inbound Process

Perform the following steps to deploy the BPEL inbound process.

  1. Right-click the project name in the left pane (for example, matmas01), select Deploy, and click matmas01, as shown in Figure 6-94.

    Figure 6-94 Matmas01 Option

    Deploy context menu
    Description of "Figure 6-94 Matmas01 Option"

    The Deployment Action page is displayed, as shown in Figure 6-95.

    Figure 6-95 Deployment Action Page

    Deployment Action pane
    Description of "Figure 6-95 Deployment Action Page"

  2. Ensure that Deploy to Application Server is selected.

  3. Click Next.

    The Deploy Configuration page is displayed, as shown in Figure 6-96.

    Figure 6-96 Deploy Configuration Page

    Deploy Configuration pane
    Description of "Figure 6-96 Deploy Configuration Page"

  4. Leave the default values selected and click Next.

    The Select Server page is displayed, as shown in Figure 6-97.

    Figure 6-97 Select Server Page

    Select Server pane
    Description of "Figure 6-97 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 6-98.

    Figure 6-98 SOA Servers Page

    SOA Servers pane
    Description of "Figure 6-98 SOA Servers Page"

  6. Select a target SOA server and click Next.

    The Summary page is displayed, as shown in Figure 6-99.

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

    The process is deployed successfully, as shown in Figure 6-100.

    Figure 6-100 Successful Deployment Message

    Authorization Request dialog box
    Description of "Figure 6-100 Successful Deployment Message"

    Once event messages are triggered through SAP GUI, successful instances are received in the Oracle Enterprise Manager console, as shown in Figure 6-101.

    Figure 6-101 Received Instances

    Oracle Enterprise Manager console
    Description of "Figure 6-101 Received Instances"

Triggering an Event in SAP R/3

Events are generated by activity in an application system. For example, SAP R/3 may generate an event as customer information is updated in the system. For more information on events, see "Configuring an Event Adapter".

The following topics describe how to trigger an event in SAP R/3 and verify event integration using Oracle Application Adapter for SAP R/3.

To trigger an event in SAP R/3:

  1. Start the SAP Workbench and log in to the SAP R/3 system, as shown in Figure 6-102.

    Figure 6-102 SAP Workbench

    SAP Workbench
    Description of "Figure 6-102 SAP Workbench"

  2. Run the bd10 transaction.

    Figure 6-103 Send Material Window

    Send Customers
    Description of "Figure 6-103 Send Material Window"

    Enter the following information in the Send Material window:

    1. In the Material field, enter a material number with a range from 1 to 100, as shown in Figure 6-103.

    2. In the Logical system field, specify the logical system you are using with SAP R/3.

  3. Click the Execute button.

    Material master data is sent to the logical system specified. If a channel in Application Explorer defined the Program ID with the same value, then the channel receives this material master data from SAP R/3.

Verifying the Results

To verify your results:

  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.

  3. Select an available inbound BPEL process (for example, matmas01), as shown in Figure 6-104.

    Figure 6-104 Available Inbound BPEL Process

    Description of Figure 6-104 follows
    Description of "Figure 6-104 Available Inbound BPEL Process"

  4. Click the Instances tab.

    Recently received run-time event messages are displayed in the Instances tab, as shown in Figure 6-105.

    Figure 6-105 Instances Tab

    Description of Figure 6-105 follows
    Description of "Figure 6-105 Instances Tab"

  5. Click the Instance ID to view the received event message.