Share via

XML Web Services Using ASP.NET

This topic is specific to a legacy technology. XML Web services and XML Web service clients should now be created using Windows Communication Foundation.

Building a simple Web service using ASP.NET is relatively easy and is covered in ASP.NET XML Web Service Basics and Walkthrough: Building a Basic XML Web Service Using ASP.NET. However, the true power of Web services is realized when you look at the infrastructure. Web services are built on top of the .NET Framework and the common language runtime. A Web service can take advantage of these technologies. For instance, the performance, state management, and authentication supported by ASP.NET can all be taken advantage of by building Web services using ASP.NET.

The infrastructure for Web services is built to conform to industry standards such as SOAP, XML, and WSDL, and this allows clients from other platforms to interoperate with Web services. As long as a client can send standards-compliant SOAP messages, formatted according to a service description, that client can call a Web service created using ASP.NET (regardless of the platform on which the client resides). For more information on how ASP.NET provides an attribute-based mechanism for modifying the format of the expected SOAP, see Customizing SOAP Message Formatting.

When you build a Web service using ASP.NET, it automatically supports clients communicating using the SOAP, HTTP-GET, and HTTP-POST protocols. Since HTTP-GET and HTTP-POST support passing messages in URL-encoded name-value pairs, the data type support for these two protocols is not as rich as that supported for SOAP. In SOAP, which passes data to and from the Web service using XML, you can define complex data types using XSD schemas, which support a richer set of data types. Developers building a Web service using ASP.NET do not have to explicitly define complex data types they expect using an XSD schema. Rather, they can simply build a managed class. ASP.NET handles mapping class definitions to an XSD schema and mapping object instances to XML data in order to pass it back and forth across a network.

It is important to note that Web services are not a replacement for DCOM, but rather a messaging infrastructure for communicating across platforms using industry standards.

In This Section

  • Building XML Web Service Clients
    Details how to build a client to an XML Web service, regardless of the platform or technology used to build the XML Web service.
  • Using SOAP Headers
    Details how SOAP headers can be defined, processed, and manipulated for clients calling XML Web services created using ASP.NET.

Build Date: 2011-02-07