Unix Directory Creation | Home | MAMP MySQL Command Line Access

Filed under Quick Tips on March 26, 2008 by Andy Lewisohn

Posting XML as a parameter to a SOAP WebService Method

SOAP is an XML-based communication protocol, but you can't actually pass XML to a SOAP method without a little bit of finessing. The reason for this is straightforward: XML is not a native data type like int, uint, string, etc., and SOAP can be implemented in a number of languages, none of which implement XML in the same way. The ActionScript solution to this problem is simple, but hackish. Wrap the XML document in a CDATA tag and pass the whole thing as a string:
var stringifiedXML:String = "<![CDATA[" + xml.toXMLString() + "]]>"
Now you can pass a stringified XML document to your SOAP service without worrying about special characters.

Post a Comment Digg Del.icio.us

Trackback Pings (TrackBack URL for this entry)

http://www.arc90.com/cgi-bin/mt4/mt-tb.cgi/124.

Post a Comment:

Unix Directory Creation | Main | MAMP MySQL Command Line Access