XmlPullParserException kSoap

28 Views Asked by At

Trying to receive data from an ASMX webservice with android. Used the kSOAP jar for that. Posting data to the server is working. Retrieving data from the server not. Getting the error .XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG (empty)

Data returned by the ASMX is XML like

<UserProfile><Data/></UserProfile>

What to do?

SoapObject result;
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME2);
request.addProperty("UserId", GlobalParams.userId);
request.addProperty("DeviceId", GlobalParams.getDeviceId(context));
SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
soapEnvelope.dotNet = true;
soapEnvelope.implicitTypes = false;
soapEnvelope.setOutputSoapObject(request);
HttpTransportSE transport = new HttpTransportSE(URL);
transport.debug = true;
transport.setXmlVersionTag("<!--?xml version=\"1.0\" encoding= \"UTF-8\" ?-->");
transport.call(SOAP_GETUSERPROFILE, soapEnvelope);
0

There are 0 best solutions below