Wednesday, March 26th, 2008

Posting XML as a parameter to a SOAP WebService Method

By Andy Lewisohn

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.

2 Responses

  1. inendydiorb said:

    Here, you have to broach products and specialty stores – Gucci. Full gen, such as Gucci brand-new evening bag or filthy lucre! Sum up of products such as accessible shipping of Japan’s largest selling products and handling of such products Gucci Store.
    グッチ 新作
    グッチ 新作

  2. tydopydmaqal said:

    Hi my name is Antone Contrerras my hobbies are
    Bowling
    Dancing
    Running
    Volunteering
    Diet, exercise

    female urinal

Leave a Comment