Chapter 18. Creating a Web Service Client

I l @ ve RuBoard

In Chapter 17, you learned how to create Web services and we used a Web browser to examine and test them manually. However, the whole point of Web services is that you access them programmatically, not through a Web browser. Web service clients can take many forms and can be written in a variety of languages on different platforms. Ideally, you should not need to be a SOAP expert to invoke a Web service; the mechanism for Web services should fit with the development paradigm of your environment and language.

The Web services examples you've seen so far have been used synchronously ”that is, you wait for a response before proceeding. However, this is not always the best way of working. If an operation can take a relatively long time, at least in programming terms, you might want your application to get on with other tasks while the Web service is executing. Again, the model for doing this should fit seamlessly into your environment of choice.

Another notable aspect of the Web services you've encountered so far is that you've always known what functionality they offer because you've been privy to their creation. You've also known where to find them, assuming that you installed the sample files on your server. You won't always have this knowledge about the Web services you want to use. Sometimes you'll know where the service lives but not what it can do. In other cases, you might not even know where it lives ”you might only know something about the type of service you need. As a Web service client developer, you need standard mechanisms for finding and interrogating Web services so you can build applications based on them.

This chapter will explain how to build a client for a Web service. It will describe how to create a Web proxy class and a Web reference, both manually and by using Microsoft Visual Studio .NET. The chapter will also show you how to call Web methods synchronously and asynchronously. Finally, it will discuss dynamic Web service discovery and the use of Universal Description, Discovery, and Integration (UDDI).

I l @ ve RuBoard


Microsoft Visual J# .NET (Core Reference)
Microsoft Visual J# .NET (Core Reference) (Pro-Developer)
ISBN: 0735615500
EAN: 2147483647
Year: 2002
Pages: 128

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net