Calling Trading Network from Java classes

HI All,

I want to know from Java classes can we send document(xml or flatfile) to Trading network. If so can u please guide me how we can do that. I am interested to explore and learn more about Trading network.

Thanks in advance

Regards,
Reema

Post an XML document to an IS-hosted service. You can do this via POX over HTTP or via SOAP.

The IS service would then do any house-keeping necessary and direct the content to TN for processing.

Same for a flat-file, though you’d need to use a different content type coordinated with the IS side.

In either case, I’d encourage that the Java program not submit documents directly to the wm.tn:receive service. There are threads on the forums that cover the whys and whatfors.

Hi Reamon,

Thanks for u response.
I have one doubt related to flat file processing in TN. In document its mention for Flat file we required gateway service for that we are creating service in developer and using (wm.tn.docs.ff.routeflatfile) service.

My doubt is that when we talk about flat file processing in TN.Is scenario remain like that patners FTP the file and from that IS server invoke this gateway service and then send the document to TN.

Can you please give us a clear picture how the Flat file is process in TN.

Regards
Reema

My suggestion is to always use a gateway file for all documents/files being submitted to IS/TN. Never allow outsiders to call wM-supplied services directly.

From your Java app, you can invoke the gateway service via FTP or HTTP, whichever you like. If you FTP the file to IS, there are a couple of ways to do so–these are covered in the wM docs. Or, you can have the Java app FTP the file to some location that IS has access to. Then schedule a task or a file polling port to poll the directory to pick up files for processing.

The key is creating a gateway service that knows what kind of data to expect and it does what is needed to hand that off to TN.

[quote=reamon;61753]
My suggestion is to always use a gateway file for all documents/files being submitted to IS/TN. Never allow outsiders to call wM-supplied services directly.

Thanks Reamon . This gateway file point is not so much clear to us.
When we talk about processing of flat file the trading patner either FTP the file and by polling mechasism the IS server pick up the file for processing or either send by using HTTP mechanism.

if u have any sample code by which we can invoke the flatfile using HTTP mechanism so that we can learn on that part it will be very grate to us to understand that all concept.

Regards
Reema

Reema I would suggest you look at “Trading Networks Concepts Guide.pdf”. It would clear your doubts.

Thx talha for u suggestion.

Before posting any curry i have gone through that document many times.

Regards
Reema