You can use the WebSphere Partner Gateway - Express file system to transfer messages to and from enterprise applications, including WebSphere Partner Gateway Enterprise, over an existing network. The messaging directories are located under the EXPRESS_HOME/data/FileSystemAdapter2/partners directory. On a system running i5/OS or OS/400, the EXPRESS_HOME directory is /QIBM/UserData/WSPGExpress60. The "partners" directory contains a subdirectory named for each partner configured in the system. The directory structure should resemble the following:
EXPRESS_HOME
data
FileSystemAdapter2
partners
partner1
partner2
...
partnerX
If you would like to send a message to a partner, for example, "partner1", move the message into the appropriate "send" subdirectory in the "partner1" directory. Each partner has a set of directories that hold messages that are to be sent, have been sent, have been received, and have had some kind of error. Each send directory also has a subdirectory that corresponds to the method of sending and the message content being sent. For example, "partner1" in the above example has the following subdirectories:
partner1
error
rec_err
received
send
sent
The "error" subdirectory contains messages that failed transmission. The "rec_err" subdirectory contains messages that failed receipt. The "received" subdirectory contains messages that were received successfully. The "send" subdirectory contains messages that are being sent currently. The "sent" subdirectory contains messages that have been successfully sent. Each one of the above subdirectories has in turn its own set of identical subdirectories. The subdirectories exist in order to identify the content type and messaging protocol used in sending the messages. Each of the directories above has the following subdirectory structure:
AS2
binary
EDI-Consent
EDIFACT
EDI-X12
MDN
XML
HTTP
Subdirectories of the AS2 directory are used to send and receive AS2 messages. The "binary" subdirectory holds binary messages. The "EDI-Consent", "EDIFACT" and "EDI-X12" are for EDI format messages. The MDN subdirectory holds received acknowledgements; it is not used in the "send" directory tree. The "XML" directory holds arbitrary XML messages.
The HTTP directory holds messages sent or received using the HTTP POST method.
In order to send and receive messages programmatically, or manually without the WebSphere Partner Gateway - Express user interface, the file system must be used. Using "partner1" from the example above as a trading partner, an EDI-X12 message can be sent by placing EDI-X12 content in the form of a file into the EXPRESS_HOME/data/FileSystemAdapter2/partners/partner1/send/AS2/EDI-X12 subdirectory.
Once Express sends the document, it will be moved either into the sent/AS2/EDI-X12 subdirectory if it succeeded, or the error/AS2/EDI-X12 subdirectory if it failed. Documents requiring MDNs are not moved until the MDN is received, or Express times out waiting for the MDN. Received MDNs are always placed in the MDN directory. When files are moved from the "send" directories, they are suffixed with a timestamp to differentiate between multiple transmissions of the same filename.
Received messages can be retrieved by opening the "received" subdirectories. For example, if an EDI-X12 message was expected from "partner1" over AS2, the EXPRESS_HOME/data/FileSystemAdapter2/partner1/received/AS2/EDI-X12 directory would store the received message. Any file appearing in that directory will be an EDI-X12 message from "partner1" that succeeded. The message could then be retrieved and processed. A robust implementation would also monitor the partner1/rec_err/AS2/EDI-X12 directory in case parsing errors were encountered in an incoming message from "partner1."