Skip Headers
Oracle® Application Server Adapter for J.D. Edwards OneWorld User's Guide
10g Release 2 (10.1.2)
B14059-02
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

6 InterConnect Integration Examples

This chapter contains the following examples:

Prerequisites

The following components must be configured:


See Also:

Oracle Application Server Adapters Installation Guide

Configuration Steps

The examples present all the configuration steps necessary for demonstrating service and event integration with J.D. Edwards. The following cross references are given to identify where more information can be obtained.

  1. Configure the OracleAS Adapter for J.D. Edwards OneWorld for services and events. See Chapter 2, "Configuring OracleAS Adapter for J.D. Edwards One World" for more information.

  2. Configure OracleAS Integration InterConnect iStudio for service and event interactions. For more information, see the following service and event steps.

J.D. Edwards OneWorld Service Integration

This topic illustrates J.D. Edwards service integration. The procedures describe design time and runtime.

OracleAS Integration InterConnect Design Time

The following procedures describe how to start the repository and create a common view and then, invoke and implement a procedure.

Starting the Repository

To start the repository, double-click the start.bat file located in the following directory:

OracleAS_home\repository\start.bat

Where OracleAS_home is the directory where Oracle Application Server is installed.

Creating a Common View

To create a Common View:

  1. Start Oracle iStudio.

    Oracle iStudio with Design tab
    Description of the illustration new_proj.gif

  2. Open a new project.

  3. Open Common Views and Business Objects.

  4. Create a Business Object called JDEAddressFL and a new procedure under GetEAddress.


    Note:

    The procedure name must be the root element of the DTD generated from Application Explorer. In this example, the root element in the DTD is GetEAddress.

    The Create Procedure window is displayed.

Create event
Description of the illustration image004.gif

  1. Click Import and select XML from the list.

  2. Open the DTD generated from Application Explorer.

    Click OK.

    The Choose Import Type dialog box is displayed.

  3. Choose the IN arguments radio button, and click OK.

  4. Select jdeRequest.

    Ensure your parameters are similar to Figure 6-1 for both the In and Out parameters.

    Figure 6-1 In and Out Parameters

    Edit event
    Description of "Figure 6-1 In and Out Parameters"

  5. Click Save.

Invoking a Procedure

To invoke a procedure:

  1. Create a new application called DBAPP.

  2. Right-click Invoked Procedures and select New.

    The Invoke Wizard - Select a Procedure dialog box is displayed.

    Select event
    Description of the illustration image007.gif

  3. From the Message Type list, select DATABASE.

  4. As the procedure, choose GetEAddress under JDEAddressFL.

  5. Click Import and select Common View.

    The structure is loaded as follows. Because this is a request and response, ensure that Synchronous is selected.

    Common View
    Description of the illustration commviewatts.gif

  6. Click Next, and then New to create a mapping between the Common View and the Application View for the In parameters.

    Mapping Parameters
    Description of the illustration mapparms.gif

    In this case, the Application View and the Common View have the same structure and can be mapped using the ObjectCopy transformation.

  7. Click Apply and then OK.

    The second Mapping Parameters dialog box is displayed.

    Mapping Parameters dialog box
    Description of the illustration mapparms2.gif

  8. Click Apply and then OK.

  9. The Define Stored Procedures dialog box is displayed.

    Defines Stored Procedures dialog box
    Description of the illustration definesp.gif

    Some SQL code is automatically generated.

  10. Click Finish.

Implementing a Procedure

