Share via


Customizing SOAP Message FormattingĀ 

For ASP.NET Web services that use SOAP to communicate with clients, a sophisticated mechanism is available for controlling the format of the SOAP messages sent in requests and responses. SOAP dictates that the contents of the SOAP messages sent to and from a Web service must be in XML contained in Body and Header elements that in turn are children of an Envelope element (belonging to the namespace https://schemas.xmlsoap.org/soap/envelope/). However, SOAP does not restrict the formatting of the XML.

To produce and consume Web services that use different formatting, the .NET Framework provides an attribute-based mechanism for controlling the format of the XML in the SOAP message. In addition, an attribute-based mechanism for specifying the specific element and attribute names of the SOAP sent over the network is available for controlling the SOAP at a finer level of detail.

Each section in this topic refers to a corresponding How-to topic that shows how to use the attributes discussed.

In This Section

Reference

  • SoapDocumentServiceAttribute
    Applies the optional SoapDocumentServiceAttribute attribute to an XML Web service sets the default format of SOAP requests and responses sent to and from the Web service methods of the Web service.
  • SoapDocumentMethodAttribute
    Applies the SoapDocumentMethodAttribute attribute to a method specifies that SOAP messages to and from the method use Document formatting.
  • SoapRpcServiceAttribute
    Sets the default format of SOAP requests and responses sent to and from Web service methods of a Web service.
  • 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.