Chapter 2. Consuming Your First Web Service

IN THIS CHAPTER

In the previous chapter, we created a Web Service that showed the variety of things you could do. The next thing we need to cover is consuming that Web Service. It might have many different types of clients. Anything that can talk to a Web Service might come calling. The following are just a few examples of the entities that might call your Web Service:

  • Command-line interface (CLI) applications

  • Graphical user interface (GUI) applications

  • Web applications

  • Other Web Services

When using Visual Basic .NET, the code you write to talk to a Web Service does not vary based on the client type. To emphasize that point, we will build a simple example for each of the four different Web Service clients just mentioned. Each example will only access one of the methods the Web Service exposes. To test your understanding of the subject matter, I encourage you to work along with the examples. After you complete the chapter, modify the individual example applications to access Web Methods not used by that example.

We will begin by looking at how you attach a Web reference. Regardless of application type, you always attach a Web reference the same way.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.171.153