In this implemented procedure, a new application called JDEAddressBook is created.

  1. Create a new application named JDEAddressBook.

  2. Expand the application and right-click Implemented Procedure.

  3. To create an implemented procedure, select New.

    Creating a new implemented procedure
    Description of the illustration selectproc.gif

  4. Select Generic as the message type.

  5. Expand JDEAddressFL and select GetEAddress.

  6. Click Next.

  7. Click Import and select XML.

  8. Navigate to the location of the request and response DTDs generated by Application Explorer and import both into iStudio.

    Select JDE Request
    Description of the illustration jdereqroot.gif

  9. Select jdeRequest as the root element of the DTD.

  10. Choose the IN arguments option button, and click OK.

    The Implement Wizard - Define Application View window is displayed.

    Choose Root Element dialog box
    Description of the illustration image016.gif

  11. Click Import, then click Next.

    The Choose Root Element Dialog pane is displayed.

    Select root element
    Description of the illustration image017.gif

  12. Choose jdeResponse and click Next.

    The Choose Import Type dialog box is displayed.

    Choose Import Type dialog box
    Description of the illustration image018.gif

  13. Select OUT arguments, and click Next.

    The Define Application View window is displayed.

    Define Application View dialog box
    Description of the illustration image019.gif

  14. Click Next.

    The Mapping Parameters window is displayed.

    Mapping Parameters
    Description of the illustration image020.gif

    In this example, the Application View and Common View have the same structure. All the attributes can be mapped by using the ObjectCopy transformation.

  15. Select Copy Fields in the Transformations field, and click OK.

    The Define Mapping:IN Arguments window is displayed.

    Mapping Parameters
    Description of the illustration image021.gif

  16. Click Next.

    The Mapping Parameters window is displayed for the OUT parameters.

    Define Application View
    Description of the illustration image022.gif

  17. Ensure Copy Fields is selected in the Transformation field, then click OK.

    The Define Mapping:OUT arguments window is displayed.

    Implement Wizard
    Description of the illustration image023.gif

  18. Click Next, then Finish.

    The application definition for annvoked procedure is now complete.

Exporting PL/SQL Code from iStudio

You must export the PL/SQL code created in "Invoking a Procedure" and execute it against the appropriate schema. In this example, the schema used is DBAPP_JDEAddressFL.

To export PL/SQL code from iStudio:

File menu - Export PL/SQL selected
Description of the illustration image024.gif

  1. In iStudio, click File and Export PL/SQL.

    The Export Application dialog box is displayed.

    Export Application dialog box
    Description of the illustration image025.gif

    Perform the following steps:

    1. Select the application from which to export PL/SQL.

    2. Type or browse to the file prefix (path to the application).

  2. Click OK.

    In this example, two SQL scripts are created:

    • DBAPP_JDEAddressFLTYPES.sql

    • DBAPP_JDEAddressFL.sql

  3. Log on to the database with the appropriate privileges (in this example, DBAPP_JDEAddress) and execute the following in the order given:

    • DBAPP_JDEAddressFLTypes.sql

    • DBAPP_JDEAddressFL.sql

  4. Create another stored procedure, JDEADDRESSFL_EXE, in the same schema. It executes at runtime to create the database message that is sent to the hub.

CREATE OR REPLACE  PROCEDURE "DBAPP"."JDEADDRESSFL_EXE" (
servicename LONG,
methodname  LONG,
license     LONG,
customerid  LONG
)
AS
  moid NUMBER;
  aoid NUMBER;
  coid NUMBER;
  businessname LONG;
  address LONG;
  city LONG;
  state LONG;
  phone LONG;
  country LONG;
  detailid NUMBER;
BEGIN
  JDEAddressFL.crMsg_GetEAdress_OAI_V1(moid, aoid);
  jdeid := JDEAddressFL.cr_jdeRequest_jdeRequest
(servicename,methodname,license,username,sessionidle, calltype, sessionid, environment, pwd, callmethod, moid,aoid);
  coid := JDEAddressFL.inv_GetEAddress_OAI_V1(moid,'DBAPP','',customername,street,city,state,zipcode);
COMMIT;
END;

Edit Adapter.ini

Add the following two lines to adapter.ini for the Oracle Application Server Adapter for J.D. Edwards OneWorld:

//Bridge Class
bridge_class=com.iwaysoftware.iwbridge.IWBridge

//IBSE URL
ibse_url=http://hostname:port/ibse/IBSEServlet/XDSOAPRouter

Where hostname is the URL of the server and port is the port number.

