130 Implementing EDI Solutions
Switch now to the Partner Profiles view. Double-click the profile Retailer2 and switch to the
tab Preferences. Set the property Trading Status to Active and click OK.
Figure 3-34 Completed partner profile for Retailer2 in TPI
3.3.5 Upgrading TPI
TPI had some AS/2 interoperability problems that are solved by upgrading to V184.108.40.206 or
later. If you use TPI V4.1, you can download a fix from the following Web site:
To apply the fix, unzip the download package in a temporary file and copy the upgraded file
cyclone.jar to the lib directory in the TPI installation directory.
3.3.6 Validation of the setup
Now that we are using TPI at the right level and that we have configured profiles on both
sides, we can perform some validation by exchanging documents between the two partners.
Retailer2 sends documents
There are several ways within iSoft’s P2PAgent to send files. Some of those techniques are:
Polling a directory for files with a given extension.
Polling a queue for messages.
Polling for workorders that contain a send command. Workorders can be stored in a
directory and the extension of the file name should match a given extension, which is .wo
Sending a file as the result of a send command.
To simply send a test file for validation, we use the last technique. The workorder file
sendcmd.wo is shown in Example 3-9 on page 131. The send command instructs the
P2PAgent program to send files with extension .out (-fS parameter) from the directory outbox
(-fP parameter) to the Supplier. When the transmission completes, the file should be renamed
by adding the extension .pend (-fE parameter). The document should be encrypted using the
Chapter 3. Implementing multi-product AS/2 communication with trading partners 131
Triple Des algorithm (-e parameter) and encoded using the Base64 technique (-pB). The
document will we signed using the SH-1 algorithm and the signature will be encoded using
the Base64 technique (-sB parameter). The P2PAgent will request a synchronous MDN from
the partner and the MDN needs to be signed using the SH-1 algorithm (-r1 parameter; an
asynchronous MDN would be -r1A). The send command is performed only once (-n1
parameter). Therefore, no retries take place if it fails. The -cE parameter sets the MIME type
to application/edi-x.12. Finally, the -hQ parameter instructs the P2PAgent program to quote
the EDI names (RETAILER2 and SUPPLIER) in the MIME headers.
Example 3-9 The command file sendcmd.wo
send http RETAILER2 SUPPLIER -fPoutbox -fSout -fE.pend -tE20032132000000 -e -pB -sB -r1 -n1 -cE -hQ
To launch the send command, you type the command batch sendcmd.wo in an interactive
session of the P2PAgent, as shown in Example 3-10. The output of the interaction with TPI is
the top part of what is shown in the example. The output in the TPI Server Display is shown in
Figure 3-36 on page 132.
Example 3-10 Output of the P2PAgent for a send to TPI and a receive from TPI
2003.01.28 09:07:40.564 84044 HPOS OK Outbound session started - mbox= batch= attempt=[1 of 1]
2003.01.28 09:07:48.335 84044 VRFY OK ** Signature verified **
2003.01.28 09:07:48.395 84044 PMDN OK ** Original-Content-MIC found in MDN **
2003.01.28 09:07:48.495 84044 HPOS OK Outbound session stopping - batch=
2003.01.28 09:08:48.061 64089 HPIS OK HTTP inbound session started
2003.01.28 09:08:48.081 64089 HPIS OK HTTP client: 220.127.116.11:3164
2003.01.28 09:08:48.201 64089 DECR OK ** Content decrypted **
2003.01.28 09:08:48.301 64089 VRFY OK ** Signature verified **
2003.01.28 09:08:48.462 64089 STMQ OK Data stored
2003.01.28 09:08:48.572 64089 HPIS OK HTTP inbound session stopping
Supplier sends documents
To send documents from Supplier (TPI) to Retailer2 (iSoft), we can again use the Document
Generator tool, as demonstrated earlier in 3.2.4, “Validation of the setup” on page 110. Set
the Sender’s ID and Receiver’s ID to the correct values and click Generate to generate a
sample EDI document.
Figure 3-35 Using the Document Generator tool