Call web service with parameters

I may have missed this in the forums but I don't think so.

I am used to using other technologies to call web services which generally have a parameters property of the HTTP request.

How do I make a call to a web service that takes parameters using Corona?

I think I can figure out how to parse the XML payload returned from some other articles on the site unless someone has a complete example.

Thanks in advance for any help or suggestions,
Stephen

Hello haucks,

Our network.request() function does the asynchronous HTTP communications that you need, but it only does raw HTTP communications. The HTTP standard protocol does not support properties, but protocols such as XML HTTP do. XML HTTP is a superset of the HTTP protocol which defines an XML scheme within the body of the HTTP packet. In which case, it is up to you to provide the header and the body in the format (ie: protocol) that the server expects.

Perhaps the best advise I can give at the moment is try building a request packet in the other tools you said you are familiar with and get a string output of the resulting "request packet". From there, you'll know how to build the raw HTTP request packet yourself.

I kind of figured that's what I would have to do but I wanted to make sure that I wasn't missing something.

Thanks

If it'll help you any, there are Lua libraries that can help you serialize/deserialize to/from XML and JSON. Please see the following blog posts for more details...
http://blog.anscamobile.com/2011/07/how-to-use-xml-files-in-corona/
http://blog.anscamobile.com/2011/08/tutorial-exploring-json-usage-in-corona/

Yeah, I read those articles before I posted.

They will help but not in forming the request :(

views:1710 update:2011/9/26 15:43:22
corona forums © 2003-2011