OracleAS Integration InterConnect Runtime

The following topic describes how to verify service integration using the OracleAS Adapter for J.D. Edwards OneWorld.

Verifying Service Integration

To verify service integration:

  1. Start Oracle Application Server or ensure that the server is running.

  2. Restart OC4J, if required, by executing the following command:

    \OracleAS_home\opmn\bin\opmnctl  stopproc process-type=home
    \OracleAS_home\opmn\bin\opmnctl  startproc process-type=home
    
    
  3. Check the status of OC4J by executing the following command:

    \OracleAS_home\opmn\bin\opmnctl  status
    
    

    The expected output is a list of the processes in the instance, as in the following:

    iAS-component Process-type PID Status
    DSA DSA N/A Down
    HTTP_Server HTTP_Server 1592 Alive
    LogLoader logloaderd N/A Down
    dcm-daemon dcm-daemon 3016 Alive
    OC4J home 3496 Alive
    WebCache WebCache 1800 Alive
    WebCache WebCacheAdmin 1804 Alive

  4. Invoke and implement the adapter by executing the following commands:

    \InterConnect_HOME\oai\9.0.4\adapters\JDEAddressBook_FL\start.bat
    \InterConnect_HOME\oai\9.0.4\adapters\DBAPP\start.bat
    
    
  5. Log on to SQL*Plus with DBAPP and execute the following command:

    exec
    jdeaddressfl_exe
    ('GetEffectiveAddress','GetEffectiveAddress','test','JDE',"'callmethod',"'DV7333','JDE','GetEffectiveAddress','4242','mnAddressNumber');
    
    

    Figure 6-2 shows the JDEAddress_FL example. It receives a reply from J.D. Edwards OneWorld and returns the reply to the hub.

    Figure 6-2 JDEAddress_FL Test Results

    SapCompanyCode_FL in a command window
    Description of "Figure 6-2 JDEAddress_FL Test Results"

    Figure 6-3 shows the DBAPP example. It receives a reply from the hub and writes the data to the database table.

    Figure 6-3 DBAPP Test Results

    DBAPP_SAP in command window
    Description of "Figure 6-3 DBAPP Test Results"

J.D. Edwards OneWorld Event Integration

This topic and the example illustrate how the OracleAS Adapter for J.D. Edwards OneWorld integrates with J.D. Edwards OneWorld to receive event data. The procedures describe design time and runtime. In the example, a JDE event occurs as a result of a sales order event in the J.D. Edwards OneWorld system. The adapter receives the J.D. Edwards OneWorld event customer data and disposes the data to an RMI event port. The RMI server resides on the OracleAS Integration InterConnect Hub. An OracleAS Database Adapter on the OracleAS Integration InterConnect Hub subscribed to this event receives the customer data, transforms the event data, and then inserts the data into a database table. The design time and runtime procedures are outlined in the following sections.

J.D. Edwards Transaction Sales Order

To create a DTD for a J.D. Edwards event, you must:

Creating a Port in Application Explorer

To create a port:

  1. In Application Explorer, expand the JDEdwards node.

  2. Right-click the Ports node, and select Add Port.

    The Edit Port dialog box is displayed.

    Edit Port dialog box
    Description of the illustration editport.gif

  3. Enter a description in the Description field (optional).

  4. Select RMI from the Protocol list.

  5. Enter the URL for the server in the URL field, and click OK.

    The port is created, and shows under the Ports node.

Creating a Channel in Application Explorer

