Note that there are some explanatory texts on larger screens.

plurals
  1. POkSOAP2 double ID exception
    text
    copied!<p>I am attempting to use kSOAP 2 in my android application, and when I try to perform a particular webservice request, I end up getting thrown a "double ID" exception. I was able to find where this gets thrown in the kSOAP source code, it is in the <code>SoapSerializationEnvelope</code> class method <code>public Object read()</code> Here is an excerpt from that code showing the exception being thrown: </p> <pre><code> if (id != null) { Object hlp = idMap.get(id); if (hlp instanceof FwdRef) { FwdRef f = (FwdRef) hlp; do { if (f.obj instanceof KvmSerializable) ((KvmSerializable) f.obj).setProperty(f.index, obj); else ((Vector) f.obj).setElementAt(obj, f.index); f = f.next; } while (f != null); } else if (hlp != null) throw new RuntimeException("double ID"); idMap.put(id, obj); } </code></pre> <p>I'm not at all sure what this exception is about, or how I can fix it. Anyone know what the deal with this exception is?</p> <p>Thanks</p> <p>Edit:</p> <p>It should be noted that I am also using a SOAP webservice connection method in the iOS version of this application, and the same exact request does not have any problems.</p> <p>New information:</p> <p>Upon closer inspection, the problem seems to be resulting from the xml response I am getting containing a <code>&lt;diffgr:before&gt;</code> element, which has tables with the same ID as above. I think this is the cause of the problem, the other requests I have performed up to this point do not have that element in them, and do not have the exception. So to add to the question: can I stop the webservice from sending this block in its response, or get kSOAP to ignore it?</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