Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Most likely you've received non-SOAP response.</p> <hr> <p>To dump and inspect your SOAP request/response, set <code>aht.debug = true;</code>, and then after you've called <code>aht.cal(...)</code>, print values <code>aht.requestDump</code> and <code>aht.responseDump</code> to output (like external file or LogCat).</p> <p>For example:</p> <pre><code>//... aht.debug = true; aht.call(SOAP_ACTION, envelope); Log.e("SOAP_REQUEST", "----------------------------"); Log.e("SOAP_REQUEST", XmlUtils.format(aht.requestDump)); Log.e("SOAP_REQUEST", "----------------------------"); Log.e("SOAP_RESPONSE", "----------------------------"); Log.e("SOAP_RESPONSE", XmlUtils.format(aht.responseDump)); Log.e("SOAP_RESPONSE", "----------------------------"); </code></pre> <hr> <p>Where <code>XmlUtils</code> class has next code:</p> <pre><code>public class XmlUtils { static public String format(String unformattedXml) { StringWriter writer = new StringWriter(); try { Document doc = parseXml(unformattedXml); TransformerFactory tf = TransformerFactory.newInstance(); Transformer transformer = tf.newTransformer(); transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); transformer.setOutputProperty(OutputKeys.METHOD, "xml"); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); transformer.transform(new DOMSource(doc), new StreamResult(writer)); writer.close(); } catch(Exception ex) { return unformattedXml; } return writer.toString(); } private static Document parseXml(String xml) throws IOException, ParserConfigurationException, SAXException { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); InputSource is = new InputSource(new StringReader(xml)); return db.parse(is); } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload