其实我用这个代码来访问该Web服务FahrenheitToCelsius方法,我得到正确的响应,但是当我试图访问我的web服务正在逐渐
产生java.io.IOException:HTTP请求失败,HTTP状态:500
错误,并将其指向的transport.call(SOAP_ACTION, envelope);
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
//Use this to add parameters
request.addProperty("username",usr);
request.addProperty("password",pass);
request.addProperty("backOfficePartnerId",id);
//Declare the version of the SOAP request
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER10);
envelope.setOutputSoapObject(request);
envelope.dotNet = true;
try {
HttpTransportSE transport = new HttpTransportSE(URL);
Log.i("bodyout", "" + envelope.bodyOut.toString());
transport.call(SOAP_ACTION, envelope);
// Get the SoapResult from the envelope body.
SoapObject result = (SoapObject)envelope.bodyIn;
System.out.println("result IN F TO C::"+result);
}catch(Exception e){
e.printStackTrace();
}
我得到到这里正确的响应。 我debuged并检查值发送我身体出这是正确的,并响应了我的bodyin为空。