i am receiving both EDI and Flat File messages from the same partner, and i need to make available to him one gateway service that handles both message types.
how can i do that? as we know, we will need to recognize the type before submitting tn TN in order to extract the TN_parms (sender, receiver, DocTypeName).
but how can i recognize whether the received message content is an edi or a flat file. today the partner sends the raw message through https protocol without adding further details about the content type.
taking a look at the pub.flow:transportInfo document, there are the following information about the http protocol (requestUrl, query, method, requestHdrs, ipInfo). i don’t see how to get the content type(edi / flatfile) without asking the partner to send it explicitly.
Right now how are you receiving the EDI file to your gateway service (via AS2 or plain http post or VAN or filepolling) and how it is?
Are you still in testing phase I dont think the getTransportInfo will tell you the but did you check on the Content-Type they are sending it as and in the pipeline via transport info just part of your flow testing?
we are supposed to receive all the messages (edi and flatfile) via AS2, but we didn’t do it yet in the development environment.
i didn’t get your question well, but what i’m thinking to do now is to check first if the message is one of the flat file massages (via a flat file schema validation). then, if it doesn’t match any of the schemas that means that it corresponds either to an edi message or to an invalid flat file message.
in this last case i will submit the message to TN through “receive”. and TN will recognize it if it’s an edi message, otherwise it’ll be saved as an unknown transaction.
Yes you can do any sort of custom checks via a gateway service and then route the documents to TN accordingly.
Whether it can be FF or EDI X12 or XML etc…formats.
But in case you want to route EDI only via AS2 you can give URL that invokes EDIIINT:receive unlessyou have sort of DMZ/proxy setup via HTTPS to the internal server communication (recommended)
Do you see the content-type show in the pipeline of the gateway service?
when ever Trading partner send the messages (EDI file or Flat File ) .you will get the content-type by default as input in gateway service.
stream :–InputStream The payload.
contentType— String The content type of the payload.
EDIINTbizdoc: ---- Document The bizdoc that contains the original EDIINT message.
For the structure of EDIINTbizdoc,
These are input you will get in your gatway service(custom service) by default…when you configure it in EDI module…