做了个天气预报跟手机归属查询的,都OK没问题了,现在做另一个,需要用户名及密码登录的,现在登录就用
rpc.addProperty("UserName", "xxxxxxx");
rpc.addProperty("Password", "xxxxxxx");
envelope.encodingStyle="UTF-8";这个编码也设了
用SoapObject result = (SoapObject) envelope.bodyIn;会直接跳出来
如果用Object result=envelope.bodyIn;不会跳出,我把错误打印出来
soapfault- faultcode:'soap:server' faultstring;'server was unable to process request.--->
object reference not set to an instance of an object.'faultactor:'null' detail:org.kxm12.kdom.node@44f31120
搞了一天了也不知道什么原因,我是新手,希望大家帮一下忙呀,到处问人都没人理呀。

解决方案 »

  1.   

    loginRequest是一个数组,包含有username,password这两个参数
    好像是写一个数组username=xxxxx,password=xxxxx,然后传
    rpc.addProperty("loginRequest",数组);这样,不知道怎么做,有人吗?
      

  2.   

    服务器上是这样的
    <Login xmlns="http://xxxxxxxxxxxxx/">
          <loginRequest>
            <UserName>string</UserName>
            <Password>string</Password>
          </loginRequest>
        </Login>要怎么写rpc.addProperty("loginRequest",“”);这个才能把UserName、Password传递过去呀
      

  3.   

    ksoap2传对象搞了几天竟然没有人回答,网上的直接抄过来用也不行,是不是没人成功过呀,真晕
      

  4.   

    kSOAP以前做J2ME的时候用过……android上面可以用org.apache.http.client.HttpClient来call webservice的,lz不妨试一下…
      

  5.   

    传递对象比较麻烦,要系列化对象,android平台有个特有的系列化接口,model类需要实现它。
    实在不行,最好不用对象!