9 Understanding XML Transaction

This chapter contains the following topics:

9.1 XML Transaction

XML Transaction is XML-based interoperability that runs as a JD Edwards EnterpriseOne kernel process. You also can use XML Transaction with a messaging adapter. XML Transaction interacts with interface tables (Z tables) to update the database or to retrieve data. You can create one XML document that includes both updates to and retrieval of data from JD Edwards EnterpriseOne.

9.2 XML Transaction Update Process

To insert data into JD Edwards EnterpriseOne, you use a formatted XML document. The XML document includes a predefined transaction type, such as JDEOPIN. The XML document identifies one or more JD Edwards EnterpriseOne interface tables and lists all of the data (data type and actual data values) to be updated.

This illustration shows the XML Transaction update process.

Figure 9-1 XML Transaction data update process flow

Description of Figure 9-1 follows
Description of "Figure 9-1 XML Transaction data update process flow"

In summary:

  • A request in the form of an XML document contains a list of the data for a predefined transaction type.

  • XML Transaction parses the XML inbound document and inserts the data into a JD Edwards EnterpriseOne inbound interface table.

  • XML Transaction adds a subsystem data queue record to inform the JD Edwards EnterpriseOne subsystem to process the added record.

  • The system sends a response to the requestor indicating whether the insertion into the interface table and the subsystem data queue addition were successful.

9.3 XML Transaction Data Request

To request data from JD Edwards EnterpriseOne, you use a formatted XML document. The XML document contains a transaction type, such as JDESOUT, and an index that identifies the data to be retrieved from the interface tables. You supply a template to retrieve the specific data.

This illustration shows the XML Transaction data request and response process:

Figure 9-2 XML Transaction data request process flow

Description of Figure 9-2 follows
Description of "Figure 9-2 XML Transaction data request process flow"

In summary:

  • A request in the form of an XML document contains the transaction type and an index of the requested data.

  • XML Transaction parses the XML inbound document to get the transaction type and the index.

  • XML Transaction retrieves the data from JD Edwards EnterpriseOne and inserts the data into interface tables.

  • XML Transaction creates a response in the form of an XML document.

    The response is comprised of the interface table data records that match the transaction type and index. The response also contains any error messages that might have occurred.

9.4 XML Transaction jde.ini File Configuration

The XML Transaction kernel must be defined in the jde.ini file.

9.4.1 [JDENET_KERNEL_DEF15]

These settings are for a Microsoft Windows platform:

krnlName=XML TRANSACTION KERNEL
dispatchDLLName=XMLTransactions.dll
dispatchDLLFunction=_XMLTransactionDispatch@28
maxNumberOfProcesses=1
numberOfAutoStartProcesses=1

This table provides the different .dll extensions for other platforms:

Platform dispatchDLLName dispatchDLLFunction
IBM i XMLTRANS XMLTransactionDispatch
HP9000 libxmltransactions.sl XMLTransactionDispatch
SUN or RS6000 libxmltransactions.so XMLTransactionDispatch

9.4.2 Example: Outbound Order Status XML Request and Response Format

The XML transaction data request is created by the outbound function and sent to the XML transaction API. These code samples illustrate a sales order request and response.

The format in this XML Transaction request code sample returns all columns for the sales order header and detail lines:

<?xml version='1.0' ?>
<jdeRequest type='trans' user='user' pwd='password' environment='environment' 
role='*ALL' session='' sessionidle='300'
<transaction action='transactionInfo' type='JDESOOUT'>
<key>
<column name='EdiUserId'>value</column>
<column name='EdiBatchNumber'>value</column>
<column name='EdiTransactNumber'>value</column>
</key>
</transaction>
</jdeRequest>

This code sample shows the XML Transaction response:

<?xml version='1.0' encoding='utf-8' ?>
<jdeResponse type='trans' user='user' role='*ALL' session='session1' 
environment='env'>
 <transaction type='JDESOOUT' action='transactionInfo'>
    <returnCode code='0'>XML Request OK</returnCode>
    <key>
        <column name='EdiUserId'></column>
        <column name='EdiBatchNumber'></column>
        <column name='EdiTransactNumber'></column>
    </key>
    <table name='F4201Z1' type='header'>
        <column name='EdiUserId'></column>
        <column name='EdiBatchNumber'></column>
       
    </table>
    <table name='F4211Z1' type='detail'>
        <column name='EdiUserId'></column>
        <column name='EdiBatchNumber'></column>
       
    </table>
    <table name='F49211Z1' type='additionalHeader'>
        <WARNING>No record found</WARNING>
    </table>
 </transaction>
</jdeResponse>