1
當我用String []一個在SoapSerializationEnvelope添加屬性,則返回錯誤ksoap2設置的String []以request.addProperty
SoapObject request = new SoapObject(NAMESPACE, METHOD_SendArray);
//Use this to add parameters
String[] a ={"21","22","23","66"};
long[] x= new long[] { };
request.addProperty("NumberList",a);
request.addProperty("ID",x);
//Declare the version of the SOAP request
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
envelope.dotNet = true;
request body :
SendArray{NumberList=[Ljava.lang.String;@4052fa20; ID=[[email protected]; }
Error :
java.lang.RuntimeException: Cannot serialize: [Ljava.lang.String;@4052fa20