Note that there are some explanatory texts on larger screens.

plurals
  1. POError using ksoap
    text
    copied!<p>I have implemented many SOAP functions for my app, but now I have some problems with this one:</p> <pre><code>public int generatePost(String sid, int uid, int obj_id, int ref_id, int thr_pk, String msg, int pos_pk, String title, String date) { int pos_pk_new = 0; SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); SoapObject soapObject = new SoapObject("urn:ilUserAdministration", "generatePost"); soapObject.addProperty("sid", sid); soapObject.addProperty("uid", uid); soapObject.addProperty("obj_id", obj_id); soapObject.addProperty("ref_id", ref_id); soapObject.addProperty("thr_pk", thr_pk); soapObject.addProperty("msg", msg); soapObject.addProperty("pos_pk", pos_pk); soapObject.addProperty("title", title); soapObject.addProperty("date", date); envelope.setOutputSoapObject(soapObject); HttpTransportSE transport = new HttpTransportSE(PATH_TO_YOUR_ILIAS_INSTALLATION + "/webservice/soap/server.php"); transport.debug = true; try { transport.call("generatePost", envelope); pos_pk_new = Integer.parseInt(envelope.getResponse().toString()); return pos_pk_new; } catch (IOException e) { e.printStackTrace(); } catch (XmlPullParserException e) { e.printStackTrace(); } return 0; } </code></pre> <p>Parameters like: PATH_TO_YOUR_ILIAS_INSTALLATION, urn:ilUserAdministration, etc are fine. I have other functions that work good, but this one is generating this error:</p> <pre><code>org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG (empty) &lt;br&gt;@1:6 in java.io.InputStreamReader@44c45f52) 0 at org.kxml2.io.KXmlParser.exception(Unknown Source) at org.kxml2.io.KXmlParser.require(Unknown Source) at org.ksoap2.SoapEnvelope.parse(Unknown Source) at org.ksoap2.transport.Transport.parseResponse(Unknown Source) at org.ksoap2.transport.HttpTransportSE.call(Unknown Source) at de.ilias.SOAPExample.generatePost(SOAPExample.java:1048) at de.ilias.SOAPExample.main(SOAPExample.java:1473) </code></pre> <p>The php function generatePost is working good because I have tested it in a php snippet.</p> <p>Is it possible that ksoap library have a limit of parameters to add to my soapObject? </p> <p>Thanks.</p>
 

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