How to pass parameter to a webservice using ksoap2?

前端 未结 6 1650
后悔当初
后悔当初 2020-12-16 17:28

I\'m using Eclipse IDE to develop an android app. I\'m trying to connect to a .net webservice. I\'m using ksoap2 version 2.3

When I\'m calling a webmethod with no

6条回答
  •  一向
    一向 (楼主)
    2020-12-16 17:52

    You will have to declare parameter type in client code:

    SoapObject request = new SoapObject("http://tempuri.org/", "mymethod"); 
    PropertyInfo p = new PropertyInfo();
    p.setName("param_name_from_webservice");
    p.setValue(true);
    p.setType(Boolean.class);
    request.addProperty(p);
    

提交回复
热议问题