我有一个简单的Web服务方法,其参数如下
public String fetchOrderInfo(int g){
...
}
我想使用ksoap2从Android程序将值传递给int g。我使用过这样的东西,但这不起作用
...
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
PropertyInfo oId = new PropertyInfo();
oId.flags=3;
oId.type=PropertyInfo.INTEGER_CLASS;
request.addProperty(oId,3);
...
如何将值传递给int g? (Severer是Tomcat7) 谢谢!
答案 0 :(得分:1)
试试这个:
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("g", 3);
...