在我的应用程序中,我正在访问位于本地系统中的一些Web服务。当我从我的PC调用这些服务时,这些全部工作正常,但是当这些服务从另一个系统调用时。在电话会议上我收到错误“org.xmlpull.v1.XmlPullParserException:expected:START_TAG”错误
“org.xmlpull.v1.XmlPullParserException: 预期:START_TAG”。
这里是我的代码:
public String getAccountsNames(int billId){
String value = new String();
System.out.println("Inside getAccountsDetails method...........");
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("billId", billId);
SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
soapEnvelope.dotNet=true;
soapEnvelope.setOutputSoapObject(request);
AndroidHttpTransport androidHttpTransport = new AndroidHttpTransport(URL);
try
{
androidHttpTransport.call(SOAP_ACTION, soapEnvelope);
SoapPrimitive resultString = (SoapPrimitive)soapEnvelope.getResponse();
value = resultString.toString();
System.out.println("This getAccountsNames xmls is : "+xml);
} catch (Exception e) {
e.printStackTrace();
}
return value;
}
我也有通过设置SoapEnvelope.VER11,VER12,VER10检查。但问题每次都是一样的。
请建议。谢谢。
好的,谢谢检查这种方式。 – Neteesh 2011-04-26 14:04:15