如何发送多个参数,从 android 到 wcf 服务器使用 ksoap2

2025-03-07 01:52:53
推荐回答(1个)
回答1:

若要发送多个参数、 字符串、 整数,等等:
SoapObject request = new SoapObject(NAMESPACE, METHOD);

PropertyInfo variableHeight = new PropertyInfo();

variableHeight.setName("height");
variableHeight.setValue(value); // your variable value
variableHeight.setType(Integer.class); // if its string type change to String.class
request.addProperty(variableHeight);

PropertyInfo variableWidth = new PropertyInfo();

variableWidth.setName("width");
variableWidth.setValue(value);
variableWidth.setType(Integer.class);
request.addProperty(variableWidth);

但用于发送字节数组我不太清楚,看看这个: http://code.google.com/p/ksoap2-android/issues/detail?id=116