当前位置: 首页 > 工具软件 > Node-SOAP > 使用案例 >

android kxml2,android - SoapFault - faultcode: 's:Client' faultstring: 'Error code 2006' faultactor:...

齐健柏
2023-12-01

I am getting this error again and again while trying to get the response from the WSDL Webservices.

I am using it like this:

//Create request

SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

//Property which holds input parameters

PropertyInfo celsiusPI = new PropertyInfo();

celsiusPI.setName("Driver.Token");

celsiusPI.setType(PropertyInfo.STRING_CLASS);

celsiusPI.setValue("c1f40074-4bf8-4159-ba15-e799e9efad9e");

PropertyInfo latitude = new PropertyInfo();

latitude.setName("Latitude");

latitude.setType(Double.class);

latitude.setValue(28.5192);

PropertyInfo longitude = new PropertyInfo();

longitude.setName("Longitude");

longitude.setType(Double.class);

longitude.setValue(77.2130);

//Add the property to request object

request.addProperty(celsiusPI);

request.addProperty(latitude);

request.addProperty(longitude);

//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 {

//Involve web service

androidHttpTransport.call(SOAP_ACTION, envelope);

//Get the response

//SoapPrimitive response = (SoapPrimitive) envelope.getResponse();

Object response = envelope.getResponse();

//Assign it to fahren static variable

fahren = response.toString();

Log.d("Response Message", fahren);

} catch (Exception e) {

e.getMessage();

Log.d("Response Message--------------------", e.getMessage());

}

}

Getting this Exception : SoapFault - faultcode: 's:Client' faultstring: 'Error code 2006' faultactor: 'null' detail: org.kxml2.kdom.Node

This is very much frustrating. Help me if anybody can!

 类似资料: