Posting XML as a parameter to a SOAP WebService Method

posted Sep 26, 2013, 1:03 AM by Akash Khaitan   [ updated Sep 26, 2013, 1:05 AM ]
Convert xml to string & enclose it with CDATA, paas it as webservice parameter

For Example
    xhttp=new XMLHttpRequest();"GET","books.xml",false);
    xmlDoc=xhttp.responseXML;                                                  //Get XML
    xmlDocstr=(new XMLSerializer()).serializeToString(xmlDoc);                // XML to String
    xmlDocstr=   "<![CDATA[" + xmlDocstr + "]]>";                               

Now use this for as a parameter in webservice

By Andy Lewisohn

CDATA Reference