1

I am working with a Web Service with Android Development.

I called the web service using Apache's HTTPClient and HTTPResponse.

Surprisingly, the response returned by the webservice is HTML instead of XML. Kindly guide me if there is any way to specify that the content of the response of web service expected is XML.

Is there any parameter to be sent on the instance of client or response which will specify that the response should be in XML format.

I am using the timezone webservice given by earthtools.com through which we can get the timezone information if we provide latitude and longitude information

Regards,

Prayag

Prayag Pathak
  • 15
  • 1
  • 7
  • Did you write the web service? Can you post the code? Is it Soap/Rest? – djg May 17 '11 at 18:49
  • I am using the timezone webservice given by earthtools.com through which we can get the timezone information if we provide latitude and longitude information – Prayag Pathak May 17 '11 at 19:30

1 Answers1

0

How to set Content Type on HttpURLConnection?

Instead of using text/plain as the linked answer suggests, you'll want to use text/xml.

Community
  • 1
  • 1
Steve Prentice
  • 23,230
  • 11
  • 54
  • 55