KSoap2调用WebService异常
AyXmt 2011-03-10 03:52:00 String method="add";
String nameSpace="http://tempuri.org/";
String SOAP_ACTION="http://tempuri.org/add";
String serviceUrl="http://10.10.50.72/abs/abs.dll/wsdl/ITABS";
Log.d(TAG,"new Request ");
SoapObject request = new SoapObject(nameSpace, method);
request.addProperty("id", id);
request.addProperty("la", lat);
request.addProperty("ln", lng);
request.addProperty("time", time);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER10);
envelope.bodyOut = request;
HttpTransportSE ht = new HttpTransportSE(serviceUrl);
try
{
Log.d(TAG,"my_Webservice Call");
ht.call(null, envelope);
}
catch (Exception ep)
{
Log.d(TAG,"my_webservcie_Error: "+ep.getMessage());
}
异常:
org.xmlpull.v1.XmlPullParserException: expected: START_TAG
{http://schemas.xmlsoap.org/soap/envelope/}
Envelope (
position:START_TAG <definitions name='ITABSservice' targetNamespace='http://tempuri.org/'>
@2:349 in java.io.InputStreamReader@44f08f50)
说明:
Delphi 7 开发的WebService+IIS,使用delphi 调用正常,android Eclipse+KSoap2