how to retrieve data from http post

Hi,

My client is submitting an xml using http post to my service. I don’t see the body/data in the pipeline. When I added the getTransportInfo, i get the transport info in pipeline, but nothing else.

Please help.

Thanks
Samir

Is the client setting the content-type in the HTTP header? If set to text/xml it will be available in your service as node. (which you won’t see if you simply do savePipelineToFile as a node is not, for some odd reason, serializable).

The getTransportInfo shows below information in pipeline.

transport/http/requestHdrs/Content-Type = text/plain; charset=UTF-8
transport/http/requestHdrs/Content-Length = 567
transport/http/requestHdrs/User-Agent = Jakarta-HttpComponents/1.1

Even is savepipeline don’t show the node, when I do xmlNodeToDocument, no document is generated in the pipeline.

Also, As an input to my service, I have a node named ffdata. how do I know what name the client might be using?

The name of the input variable passed to your service is not controlled by the client directly. It is controlled indirectly by the content-type HTTP header. In this case, since it is text/plain, the content handler in IS is passing ffdata to your service, which is an InputStream.

You can either read that input stream object to get the bytes, convert them to a String, etc.

Or ask the client to set the content-type to text/xml and you’ll have a node variable in the pipeline.

Thanks Reamon,

That worked out.