Open GoogleCodeExporter opened 9 years ago
Hi The way i handle complex objects is as below snipplet. You can do nested for
for every object, i have commited some changes to ksoap, and i will try to see
the chances to implement something like this. but in the meantime you might
want to check this approach.
PurchaseOrder responseArray[] = null;
SoapObject _client = new SoapObject("", "soapMethod");
SoapSerializationEnvelope _envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
_envelope.bodyOut = _client;
KeepAliveHttpTransportSE _ht = new KeepAliveHttpTransportSE(JIRA_SERVER_URL, TIMEOUT, BUFFER_SIZE);
_ht.call("", _envelope);
Vector arr = (Vector) _envelope.getResponse();
responseArray = new PurchaseOrder[arr.size()];
for ( int i = 0; i < arr.size(); i++ ) {
SoapObject _soapObject = (SoapObject)arr.get( i );
int _len = _soapObject.getPropertyCount();
PurchaseOrder _singleObject = new PurchaseOrder();
for (int _i = 0; _i < _len; _i++) {
_singleObject.setProperty(_i, _soapObject.getProperty(_i));
}
responseArray[i] = _singleObject;
}
Original comment by jose.cas...@gmail.com
on 13 Aug 2014 at 1:23
Original issue reported on code.google.com by
mubeenma...@gmail.com
on 11 Jun 2014 at 10:47