To create a channel:

  1. In Application Explorer, expand the JDEdwards node.

  2. Right-click the Channels node, and select Add Channels.

    The Add Channel dialog box is displayed.

    Add Channel dialog box
    Description of the illustration add_channel_dialog.gif

  3. In the Name field, enter a descriptive name for the channel.

  4. Enter a description in the Description field (optional).

  5. Choose a protocol for your channel from the Protocol list.

  6. In the Available Port(s) field, select the port or ports you wish to associate with the channel, and click the right arrow (>) button. To add all the ports, click the double right arrow button (>>).

  7. Click Next.

    The dialog box for the selected listener is displayed.

    System tab
    Description of the illustration tcp_listener_dialog.gif

  8. Enter the location of the server in the Host field.

  9. Enter the port number of the channel in the Port Number field.

  10. Select the Synchronization type from the Synchronization Type list.

  11. Select Is Length Prefix for events that send data which is not in XML format. The TCP/IP event application must prefix the data with a 4-byte binary length field when writing the data to the TCP/IP port.

  12. Select Is XML for events that send data back in XML format. No preparser is required.

  13. Select Is Keep Alive to maintain a continuous communication between the event transaction and the channel.

  14. Click the preparser tab.

    User tab
    Description of the illustration preparser_tab.gif

    Enter values based on the following table.

    Parameter Description
    User id* A valid user ID for J.D. Edwards OneWorld.
    User password* The password associated with the user ID.
    JDE environment* The J.D. Edwards OneWorld environment, for example, DU7333. For more information about this parameter, see your J.D. Edwards OneWorld documentation or ask your OneWorld system administrator.
    Application XMLInterop or the application name in J.D. Edwards OneWorld. Optional.
    Server IP address* The name of the server on which J.D. Edwards OneWorld is running. This can be the name of the server, for example, JDEOW, or its IP address, for example, 123.45.67.89.
    Server Port* The port number on which the server is listening, for example, 6009.
    Schema style Choose a style from the list.

    Click OK.

    The channel is created and shows under the Channels node.

  15. Start the channel:

    1. Right-click the channel node and select Start.

      The channel you created becomes active.

  16. This triggers an event from the J.D. Edwards system.

  17. Check the BSE log located at:

    OracleAS_HOME\j2ee\home\applications\ws-app-adapter\ibse\ibselogs 
    

    for the XML event message.

Starting the Repository

To start the repository, double-click the start.bat file located in the following directory:

OracleAS_home\repository\start.bat

Where OracleAS_home is the directory where Oracle Application Server is installed.

Creating a Common View

To create a Common View:

  1. Start Oracle iStudio.

    Oracle iStudio with Design tab
    Description of the illustration new_proj.gif

  2. Open a new project.

  3. Open Common Views and Business Objects.

  4. Create a Business Object called JDE and a new event under SalesOrder.

    The Create Event dialog box is displayed.

    Create Event dialog box
    Description of the illustration create_event_dialog.gif

  5. Click Import, then select XML as the import type.

    The Open dialog box is displayed.

    Open dialog box
    Description of the illustration open_dialog.gif

  6. Select the DTD generated from Application Explorer, and click OK.

    The Choose Root Element Dialog pane is displayed.

    Select root element
    Description of the illustration image017.gif

  7. Choose the Root element of the importing DTD, and click OK.

  8. Click Save.

Publishing an Event Using OracleAS Adapter for J.D. Edwards OneWorld

To publish an event:

Publish Wizard - Select an Event dialog box
Description of the illustration publish_wizard1.gif

  1. Create a new application named JDEFL. The application name must be uppercase.

  2. Expand the new JDEFL node.

  3. Right-click Publish Events and select New to create a Publish Event.

    The Publish Wizard - Select an Event dialog box is displayed.

    Publish Wizard - Select an Event dialog box
    Description of the illustration publish_wizard1.gif

  4. From the Message Type list, select XML.

  5. In the Select an Event field, expand the JDE node.

  6. Select SalesOrder as the Event.

  7. Click Next.

    The Publish Wizard - Define Application View dialog box is displayed.

    Publish Wizard - Define Application View dialog box
    Description of the illustration publish_wizard2.gif

  8. Click Import, and select Common View.


    Note:

    If the application message structure is different from the Common View structure, select XML to load an Application-specific schema.

  9. In the Root Element field, enter the root element of the XML message, jdeResponse in this example.

  10. Click Next.

    The Mapping Parameters dialog box is displayed.

  11. Click New to create a mapping between the Common View and Application View. In this example, the Application and Common View have the same structure. All attributes can be mapped using the ObjectCopy Transformation.

  12. Click OK.

  13. Click Finish.

