I am trying to retrieve a XML document from web service. I am passing a soap object with a token implementing the OAuth concept and retrieving the data. But the data does not turn out to be in XML format.
Response received is something like below.
anyType{ProductName=anyType{Text=Nadolol; Code=anyType{Value=11755;
CodingSystem=FDB_routed; }; Code=anyType{Value=20.55472;
CodingSystem=Google; }; Code=anyType{Value=7870; CodingSystem=FDB; };
Code=anyType{Value=19.9453; CodingSystem=Google; }; }; }
And I have confirmed with the web service and they have assured that
they send back the data in XML format. But I am not able to get it in
XML format.
The Code snippet
- Code: Select all
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("token",WebPage.token);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
androidHttpTransport.setXmlVersionTag("<?xml version=\"1.0\" encoding= \"UTF-8\"?>");
androidHttpTransport.call(SOAP_ACTION, envelope);
SoapObject result = (SoapObject) envelope.bodyIn;
String strResult = result.toString();
Can anyone thrown some light on this and point me in the right direction. I am stuck at this for a while now.
Thanks
Hari


