Remot invoke to wmtnreceive

Is wm.tn:receive supports a remote gd invoke?.
I am receiving a EDI file and storing into a folder.

  1. A file polling port (content type as application/EDIstream) listeing to this folder and invokes a posting service with pipeline data as edidata (BufferedInputStream)

  2. The posting service invokes the wm.tn:receive using remote gd to another server. Passing the edidata to the input as node object and setting $contentType also.

But the EDI content is not recognized in the TN. But the same setup works locally if I enable the TN with out a remote invoke.

Try using the http service post and set the Content-Type=application/EDIStream or application/edi-x12,see if this works.

It worked with http post. I thought about this earlier but didn;t consider this as an option as reliable one. But is this the only route to solve this?. Is it guranteed like gd invoke?.

Pass the edidata variable named as edidata–e.g. put a var named edidata, not node, into the inputs var when calling pub.remote.gd:invoke. The wm.tn:receive service doesn’t declare edidata as an accepted input variable but that’s what it looks for when processing EDI docs.

Shun,

yes passing edidata as var to the input will work fine as expected and also may be you can ignore contenttype,set if it required only.

HTH,
RMG

I tried that option before posting the thread. Tried now again. Got the same error as earlier.

com.wm.app.b2b.client.ServiceException:<exmlexception>
<errorcode></errorcode>
<info>wm.tn.doc:recognize</info>
<originalexception>
<javaclass>com.wm.app.tn.doc.BizDocTypeException</javaclass>
<message>Failed creating EDI envelope doc type. Cannot handle null object [EDIFTN.000010.000202]

Is this due to the node object is going null?.
The input to this service is edidata as a BufferedInputStream. And created a variable under inputs and mapped it.

The issue is probably the use of the BufferedInputStream–I don’t think it is serializable, thus cannot make the trip across the connection. Might try loading the stream completely into mem as bytes or as a string and send that over as “edidata”.