Binary FTP multi-step use case solution - IBM Websphere

The following steps outline the processing flow :

  1. The binary message is sent by the PartnerBinary back-end application to the MQ queue.
  2. The binary message is fetched from the queue by PartnerBinaryB2BGW by MQ FSH.
  3. The B2BGW Document Routing Preprocessor parses the document to select the appropriate trading partners for the message.
  4. After the appropriate external trading partner is determined,the destination is read from the partner’s external profile.
  5. The binary message is sent via FTP to the HubBinary MPGW trading partner service.
  6. The message is received by HubBinary FTP Server Front Side Handler and processed by the appropriate multi-step processing rule.
  7. The routing information is obtained by the processing rule, and the message is sent to the HubBinary back-end application via MQ queue.

Binary over HTTP to AS2 architecture

Binary over HTTP to AS2 architecture

Use case outline

Here is a summary of the steps to configure the appropriate processing objects toimplement the scenario:

  • Step1: Modifying the existing B2B Gateway
  • Step 2: Modifying the existing Multi-Protocol Gateway

Use case implementation

In this section, we will outline the additional objects that are necessary to process our FTP messages.

Step 1: Modifying the existing B2B Gateway
First, we must modify the existing B2B Gateway.

Creating PartnerBinary _mq MQ Front Side Handler
This MQ Front Side Handler object listens for a message that come from the MQ queue called Q14.This queue represents the partner application that originates the binarymessages that route through the PartnerBinB2BGW object via FTP to the HubBin_MPGW service.

Configuring the MQ Front Side Handler

Configuring the MQ Front Side Handler

Setting the Advanced tab Document Routing Preprocessor
The Advanced tab outlines the message preprocessing functions for routing the binary message to the HubBinary partner over FTP in the Document Routing Preprocessor field.

PartnerBinaryB2BGW object Advanced tab

PartnerBinaryB2BGW object Advanced tab

The Document Routing Preprocessor uses the b2b-partner-routing.xsl stylesheet to determine the routing information for the message.This stylesheet determines the “To” partner to route the message based on the MQ queue from which the message was received.

The code snippet in Example below determines if the message that we are receiving is from MQ. If so,we continue; if not, there is an error.It then parses the current URL string to determine the queue from which the message was sent.

For our example, we use queue Q14.We then set the doc-type (binary), the To partner (hubbin), and the From partner (partnerbin),which allows the proper external partner profile to be called based on the To field. Recall that our only external profile, HB_Ext,references “hubbin” as the Business ID.

Example - The b2b-partner-routing.xsl stylesheet

Step 2: Modifying the existing Multi-Protocol Gateway
Next, we modify the existing Multi-Protocol Gateway.

Creating HubBinary FTP Server Front Side Handler
The configuration that is shown a Port Number of 5117.This port number is the port on which the FTP Server FSH is defined to listen for FTP messages.

FTP Server Front Side Handler configuration (page one)

FTP Server Front Side Handler configuration (page one)

The configuration is mostly default values with the exception of the “Allow Unique File Name (STOU)” parameter.This parameter is set to on to allow the FTP server to generate aunique file name for each transferred file.

FTP Server Front Side Handler configuration (page two)

FTP Server Front Side Handler configuration (page two)

MPGW FTP processing policy
Next,we define the MPGW FTP processing policy .

Defining the new MPGW FTP processing policy

Defining the new MPGW FTP processing policy

HubBinary MPGW processing policy FTP routing code snippet
This code snippet hard codes a value for thevar://service/routing-url to a predefined MQ queue.

Example - The b2b-test-routing-hub.xsl


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Websphere Topics