Chapter 20: Using Web Services


Overview

In the previous chapter, we discussed how to create web services with ASP.NET. You learned that you could simply author application logic and use the WebMethod attribute to enable methods as SOAP end points.

This chapter will look at how to put web services to use in your applications. Web services are independent of platform and technology. This means that solutions built with ASP.NET, or with other technologies such as IBM's Apache SOAP module must all adhere to the SOAP specification. That way, they will be able to interoperate .

In addition to examining how to use the web services created in the previous chapter, we will also discuss some concepts related to ASP.NET Web services, specifically HTML screen-scraping and security.

You'll be looking at:

  • Finding and describing web services :When building a web service, developers face the problem of describing what the capabilities of the service are, and where the server that hosts the service can be found. We'll discuss how UDDI and WSDL address these problems.

  • Building web service proxies :You don't have to serialize and deserialize SOAP messages, or understand the various transport protocols for SOAP messages. Rather, you'll build proxy (or stub) objects that applications can use. You'll look at how to build proxies with both Visual Studio .NET and the WSDL.exe command line tool.

  • Using the .NET proxy class :The proxy class generated for you by either Visual Studio .NET or WSDL.exe has properties and methods to control aspects of how the proxy calls the web service, including the length of the request, timeout, and access to the HTTP cookies collections.

  • HTML screen-scraping :Using regular expression pattern-matching , you can extract information from a web page. You'll look at how to create a custom WSDL document, and then use that document with either of your .NET proxy generation tools to create a proxy that is capable of extracting information from any web page, effectively turning any web page into a web service that can be programmed.

  • Design decisions :We'll discuss some common design decisions that are encountered when building applications that use web services.

  • Web services security :We'll look at how you can use the security options provided by .NET to secure your web services.

  • Advanced topics :We'll discuss custom authentication and authorization strategies for web services, as well as Soap Extensions “a feature of ASP.NET that allows you to interact with .NET Web services at a low level.

Let's get started by discussing how you can find and describe web services.




Professional ASP. NET 1.1
Professional ASP.NET MVC 1.0 (Wrox Programmer to Programmer)
ISBN: 0470384611
EAN: 2147483647
Year: 2006
Pages: 243

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