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
- Standard SOAP Message Formats Specified Using WSDL
Describes the standard SOAP message formats that are specified using WSDL.
- .NET Framework Support for SOAP Formats
Describes the support that the .NET Framework provides for SOAP formats.
- How to: Control the Overall SOAP Body Formatting for a Web Service Method
Describes how to control the overall SOAP body formatting for a Web service method.
- How to: Control Parameter and Return Value Formatting for a Web Service Method
Describes how control parameter and return value formatting for a Web service method.
- How to: Control Whether Web Service Method Parameters Are Enclosed in an Extra Element
Describes how to control whether Web service method parameters are enclosed in an extra element.
- How to: Modify the Default SOAP Formatting for an Entire Web Service
Describes how to modify the default SOAP formatting for an entire Web service.
- How to: Customize SOAP Messages with XML Serialization
Describes how to customize SOAP messages with XML serialization.
Reference
- System.Xml.Serialization
Contains classes that are used to serialize objects into XML format documents or streams.
- SoapRpcMethodAttribute
Specifies that SOAP messages sent to and from the method use RPC formatting.
- 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.
Related Sections
- Introducing XML Serialization
Provides a general definition of serialization, particularly XML serialization.
- SOAP Message Modification Using SOAP Extensions
Explains how to build extensions that modify the SOAP messages sent across the network for XML Web services created using ASP.NET and their clients.
- XML Web Services Using ASP.NET
Details how to create XML Web services, using ASP.NET.
- 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.