- Understanding SOAP FAQs
- How do I invoke a method on a server when I'm using SOAP?
- Do M-POST calls have to occur before POST calls?
- When I'm using XML in SOAP, do I have to use namespaces?
- What happens when a method call has been requested?
- What are the values in a SOAP payload?
- What could cause the performance of a SOAP call to degrade or suffer?
- What kind of security does SOAP implement?
- When using SOAP, how do I implement a simple API for XML?
- How will SOAP impact .Net application development?
- How is ASP+ used when creating web services?
- How do I validate SOAP-based XML using a schema?
- When using SOAP, what is the most efficient way to access services from a client over the Internet?
How do I invoke a method on a server when Im using SOAP?
There is always some underlying work that must be done to invoke a method on a server. For SOAP as an RPC mechanism, this means constructing a valid HTTP request message. By default, clients should start by using the POST method; only in the case where this fails with an HTTP status of 405 Method Not Allowed should they attempt the request using M-POST. With the existing Web infrastructure, POST seems to be the reasonable choice at this point and time.
Although it is slightly easier to construct and parse the header fields for a POST than for an M-POST, conforming to M-POST can force clients to provide more detail about the client's request. Consider the examples of POST versus M-POST in the following Listing.
Listing POST Versus M-POSTSee code:
SOAP recommends that a SOAPAction header field be provided with each SOAP request, such that the server can gather call information without having to parse the entire SOAP payload. At this point, SOAPAction is optional, and clients only have to use it when mandated by the server. However, it is expected that many of you will want to include SOAPAction in your SOAP implementations, so your server can know the intention of the request message.
Source: This FAQ is excerpted from Understanding SOAP by Kennard Scribner and Mark C. Stiver (2000, Sams, ISBN 0672319225). Refer to this book for more detailed information on SOAP.