150 Implementing EDI Solutions
The actual WebSphere Data Interchange commands are stored in the file wdi_out.cmds,
shown in Example 3-21. Similar to the inbound flow, the commands consist of a series of
environment setup commands followed by the familiar PERFORM command.
Example 3-21 WebSphere Data Interchange commands
set plan(WDIC);
init;
set file(PRTFILE,prtfile.txt);
set file(TRKFILE,trkfile.txt);
set file(EXPFILE, expfile.txt);
set file(XML_IN,c:\WDIServer32\outbox\retailer3\xml_in);
set file(POACK,c:\WDIServer32\outbox\retailer3\edi_out);
PERFORM TRANSFORM WHERE INFILE(XML_IN) SYNTAX(X) OUTFILE(POACK);
term;
The generated files, with the extension .edi, are now ready for transmission by the TPI Server
program and will be picked up by it at the next polling interval.
3.5 Integration between the Interchange Server, WebSphere
Data Interchange and TPI
The Interchange Server (ICS) is often used as a platform for integrating applications within an
enterprise. While we cannot cover all aspects of using this technology in a single redbook,
this section will describe some typical operations that allow the ICS to interact with
WebSphere Data Interchange. We will cover the use of the MQSeries Connector to send and
receive data to and from products such as WebSphere Data Interchange. The use of other
connectors, such as JText Connector, is very similar. One can also use the TPI Connector for
a close integration between TPI and the ICS. For an example of such a setup, refer to the
redbook B2B Solutions using WebSphere Business Connection, SG24-6197.
3.5.1 Creating business objects
The first step would be the creation of a business object matching the DTD that we used
previously in WebSphere Data Interchange. You can use the Business Object Designer and
define the fields manually. However, for a more realistic DTD representing a purchase order,
there would be many more fields than what we use here. Defining the business object
manually would then become an error-prone operation.
Tools are provided to make the definition of a business object easier. An optional installation
component of the Interchange Server is the XMLODA, XML Object Discovery Agent. Launch
the agent from the ODA\XML directory. When it is started, you should see a command
window as shown in Figure 3-46 on page 151.
Chapter 3. Implementing multi-product AS/2 communication with trading partners 151
Figure 3-46 XML Object Discovery Agent is running
Now launch the Business Object Designer and select File -> New Using ODA from the
menu, as shown in Figure 3-47.
Figure 3-47 Using the Business Object Designer
A new window will appear to guide you through the definition process. Click the button Find
Agents to populate the right pane with available agents and select the XML ODA agent from
the list. Select Next to continue (Figure 3-48 on page 152).
Note: The Visibroker component should be running to get this list of available agents.
152 Implementing EDI Solutions
Figure 3-48 Business Object wizard - Step 1
Most of the fields in Step 2 are populated by default. Provide the following information:
򐂰 Name of the file that contains the DTD
򐂰 Root element
򐂰 Top Level element
򐂰 BOPrefix
Then select Next to continue (Figure 3-49).
Figure 3-49 Business Object wizard - Step 2
Chapter 3. Implementing multi-product AS/2 communication with trading partners 153
The next step allows you to select other levels (or nodes) in the XML document for which you
would like to create a business object definition. You might, for example, require an object to
represent a single Detail element. For our purposes, this is not required. Therefore, we select
the top node and click Next to continue (Figure 3-50).
Figure 3-50 Business Object wizard - Step 3
Step 4 summarizes your selections so far. At Step 5, you need to select a verb to go with the
business objects. Figure 3-51 shows the selection of the Create verb. Click OK to continue.
Figure 3-51 Business Object wizard - Step 5

Get Implementing EDI Solutions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.