1
我在Delphi XE中編寫了一個簡單的Web服務 它在IIS上運行,就像ISAPI DLL一樣。使用Android連接到Delphi WebService
我無法連接此WebService與Android:
private final String NAMESPACE = "http://217.114.221.83/grigliamo/";
private final String URL = "http://217.114.221.83/grigliamo/DifferenziaWS.dll/wsdl/IWSDifferenzia";
private final String SOAP_ACTION = "http://217.114.221.83/grigliamo/WS_Login";
private final String METHOD_NAME = "WS_Login";
public void getWebService(String x) {
//Create request
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
try {
//Involve web service
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapPrimitive response = (SoapPrimitive) envelope.getResponse();
Assign it to fahren static variable
Res = response.toString();
} catch (Exception e) {
Res = e.toString();
e.printStackTrace();
}
}
我總是得到一個org.xmlpull.v1.XmlPullParserException:expectd START_TAG 任何人能告訴我什麼是錯上我的web服務嗎? 謝謝 Andrea
'我的web服務有什麼問題'。你確定你的web服務是錯誤的?你的Android代碼可以嗎? – greenapps 2014-11-03 11:33:43
http://stackoverflow.com/questions/12430136/ksoap2-org-xmlpull-v1-xmlpullparserexception-expected-start-tag-error可能的重複 – mjn 2014-11-03 12:11:00