Note that there are some explanatory texts on larger screens.

plurals
  1. POXML RPC problem in Java-- Unable to create the XML parse: org.xml.sax.SaxNotRecognizedException
    text
    copied!<p>I'm somewhat new to Java and the Android framework, however what I'm doing I don't consider a complicated task. There is a LAMP XML-RPC server that returns an array of structs (array of associative arrays) and I've been unable to successfully receive the response in my Android project.</p> <p>I am using the apache xml-rpc library:</p> <pre><code>import org.apache.xmlrpc.XmlRpcException; import org.apache.xmlrpc.client.XmlRpcClient; import org.apache.xmlrpc.client.XmlRpcClientConfigImpl; </code></pre> <p>Here's the code. The XML-RPC server is a local installation. I'm partially stumped because I have been able to get a response just fine when using the XML-RPC debugger tool found here: <a href="http://xmlrpc-debug.sourceforge.net/" rel="nofollow">http://xmlrpc-debug.sourceforge.net/</a></p> <pre><code> XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl(); try { config.setServerURL(new URL("http://192.168.1.125:8886/api")); } catch (MalformedURLException e) { // TODO Auto-generated catch block // shouldn't need this because URL is hardcoded e.printStackTrace(); } XmlRpcClient client = new XmlRpcClient(); client.setConfig(config); //The only param is userId. Hardcoded in 1, which is a valid id. Vector&lt;Integer&gt; params = new Vector&lt;Integer&gt;(); params.add( 1 ); try { Object xmlrpc_reponse = client.execute("Api.getUser", params); //theres more code here to handle the object and return the result, //but it never gets past the above line before triggering the exception } catch (XmlRpcException e) { Log.w("xmlrpcproblem", e.getMessage()); } </code></pre> <p>The XmlRpcException is caught with the message:</p> <pre><code>Unable to create the XML parse: org.xml.sax.SaxNotRecognizedException: http://xml.org/sax/features/external-parameters-entities </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