January 2012
Beginner
655 pages
16h 35m
English
This chapter explored the various ways you can consume a Web service in your iOS applications: SOAP, HTTP GET, HTTP POST, and JSON. You also learned how to extract data from an XML document. Finally, you learned how to integrate Twitter into your application using the new API in iOS 5.
EXERCISES
Answers to the exercises can be found in Appendix D.
WHAT YOU LEARNED IN THIS CHAPTER
| TOPIC | KEY CONCEPTS |
| Ways to consume a Web service | SOAP 1.1/1.2, HTTP GET, HTTP POST, and JSON |
| Formulating a URL request | Use the NSMutableURLRequest class. |
| Establishing a URL connection | Use the NSURLConnection class. |
| Class for storing byte buffers | Use the NSMutableData class. |
| Events fired by the NSURLConnection class | connection:didReceiveResponse:connection:didReceiveData:connection:didFailWithError:connectionDidFinishLoading: |
| Parsing XML content | Use the NSXMLParser class. |
| Events fired by the NSXMLParser class | *parser:didStartElement:namespaceURI:qualifiedName:attributes:*parser:foundCharacters:*parser:didEndElement:namespaceURI:qualifiedName: |
| Parsing JSON strings | Use ... |