Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Web Service in Android

How do we consume a web service in Android?

2 Answers

You should do the android blog reader application course, it shows you how to do this.

The process is essentially to first define what type of web service? Is it SOAP or RESTful. If it's RESTful then you can simply request the JSON URL web service endpoint, download the data, set it as a JSON object, and then process the data. A SOAP service would be more involved as you would need to create a valid SOAP request using a SOAP api and generally SOAP is a lot more involved then using a RESTful web service.

I'm using SOAP that returns an XML Schema, I have already consumed the SOAP but I have issues resolving the XML Schema and getting my result in plain text. What should I do? Thanks