Topic
  • 2 replies
  • Latest Post - ‏2014-11-05T00:31:57Z by Joaquimrio
SystemAdmin
SystemAdmin
527 Posts

Pinned topic Receiving X12 Files As Binary

‏2012-06-08T18:55:45Z |
I am interfacing with an EDI VAN for some file exchanges. I only want WPG to receive and pass the file in to a folder (no translation, just pass through).

I would like to avoid setting up all of the partner ID combinations in the partner profile.

What I would like to do is simply have WPG use the AS2 ID from the sender and my AS2 ID as the receiver and process the file as a binary file and pass it through to the backend folder.

We use the generic file processor for outbound documents to force them to be routed when there is no ISA/GS type info.

Is it possible to do this on inbound files?

Thank you.
Updated on 2012-06-10T12:20:18Z at 2012-06-10T12:20:18Z by AvV
  • AvV
    AvV
    117 Posts

    Re: Receiving X12 Files As Binary

    ‏2012-06-10T12:20:18Z  
    Hello Brian,

    I am not sure if you really want to receive EDI (X.12) documents as Binary.
    What you basically require is that the 'Business ids' from the EDI documents are overridden by the 'Packaging business ids' values from the AS2 header for routing the document. In this way, you simple just will have the 'AS2-To' and 'AS2-From' defined in the WPG Console.

    A solution is to write a class, for example 'CustomEDIRouter' which implements the BusinessProcessHandlerInterface.

    This class will do the action as suggested above :
    String fromBusId = businessDocumentInterface.getAttribute(BCGDocumentConstants.BCG_PKG_FRBUSINESSID));
    String toBusId = businessDocumentInterface.getAttribute(BCGDocumentConstants.BCG_PKG_TOBUSINESSID));

    businessDocumentInterface.setAttribute(BCGDocumentConstants.BCG_FRBUSINESSID, fromBusId);
    businessDocumentInterface.setAttribute(BCGDocumentConstants.BCG_TOBUSINESSID, toBusId);
    This 'CustomEDIRouter' would be activated by a ReceiverPreProcessHandler for this incoming AS2 connection.
    For example : recv[0].setAttribute(CUSContstants.X_CUS_EDI_ROUTER, BCGDocumentConstants.BCG_TRUE);

    Hope this helps.

    Thanks.
    Arjan

    Senior IT-Specialist
    WebSphere B2B (WPG/WDI), WMQ AMS, WMQ FTE
    IBM Software Services for WebSphere
    Software Group, IMT BNL
  • Joaquimrio
    Joaquimrio
    1 Post

    Re: Receiving X12 Files As Binary

    ‏2014-11-05T00:31:57Z  
    • AvV
    • ‏2012-06-10T12:20:18Z
    Hello Brian,

    I am not sure if you really want to receive EDI (X.12) documents as Binary.
    What you basically require is that the 'Business ids' from the EDI documents are overridden by the 'Packaging business ids' values from the AS2 header for routing the document. In this way, you simple just will have the 'AS2-To' and 'AS2-From' defined in the WPG Console.

    A solution is to write a class, for example 'CustomEDIRouter' which implements the BusinessProcessHandlerInterface.

    This class will do the action as suggested above :
    String fromBusId = businessDocumentInterface.getAttribute(BCGDocumentConstants.BCG_PKG_FRBUSINESSID));
    String toBusId = businessDocumentInterface.getAttribute(BCGDocumentConstants.BCG_PKG_TOBUSINESSID));

    businessDocumentInterface.setAttribute(BCGDocumentConstants.BCG_FRBUSINESSID, fromBusId);
    businessDocumentInterface.setAttribute(BCGDocumentConstants.BCG_TOBUSINESSID, toBusId);
    This 'CustomEDIRouter' would be activated by a ReceiverPreProcessHandler for this incoming AS2 connection.
    For example : recv[0].setAttribute(CUSContstants.X_CUS_EDI_ROUTER, BCGDocumentConstants.BCG_TRUE);

    Hope this helps.

    Thanks.
    Arjan

    Senior IT-Specialist
    WebSphere B2B (WPG/WDI), WMQ AMS, WMQ FTE
    IBM Software Services for WebSphere
    Software Group, IMT BNL

    I soul lime to implement for edifiact.