I tried sending a SOAP request in jquery to a third party, but always got this error:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Problems creating SAAJ object model</faultstring></soap:Fault></soap:Body></soap:Envelope>
how i did this is to pass a pair of tokens to another function that create a SOAP request based on these tokens. one of the tokens is an Html line like this:
<tr><td width="2" bgcolor="#ffffff"><\/td><td width="1" bgcolor="#d8dbe3"><\/td><td width="2" bgcolor="#ffffff"><\/td><td width="15" bgcolor="#f5f6f8"><\/td><td width="535" bgcolor="#f5f6f8"><table width="535" cellspacing="0" cellpadding="0" border="0" bgcolor="#f5f6f8"><tr><td width="80"><table width="80" height="96" bgcolor="#999999" cellspacing="0" cellpadding="0" border="0" align="center"><tr><td width="80" height="1" colspan="3"><\/td><\/tr><tr><td width="1" bgcolor="#999999"><\/td>....
whenever I added this token, the SOAP request failed. I tried to escape the html string from this token, the SOAP request succeeded, but the whole string spoiled by all escaped characters and the third party needs this html string to render the template, so I can not send the escaped version anyway. Is there a way that I can safely pass an html string without query failing?
source
share