httpTransport.call(SOAP_ACTION,envelope);这一行给出了java.io.ioException是什么原因

时间:2014-09-04 05:16:45

标签: java android http

我有这个错误:

java.io.ioException

当我执行此行

httpTransport.call(SOAP_ACTION, envelope);

是什么原因......?有人可以帮帮我吗?

我从昨天起就一直在尝试这个,但我仍然失败了。

谢谢!

1 个答案:

答案 0 :(得分:0)

SoapObject object=new SoapObject(NAMESPACE, METHOD_NAME);
        object.addProperty("data", "123");// tis value u wil get frm web service it may change      
         envelope=new SoapSerializationEnvelope(SoapEnvelope.VER11);
         envelope.dotNet=true;
         envelope.setOutputSoapObject(object);
         try {
             HttpTransportSE htp=new HttpTransportSE(URL);
             htp.call(SOAP_ACTION,envelope);
             SoapPrimitive resultString=(SoapPrimitive) envelope.getResponse();
            String server_acknowledgement=resultString.toString();
            } 
         catch (Exception e) {
            // TODO: handle exception
             exceptionArise=true;
             e.printStackTrace();
        }