Server Application
Once the Server application is initialized with the identified MessagePartner, it handles all incoming requests as described in the following procedure:
1. SAG puts all requests for this server application message partner in the server request queue. Configure an asynchronous listener notification for the server request queue as described in step 6 in
Task 2: Configuring the SWIFTNet
Component. Once the message is received by the listener, the notification is triggered and invokes a handleRequest service that extracts the incoming request from the notification document. 2. The handleRequest service creates a HandleRequest message and submits this message to Trading Networks. The HandleRequest message consists of the following content parts:
xmldata—The payload of the request.
sagenv—The envelope required by SAG for processing the request.
msgId—The message ID from the message queue, used for associating the response message with the request message that will be returned to SAG.
3. After submitting the request to Trading Networks, the configured processing rule is triggered based on the document type. When the mapping of the request/reply service is completed, the reply primitive is submitted to Trading Networks.
4. The
wm.swiftnet.server.mq.trp.respond service puts the response document in the server reply queue. MQHA on SAG takes the server application response and routes the response to the requesting client through the SWIFT Network. This service uses the MQ
Put service that you configured for
MQ Put Server Service as described in step 5 in
Task 2: Configuring the SWIFTNet
Component. The HandleResponse message consists of the following content parts:
xmldata—The payload of the request.
sagenv—The envelope required by SAG for processing the request.
correlationId—The correlation ID for the response message. This is set as MQDM headers and sent back to SAG. SAG uses the correlation ID to associate the reply message with the request message with the same
msgId, and then returns the response to the client.
msgId—The message ID from the message queue, used to associate the response message with the request message that is returned to SAG.