Gatway Service

hai every body,
can any one help me in writing a gatewayservice to send a flatfile to TN

Hi durgaprasad,

  1. invoke pub.file.getFile service to get the flatfile data from any location and load as “stream”

  2. now your flatfile data will be the stream format.

  3. Create “TN_parms” document in pipeline, inside that create a variable,

set document type name as your flat file TN document name and sender duns value, receiver duns value and content type as “application/x–wmflatfile”

  1. invoke (this is called gateway service) and map stream output to ffdata and map TN_params document to this service input.

  2. and now run your service, it will route the flatfile document to TN and it will recogized by your doctype name, sender and receiver.

Hope this helps!

Thanks & Regards,

content type is application/x–wmflatfile


The reply you have give is when you read the file and load as data. Suppose if the flat file is posted to you through Http(s) post how do you actually map the FFDATA for the routeFlatFile service.

If the data is received via HTTP/HTTPS, it would be the same process described previously in this thread by ArulchristhuRaj, except that step 1 would be different.

If the HTTP/S message has a contenttype recognized by IS as a flat file (i.e. listed in the tn.ff.contenttypes property), then the content will already be in a stream named ‘ffdata’, which is what expects.

If the message has a different contenttype, you will need to get the content into an InputStream with a name of ‘ffdata’.

If you are writing Flow services, you can use the services to work with streams.