You don’t have to use TN to receive the file. You can set up your own service to accept a byte array or stream, the convert the byte array to a string and write it to a file or write it to the server log using pub.flow:debugLog just to test it out.
In my experience, it is better to use wm/tn/receive.
Setup a partner profile. Use the id as sender id in the document. TN will automatically extract this info for you and logs.
Setup the document type which will be published from partner.
Setup a processing rule to call the service which will be called for execution by TN once the document logged in TN.
Add your processing logic in the service.
If you want to use your own service, you need two services. One is to receive and log the data into TN which replaces the tn.receive. Another one is the processing logic.
You need to setup port in Admin console which is a web based tool. Just type your http://hostname:port then type the user name and password. go to ports settings and do the dew.
Actually, there are several things you can do. I suggested to write a simple service to receive the data if all you want to do is test. Here are several options:
Write service as I suggested. Will provide you with an understanding of how to receive data directly via http/s post.
Use TN. Need to setup document type/processing rules and partner profiles. You didn’t indicate your progress in this area.
Write a flow that uses loadXMLNode (pub.xml:loadXLMNode). This will go out and grab the “XML” data and retrieve the information for you. If it is truly xml, it will output a NODE object.
Use the deprecated (but it really is there) service: pub.web:loadDocument. This is the predocessor to the one listed in #3 and works to provides a node as well but has more information in the archives as how to use it exactly. If you are trying to pass in flat, this probably won’t work. #1 is your best choice because it requires less setup and comprehension.
I’d like to create a simple service as you suggested to understand how to receive data via http. I have a question about the input of the service, should I set it as datatype as “Object” or ?
Could you please share an example if it’s possible? Thanks.
If you want to test using Http,the input of the invoking service should be Node (object) which will be recognized and later process this node using documentToRecord (IS4.6) or XMLNodeToDocument (IS6.0).
Thanks for the response
The problem is the content post to Integration Server is not a XML, it is a multipart/form data. So Node doesn’t help me in this case.
To receive multipart/form data, you need a content handler. The IS doesn’t natively recognize this content type. I know that webMethods professional services developed a content handler for multipart/form data - you may be able to get it through the webMethods support line.