I am attempting to update my Android app to use Ksoap2-Android version 3, up from version 2.6, in order to take advantage of the new SSL/self-signed certificate capabilities.
The app seems to have no problem sending simple parameters and receiving complex objects. However, when attempting to send a complex object with my request, it arrives at the server as null.
I never got any marshalling/unmarshalling of complex types in ksoap to work, so basically had a whole lot of SoapObjects and PropertyInfo objects going on, a lot of .getProperty("propertyname") etc to step down through the hierarchy. That was ok, a bit tedious to code but it worked fine, so it's all good. But now when I attempt to send a complex object, no data is received with the request at the server.
I put together my request objects by creating a SoapObject, then assigning more SoapObjects as properties of the original one, and more SoapObjects off them, etc, with PropertyInfo objects at the end of the tree. For some reason this seems to no longer work when using ksoap2 version 3. I have tested this, the only difference is the version of ksoap I'm using. Works with 2.6, not with 3.0.
Is there any known reason why this would occur? If necessary I can post code here, but I thought I would ask in case I'm missing something basic. I didn't see anything in the News or Coding Tips & Tricks to suggest why this might happen.
I have solved this issue, though I'm not sure exactly what caused it.
I refactored my code to use the newer method for uploading complex objects as detailed on the Ksoap2-android "Coding Tips and Tricks" page here.
It seems with the newer version of Ksoap2-Android, you can no longer have nested SoapObjects with PropertyInfo objects at the end of the tree, which is what I was doing before. In the new versions, you have only one SoapObject at the top level, which has PropertyInfo objects, and each of these PropertyInfo objects can be of a complex type. How to do this is detailed at the link above.