I am just starting out with EDI and I had some basic questions regarding TN etc.
I have EDI and TN packages on 6.5. IS.
As per the TN Users guide, for flat file documents, you need to have a gateway service custom coded to handle flat file documents. Do you still need this if the EDI package is installed? Since the EDI users guide dont talk about the need for a gateway service at all.
What is the best way to make a test service to send an EDI document to the TN? I wrote an HTTP service that seems to work, but that needs the gateway service as a receiver. Is there another way to do it without the need for the gateway service?
For EDI files, a gateway service is not needed. Though I usually advise that you should have one and not allow external apps/partners to post directly to TN receive. For other flat files, a gateway service is a must.
The EDI module has an admin page to post sample/test documents. Look in the left menu in IS Administrator and follow the appropriate links.
I agree…on having a gateway servive, hence I was trying to have one such service. But how can you write a gateway service that publishes the envelope, group and document to TN? When I tried to publish the Envelope using the wm.tn.doc.ff.routeFlatFile service, I get the following error:
com.wm.app.tn.err.EXMLException: wm.tn.doc:recognize com.wm.app.tn.doc.BizDocTypeException Failed creating EDI envelope doc type. Cannot handle null object [EDIFTN.000010.000202] com.wm.app.tn.doc.BizDocTypeException: Failed creating EDI envelope doc type. Cannot handle null object [EDIFTN.000010.000202] at wm.b2b.editn.EDIEnvelopeDocType$EnvelopeStatus.getPipelineVars(Unknown Source) at wm.b2b.editn.EDIEnvelopeDocType.createEnvelope(Unknown Source) at com.wm.app.tn.doc.BizDocTypeReg.recognizeAndCreate(BizDocTypeReg.java:505) at wm.tn.docimpl.recognize(docimpl.java:701) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at
Before calling the wm.tn.doc.routeFF service, I pass TN_parms with “X12 Envelope” as the DoctypeName and also the sender and receiver DUNS.
Am I doing something wrong? Is there a better way to do this?
Don’t set TN_parms for EDI docs. It isn’t necessary.
Place the EDI string into a var name edidata and call wm.tn:receive. No need to use routeFF.
For EDI, ignore the flat file documentation. Follow the info in the EDI guides. Where the TN and EDI docs differ, follow the EDI for TN material in the EDI docs.
This service to be used only when routing flat files to TN
wm.tn.doc.ff.routeFlatFile service (it needs TN_Parms)
Normally for routing EDI, you can either use wm.tn.doc.xml:routeXML or wm.tn:receive and make sure you have the edidata var in the pipeline as Rob mentioned above before you invoke the service that posts to TN.