Digesting the reponse from Web Service

Put your problem here if it does not fit any of the other categories.

Digesting the reponse from Web Service

Postby prasadhari » Wed Aug 11, 2010 1:26 am

Hi ,

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);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
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.

Posts: 4
Joined: Thu Jul 22, 2010 11:59 pm


Re: Digesting the reponse from Web Service

Postby vaava » Wed Feb 01, 2012 3:03 pm

test with
envelope.implicitTypes = true;
Once Poster
Once Poster
Posts: 1
Joined: Sun Jan 29, 2012 9:45 pm


Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 8 guests