This article discusses differences among the
following protocols that are used to access Microsoft ASP.NET services:
- Hypertext Transfer Protocol (HTTP)-GET
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
- 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 headersThe 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
Complex input parametersASP.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:
INFO: Supported data types for Web services that are called through the
SOAP protocol or the HTTP protocol
Return parameterASP.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
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.
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:
TO: Limit the Web services protocols that a server permits
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
HOW TO: Write a simple Web service by using Visual C# .NET
Build and use XML Web services by using Visual Studio .NET
Article ID: 833383 - Last Review: February 6, 2004 - Revision: 1.1
- Microsoft Web Services Enhancements for Microsoft .NET 1.1
- Microsoft Web Services (included with the .NET Framework) 1.0
|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.