Differences among the HTTP-GET protocol, the HTTP-POST protocol, and the SOAP protocol for ASP.NET services

Article translations Article translations
Article ID: 833383 - View products that this article applies to.
Expand all | Collapse all

On This Page

SUMMARY

This article discusses differences among the following protocols that are used to access Microsoft ASP.NET services:
  • Hypertext Transfer Protocol (HTTP)-GET
  • HTTP-POST
  • SOAP

MORE INFORMATION

The HTTP-GET protocol and the HTTP-POST protocol

These protocols encode request parameters as name-and-value pairs in the HTTP request. The HTTP-GET protocol and the HTTP-POST protocol provide backward compatibility in the following ways.
  • The HTTP-GET protocol creates a query string of the name-and-value pairs and then appends the query string to the URL of the script on the server that handles the request. Therefore, you can mark the request.
  • The HTTP-POST protocol passes the name-and-value pairs in the body of the HTTP request message.

The SOAP protocol

This protocol is an XML-based protocol that is intended to exchange structured information in a decentralized, distributed environment. Web services typically use the SOAP protocol only for communications. Communications support for the HTTP-GET protocol and for the HTTP-POST protocol is more limited than for the SOAP protocol.

Advantages of the SOAP protocol

The SOAP protocol has the following advantages when you compare the SOAP protocol to the HTTP-GET protocol and to the HTTP-POST protocol:
  • Required SOAP headers

    The HTTP-GET bindings and the HTTP-POST bindings cannot send and cannot receive header information. If the Web Service Description Language (WSDL) document states that a header must always be included in a message that is exchanged between the client and the server, the message must be encoded by using SOAP.
  • Complex input parameters

    ASP.NET does not support encoding complex types that are encoded in the name-and-value pairs in the query string (HTTP-GET) or in the body of the HTTP request (HTTP-POST). The HTTP-GET protocol and the HTTP-POST protocol support only primitive types, enumeration types, and array types of primitives and enumerations. SOAP supports more complex data types.
    For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
    326791 INFO: Supported data types for Web services that are called through the SOAP protocol or the HTTP protocol
  • Return parameter

    ASP.NET does not support encoding in-and-out parameters or out parameters in the message that is returned to the client because of an HTTP-GET request or an HTTP-POST request. Only the return parameter can be passed back to the client.
  • Strongly-typed data

    The data that is contained in the SOAP message is strongly-typed data. The data uses an XML Schema. Additionally, XML data types can be mapped fairly well to Microsoft .NET data types.
  • Message exchange

    SOAP permits message exchange over several protocols. Examples of the protocols that SOAP can use are the Simple Mail Transfer Protocol (SMTP), the Transmission Control Protocol (TCP), the File Transfer Protocol (FTP), and the HTTP protocol. HTTP-GET and HTTP-POST are limited to only the HTTP protocol.
  • Share information

    SOAP is the default protocol that is used to share information across applications.

Default protocols for the Microsoft .NET Framework 1.0 and for the .NET Framework 1.1

For the protocols that are permitted to communicate with a Web service, there is a difference between the .NET Framework 1.0 and the .NET Framework 1.1.

By default, you can use the SOAP protocol, the HTTP-GET protocol, or the HTTP-POST protocol to communicate with a Web service that runs on the .NET Framework 1.0. By default, you can only use the SOAP protocol to communicate with a Web service that runs on the .NET Framework 1.1.

Protocol bindings

For additional information about how you can specify the protocol bindings that your Web service supports, click the following article number to view the article in the Microsoft Knowledge Base:
815150 HOW TO: Limit the Web services protocols that a server permits

REFERENCES

For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
308359 HOW TO: Write a simple Web service by using Visual C# .NET
315935 HOW TO: Build and use XML Web services by using Visual Studio .NET

Properties

Article ID: 833383 - Last Review: February 6, 2004 - Revision: 1.1
APPLIES TO
  • Microsoft Web Services Enhancements for Microsoft .NET 1.1
  • Microsoft Web Services (included with the .NET Framework) 1.0
Keywords: 
kbxml kbhttp kbwebservices kbinfo KB833383
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com