1

I wrote a simple webservice in Delphi XE It is running on IIS, as ISAPI Dll.

I cant connect to this webservice with 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();
    }
}

I always get an org.xmlpull.v1.XmlPullParserException: expectd START_TAG Can anybody tell me what's wrong on my webservice please? Thanks Andrea

mjn
  • 36,362
  • 28
  • 176
  • 378
Andrea S.
  • 11
  • 3
  • 1
    `what's wrong on my webservice`. You are sure your webservice is wrong? Your Android code is ok? – greenapps Nov 03 '14 at 11:33
  • Possible duplicate of http://stackoverflow.com/questions/12430136/ksoap2-org-xmlpull-v1-xmlpullparserexception-expected-start-tag-error – mjn Nov 03 '14 at 12:11

1 Answers1

0

Nothing is wrong with the web service, SoapUI can retrieve the WSDL and send login requests.

I recommend to read ksoap2 org.xmlpull.v1.xmlpullparserexception expected start_tag error

The answers there contain step-by-step guides to build the correct SOAP request parameters / properties for a web service.

Community
  • 1
  • 1
mjn
  • 36,362
  • 28
  • 176
  • 378