HTTP receive from a a client WM 601

Hi experts,

I have simple question :

Get file from a client that sends files using HTTP/s and process it .

What are the steps I need to take to listen to HTTP requests?

  1. Configure a new HTTP port ( example 32123) in IS
  2. Set a service / flow in Developer that uses - WmTN/wm/tn/receive
  3. Configure the URI on sending client as - [url]http://localhost:32123/inbound[/url] [inbound is where I want receive the file]

Any suggestions or pointer to the manuals?

Thanks in advance for sharing your knowledge

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.

HTH

In my experience, it is better to use wm/tn/receive.

  1. Setup a partner profile. Use the id as sender id in the document. TN will automatically extract this info for you and logs.
  2. Setup the document type which will be published from partner.
  3. Setup a processing rule to call the service which will be called for execution by TN once the document logged in TN.
  4. 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.

Jeya.

As Ray suggests to setup own service, does that mean that I right a code to get the file ? If that is the case then I think using TN is better option.

NExt question -

Where do you setup the port to listen to requests TN or IS?

Thanks again for sharing your thoughts

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:

  1. Write service as I suggested. Will provide you with an understanding of how to receive data directly via http/s post.
  2. Use TN. Need to setup document type/processing rules and partner profiles. You didn’t indicate your progress in this area.
  3. 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.
  4. 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.

Ray

Hi Ray:

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.

Lei,

Sorry,your words sounds like that you are receiving XML.so i responded that…Any way

Regarding multipart/form-data there is a eloborate information availble posted by Dan Green,pls follow this link

[url=“wmusers.com”]wmusers.com