Serialize an array of ints to send using KSOAP2

后端 未结 7 1462
借酒劲吻你
借酒劲吻你 2021-01-06 01:41

I\'m having a problem trying to send an array of ints to a .NET web service which expects an array in one of the arguments. That\'s at least what I understand from the API d

7条回答
  •  南方客
    南方客 (楼主)
    2021-01-06 02:14

    Just pass parameter name and value like this in loop :

    SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
    SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    envelope.setOutputSoapObject(request);
    HttpTransportSE ht = new HttpTransportSE(URL);
    for (int i=0; i

    Just pass itemId as parameter name in loop and value in loop.

提交回复
热议问题