The Application definition for the Publishing Event is now complete.

Runtime

Perform the following steps:

  1. Start Oracle Application Server or ensure that the server is running.

  2. Restart OC4J, if required, by executing the following command:

    \OracleAS_home\opmn\bin\opmnctl  stopproc process-type=home
    \OracleAS_home\opmn\bin\opmnctl  startproc process-type=home
    
    
  3. Check the status of OC4J by executing the following command:

    \OracleAS_home\opmn\bin\opmnctl  status
    
    
  4. In Application Explorer, expand the JDEdwards node.

    Start Channel
    Description of the illustration start_channel.gif

  5. Expand the Channels node.

  6. Right-click the channel you wish to use, and select Start.

  7. Invoke and implement the adapter by executing the following commands:

    OracleAS_home\integration\interconnect\adapters\AQAPP\start.bat
    OracleAS_home\integration\interconnect\adapters\JDEFL\start.bat
    

Triggering an Event in J.D. Edwards OneWorld

To trigger an event in J.D. Edwards OneWorld:

  1. Log in to your J.D. Edwards OneWorld system.

  2. In the Fast Path field of the J.D. Edwards OneWorld Explorer window, type G4211 and press Enter.

    Fast Path field
    Description of the illustration jde_eventtrigger.gif

  3. Right-click Sales Order Detail (P4210).

    Sales Order Detail selected and menu showing
    Description of the illustration jde_eventtrigger2.gif

  4. Select Prompt for > Values.

    The Processing Options dialog box is displayed.

    Processing Options dialog box
    Description of the illustration jde_eventtrigger3.gif

    Perform the following steps:

    1. Click the Interop tab.

    2. In the Transaction Type field, type JDESOOUT.

    3. Verify that the value in the Before/After Image Processing Blank field is 1.

  5. Click OK.

    The Sales Order Detail - (Customer Service Inquiry) window is displayed.

    Sales Order Detail window
    Description of the illustration jde_eventtrigger4.gif

  6. Click the Add icon (third icon from left).

  7. Enter the values as shown in the following screen.

    To move to a different field, use the Tab key on your keyboard.

    The correct order values
    Description of the illustration jde_eventtrigger5.gif

  8. Enter a value for Quantity Ordered and Item Number.

    For example:

    Sample values for Quantity Ordered and Item Number
    Description of the illustration jde_eventtrigger6.gif

  9. Click the first field in the second row and allow a few seconds for processing.

    The second row selected
    Description of the illustration jde_eventtrigger7.gif

  10. Click OK.

Verifying Results

The following topic describes how to verify event integration using the OracleAS Adapter for J.D. Edwards OneWorld.

Publishing Adapter (JDEFL) Log File

