本帖最后由 wushuangman1127 于 2013-07-03 09:30:25 编辑

解决方案 »

  1.   

    貌似webservice只能是返回简单类型的数据,你们自己定义一个格式 ,还是通过string返回,然后按照格式解析不就行了吗
      

  2.   

    你获取的返回值通过 envelope.getResponse(); 获取 我没用过这种方式。
    这是我们之前用的方式  返回的是字符串,但格式是json格式HttpTransportSE hts = new HttpTransportSE(URL + serviceName, TIME_OUT);
    // 启用调试
    hts.debug = true;
    SoapSerializationEnvelope sse = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    sse.dotNet = true;
    sse.bodyOut = request;
    hts.call(NAME_SPACE + nsService + method, sse);

    // 返回结果
    SoapObject response = null;
    response = (SoapObject) sse.bodyIn;
    String result = null;
    try {
    result = response.getProperty(0).toString();
    } catch (Exception e) {
    throw new UnknowException("返回数据为空");
    }
    返回通过sse.bodyIn这个方式获取 ,你试试呢,如果response 不为null,解析就简单了撒
      

  3.   

    刚开始用getResponse()方法抛出Vector cannot cast to SoapObject异常,之后改成bodyIn获取返回值就没用问题了。谢谢各位的热心解答。不胜感激!