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 SoapSerializationEnvelope
class method public Object read()
Here is an excerpt from that code showing the exception being thrown:
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);
}
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?
Thanks
Edit:
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.
New information:
Upon closer inspection, the problem seems to be resulting from the xml response I am getting containing a <diffgr:before>
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?