posting from Satellite to TN

ok, we have a remote webMethods Satellite at our customer location that does not have TN installed.
The customer is dropping an EDI file on that Satellite and I am picking that file up using file polling and attempting to post it to our local TN instance.

I use getTransportInfo to get the filename and then use getFile to get the file. I am loading the file as bytes and then doing bytesToString and am logging the EDI string and it looks good in the logs.

The issue I am having is trying to use pub.client.http to post from their satellite to our local (Hub) TN box.

If I post to [url]http://server/invoke/wm.EDINT/receive[/url], I get a 200 response from TN but I never see the file in TN.

If I post it to [url]http://server/invoke/wm.tn/receive[/url], I see the file in TN but TN doesn’t recognize the file type.

I have tried posting with loadAs set to null and set to bytes with the data being sent as bytes or as a string. It doesn’t seem to matter.

If I post the same string to TN using the “submit EDI test data” screen from in the IS, it hits TN fine and explodes to about 10 invoices.

I expect my issue is in how I am posting using the http post. Any ideas would be greatly appreciated.

thanks,
Chris

Did you use POST as method? Under headers of http service input, create a string variable Content-Type and set the value based on the content type, ie text/xml, application/edi etc.

It is always a good idea to use a wrapper service around tn:receive for it gives flexibility to see the pipeline and do custom processing before sending the data to TN.

Cheers :slight_smile:
Guna
http://www.nibodo.com

Yes, I was using POST as the method. I added the Content-Type variable as you mentioned and it works great.

Many thanks for your help.

I think if you want to use EDIINT, you should use AS2 (https). Follow the EDIINT documentation on how to send with EDIINT AS2. You can’t just post to EDIINT, the AS2 envelope is required.

If you just want to post to TN directly, then on the TN side, you will need to have a content handler that can handle the flatfile, check the flatfile handling documenation.

hope this helps.

thanks tongwang, I knew there was some diff between EDIINT.receive and tn.receive. We have several partners using AS2 via EDIINT.receive.