Skip to Main Content
Beginning iOS 4 Application Development
book

Beginning iOS 4 Application Development

by Wei-Meng Lee
October 2010
Beginner content levelBeginner
655 pages
14h 9m
English
Wrox
Content preview from Beginning iOS 4 Application Development

Chapter 16. Web Services

WHAT YOU WILL LEARN IN THIS CHAPTER

  • Understanding the various ways to consume Web services in your iPhone applications

  • How to communicate with a Web service using SOAP

  • How to parse the result of a Web service call using the NSXMLParser class

Communicating with the outside world is one of the ways to make your iPhone applications interesting and useful. This is especially true today when so many Web services provide such useful functionality. However, consuming Web services in an iPhone is not for the fainthearted. Unlike other development tools (such as Microsoft Visual Studio), Xcode does not have built-in tools that make consuming Web services easy. Everything must be done by hand, and you need to know how to form the relevant XML messages to send to the Web services and then parse the returning XML result.

This chapter explains how to communicate with XML Web services from within your iPhone application. Working through the examples in this chapter will give you a solid foundation for consuming other Web services that you will need in your own projects.

Note

For an introduction to XML Web services, check out this link: www.w3schools.com/webservices/ws_intro.asp.

Basics of Consuming XML Web Services

Before you create an Xcode project to consume a Web service, it is good to examine a real Web service to see the different ways you can consume it. My favorite example is to use an ASMX XML Web service created using .NET. For the purposes of this discussion, we'll look ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning iOS 5 Application Development

Beginning iOS 5 Application Development

Wei-Meng Lee

Publisher Resources

ISBN: 9780470918029Purchase book