链接WEB服务有时报错
BufferedInputStream is Closed

解决方案 »

  1.   


    String url = "";// web
    String nameSpace = "";// 空间名
    String soapAction = nameSpace + methodName; HttpTransportSE transport = new HttpTransportSE(url, 12000);
    transport.debug = true;
    SoapObject request = new SoapObject(nameSpace, methodName); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
    SoapEnvelope.VER11);
    envelope.dotNet = false;
    envelope.bodyOut = transport;
    envelope.setOutputSoapObject(request); String response = "";
    try {
    transport.call(soapAction, envelope);
    response = envelope.getResponse().toString(); 
    }catch (Exception ex) { 
    }
    return response;