Tue Nov 16 18:42:05 GMT-05:00 2004: The message was sent to topic(s) {oai_hub_queue=[AQAPP, DBAPP]}. Processing Time = 25,796 ms.            
<?xml version = '1.0' encoding = 'UTF-8'?>
<!DOCTYPE MSG>
<MSG>
  <H>
     <BO>JDE</BO>
     <EN>SalesOrder</EN>
     <EV>OAI/V1</EV>
     <MV>OAI/V1</MV>
     <T>0</T>
     <SN>JDEFL</SN>
     <SA>JDEFL</SA>
     <SAID>21</SAID>
     <CI>JDEFL1100648500828</CI>
  </H>
  <B>
    <AO N = "SalesOrder_CO">
      <AO N = "jdeResponse">
        <A N = "type">trans</A>
        <A N = "user">jde</A>
        <A N = "xmlns">urn:Schemas-jdedwards-com:trans.response.JDESOOUT</A>
        <A N = "session">212.1100644166.9</A>
        <A N = "environment">DV7333</A>
        <AO N = "transaction">
          <A N = "type">JDESOOUT</A>
          <A N = "action">transactionInfo</A>
          <AO N = "returnCode">
            <A N = "code">0</A>
            <A N = "PCDATA">XML Request OK</A>
          </AO>
          <AO N = "key">
            <AO N = "column">
              <A N = "name">EdiUserId</A>
              <A N = "PCDATA">JDE</A>
            </AO>
            <AO N = "column">
              <A N = "name">EdiBatchNumber</A>
              <A N = "PCDATA">13484</A>
            </AO>
            <AO N = "column">
              <A N = "name">EdiTransactNumber</A>
              <A N = "PCDATA">104336</A>
            </AO>
          </AO>
          <AO N = "table">
            <A N = "name">F4201Z1</A>
            <A N = "type">Header</A>
            <AO N = "column">
              <A N = "name">EdiUserId</A>
              <A N = "PCDATA">JDE</A>
            </AO>
            <AO N = "column">
              <A N = "name">EdiBatchNumber</A>
              <A N = "PCDATA">13484</A>
            </AO>
            <AO N = "column">
              <A N = "name">EdiTransactNumber</A>
              <A N = "PCDATA">104336</A>
            </AO>
            <AO N = "column">
              <A N = "name">EdiLineNumber</A>
              <A N = "PCDATA">1.000</A>
            </AO>
            <AO N = "column">
              <A N = "name">EdiDocumentType</A>
              <A N = "PCDATA">SO</A>
            </AO>
            <AO N = "column">
              <A N = "name">TypeTransaction</A>
              <A N = "PCDATA">JDESOOUT</A>
            </AO>
            <AO N = "column">
              <A N = "name">EdiTranslationFormat</A>
...
Tue Nov 16 18:42:33 GMT-05:00 2004: AQ Adapter: received the message from the Agent and will now write it to AQ.
Tue Nov 16 18:42:33 GMT-05:00 2004: AQ Adapter: created a writer for queue xml_raw_q1.
Tue Nov 16 18:42:34 GMT-05:00 2004: AQ Adapter: successfully converted the OAI message to XML
<?xml version = '1.0' encoding = 'UTF-8' standalone = 'yes'?>
<jdeResponse type="trans" user="jde" xmlns="urn:Schemas-jdedwards-com:trans.response.JDESOOUT" session="212.1100644166.9" environment="DV7333">
   <transaction type="JDESOOUT" action="transactionInfo">
      <returnCode code="0">XML Request OK</returnCode>
      <key>
         <column name="EdiUserId">JDE</column>
         <column name="EdiBatchNumber">13484</column>
         <column name="EdiTransactNumber">104336</column>
      </key>
      <table name="F4201Z1" type="Header">
         <column name="EdiUserId">JDE</column>
         <column name="EdiBatchNumber">13484</column>
         <column name="EdiTransactNumber">104336</column>
         <column name="EdiLineNumber">1.000</column>
         <column name="EdiDocumentType">SO</column>
         <column name="TypeTransaction">JDESOOUT</column>
         <column name="EdiTranslationFormat"></column>
         <column name="EdiTransmissionDate"></column>
         <column name="DirectionIndicator">2</column>
         <column name="EdiDetailLinesProcess">0</column>
         <column name="EdiSuccessfullyProcess">Y</column>
         <column name="TradingPartnerId"></column>
         <column name="TransactionAction">A</column>
         <column name="CompanyKeyOrderNo">00200</column>
         <column name="DocumentOrderInvoiceE">3146</column>
         <column name="OrderType">SO</column>
         <column name="OrderSuffix">000</column>
         <column name="CostCenter">         M30</column>
         <column name="Company">00200</column>
         <column name="CompanyKeyOriginal"></column>
         <column name="OriginalPoSoNumber"></column>
         <column name="OriginalOrderType"></column>
         <column name="CompanyKeyRelated"></column>
         <column name="RelatedPoSoNumber"></column>
         <column name="RelatedOrderType"></column>
         <column name="AddressNumber">4242</column>
         <column name="AddressNumberShipTo">4242</column>
        ...