Retereving data from HTTP POST

Hi,

I have a reqirement, where my cleint will be sending the data to my service, In my service I will be redirecting to wm.tn/receive service by using pub.cleint.http.
While redirecting, how can I retreive the Input data from the HTTP POST and send it to my serice.

1)Client send the data(xml data) thru http post, calls my serivcethru pub.client.http(http://myserver:5555/invoke/myservice/service?)
2)In my developer, I will receive the data and use another service to redirect to TN.(http://myserver:/invoke/wm.tn/receive)
Q) In 1 how can I get the Input XML string .

Please help me
Thanks in advance …

Regards,
Sunny

Try pub.xml:xmlNodeToDocument then pub.xml:documentToXMLString

Hi all,

I’d like to create a simple service for receiving text data via http. Can any one share the steps to do that?
Thanks
Richa

Richa,

What you mean by text data?is it content-type=text/plain via http as string datatype?

Please elaborate more info on your requirment?

HTH,
RMG

If you want to know what is coming the pipeline for text data via http user getTransportInfo and use save/restorepipeline services and see the pipeline.

HTH,
RMG

  1. Read the Developer’s User Guide.
  2. Implement the service that can accept inputs from an HTML form over HTTP.

What i have done is written a HTML file, where i have a text feild and a submit button to post data to my service. MY form tag of HTML is just this:
<form action="http://<ISServer>/invoke/>folder>/<servicename>/" method=“POST”>
<input type=“text” name=“input”>
<input type=“submit” value=“submit”>
</form>
But when i submit data to my flow service, the text that i wud have entered in the text feild and posted to my service is not seen on the server log. I have pub.debug.log in my service, which will write some mssg to server log as soon as the data is posted. I am getting java.lang.ClassCastException at pub.io.streamToBytes. Any suggestions over this?

What i have done is written a HTML file, where i have a text feild and a submit button to post data to my service. MY form tag of HTML is just this:
<form action="http://<ISServer>/invoke/>folder>/<servicename>/" method=“POST”>
<input type=“text” name=“input”>
<input type=“submit” value=“submit”>
</form>
But when i submit data to my flow service, the text that i wud have entered in the text feild and posted to my service is not seen on the server log. I have pub.debug.log in my service, which will write some mssg to server log as soon as the data is posted. I am getting java.lang.ClassCastException at pub.io.streamToBytes. Any suggestions over this?

There is no need to call streamToBytes. The value of the form field named “input” will be a string. The IS content handlers manage parsing the HTML form and place the variables in the pipeline for you.

Have you tried changing the method in your HTML form from “POST” to “GET”?

what is the service used to send DSP data to Trading Network in xml format

Hi Sateesh,

I guess there is no direct built-in-service to send data from DSP to trading networks in XML format. The way i know is invoke a service from DSP which takes all the data entered and build the logic to convert into a XML document and then use wm.tn.receive to send it to TN.
If iam missing anything,please correct me guys.

Regards,
Somu