9

Creating and Consuming Web Services

WHAT YOU WILL LEARN IN THIS CHAPTER:

  • Understanding the types of web services and the differences between them
  • Making web requests and receiving responses from code
  • Consuming RESTful services
  • Creating and consuming WCF services
  • Creating RESTful services with WCF

In Chapter 8, you learned about web and cloud services and how to access some of them from a Windows Phone 7 device. All the services you used in that chapter were abstracted through other code, so you didn't have to worry about managing the underlying communication. Although this makes things easy for you, it's a little limiting. There are plenty more services available on the Internet that aren't abstracted in this way, and of course you can make your own, too. If you make your own, you need a way to access them, and you won't be able to add code to the Windows Phone 7 libraries, so you need lower-level access.

In this chapter, you'll look at how to achieve this. You'll see what kinds of protocols are available to you for web service communication and how to use them. You'll also see how to use Representational State Transfer (REST) services and how to create and use your own Windows Communication Foundation (WCF) and WCF REST services.

Get Beginning Windows® Phone 7 Application Development: Building Windows® Phone Applications Using Silverlight® and XNA® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.