SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
//Property which holds input parameters
PropertyInfo celsiusPI = new PropertyInfo();
//Set Name
celsiusPI.setName("userotp");
//Set Value
celsiusPI.setValue(number);
//Set dataType
celsiusPI.setType(String.class);
//Add the property to request object
request.addProperty(celsiusPI);
//Create envelope
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.dotNet = true;
//Set output SOAP object
envelope.setOutputSoapObject(request);
//Create HTTP call object
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
try {
//Invole web service+
androidHttpTransport.call(SOAP_ACTION, envelope);
//Get the response
output="Envelop";
SoapPrimitive response = (SoapPrimitive) envelope.getResponse();// error at these line
//Assign it to fahren static variable
} catch (Exception e) {
output=e.getMessage();
e.printStackTrace();
}
这是我的代码。问题是在getresponse方法的帮助下创建soapPrimitve类的对象。在调试时它会捕获阻塞但不会给出任何异常。请帮帮我。