Send Data from Flow Service via http form post

Hi, all,

I know how to submit data to a remote url using http post though a public flow service. Now I need to submit data over to a remote url via http form post instead of http post. How can I do it in the flow service or Java service? Thanks a lot for your advice.

J-

It’s still an HTTP post, but you may need to use a different method of organizing your data. You may want to review this thread:

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

This covers using the multipart/form-data content-type, which is what an HTTP form will typically use if there is non-text data being submitted.

Thanks a lot, Skip.

I don’t need to use multipart/form-data since I have only one hidden variable to pass. I was able to use a html form and post the value of this variable over to an asp page and display the data received through this http form post. But when I use the http.client to do a post to this asp page, the posted data (string) was not returned at all. Please let me know if there is anything you see missing.
Thanks,

J-

Jake,

You are not guaranteed to get the same data back as you post in the form; the returned data depends on the ASP page.

What type of data are you expecting to receive in response to the form post? You’ll most likely want to use the load and query services to post the data and extract the results from the response.

Thanks, Eduardo.

I am sending a value (a string) stored in a hidden form variable and post this form data over to the asp page. I am trying to accomplish the http form submission via http client service in wm.

Actually, the asp page receives the string data in the request object and writes this data to a text file. So I know for sure the services in wm works like a http form post. I am sure the asp page works since I tested it with a html form.

I am not sure what I am missing here to make this to work via http:client…pls advise.

Thanks,

In the link I posted, there is a discussion of how IIS doesn’t like the way that webMethods generates requests. The discussion there was about multipart requests, but it may apply to normal HTTP posts as well. I suggest that you capture the actual HTTP request being sent by your HTML form and the one being sent by webMethods, and compare them to see why your ASP page isn’t receiving the correct data. A good tool for capturing requests is HTTPTracer, which can be found at http://lazydogutilities.com.

You need to set the url to point to the ASP page and the method to post. The POST data can be set in several different ways depending on how many variables you have. The easiest (one variable) way is to construct a string that consists of the form variable name, ‘=’, and the data and map that into the data/string field for the service.

For example if the form variable is orderID, you’ll want to map into the data/string field:

orderID=T4513A98

multiple variables can be mapped in either by changing the string to something like:

orderID=T4513A98&partnerID=companyA Inc.&correlationID=MyOrder100440

The http service will handle URL encoding the data for you. Alternatively you could use the data/args for multiple variables; the choice is yours.

cheers!
ed

Thank you so much, Eduardo.

Putting variable name as one of args works fine. But it doesn’t work for me when concating strings to assign to data/string.