Using the HTTP Binding Component

SOAP 1.2 body Element

The SOAP 1.2 body element specifies how the message parts appear within the SOAP body element.

Table 11 SOAP 1.2 body Element Attributes

Property 

Description 

Required or Optional 

Example 

parts  

Indicates the parts from the WSDL message that will be included in the body element 

Optional 

part1 

use 

Indicates how message parts are encoded in the SOAP body 

Optional 

literal 

encodingStyle 

Indicates a particular encoding style to use 

Optional 

http://someEncodingStyle 

namespace 

Indicates the namespace of the wrapper element for RPC style messages 

Optional 

urn:someNamespace 

The following example illustrates the SOAP 1.2 body element.


<wsdl:definitions ... >
	
  <wsdl:binding ... >
	<wsdl:operation ... >
		<wsdl:input>
			<soap12:body parts="soap12:tParts" ?
				      namespace="xs:anyURI" ?
				      use="literal|encoded" ?
				      encodingStyle="xs:anyURI" ? ... />
		...
		</wsdl:input>
		<wsdl:output>
			<soap12:body parts="soap12:tParts ?
					namespace="xs:anyURI" ?
					use="literal|encoded" ?
					encodingStyle="xs:anyURI" ? ... />
		...
		</wsdl:output>
	</wsdl:operation>
	...
  </wsdl:binding>
...
</wsdl:definitions>

The optional parts attribute (of type soap12:tParts, which is a list of xs:NMTOKENs) indicates which message parts are bound to the SOAP 1.2 body element of the message. Other message parts may be bound to other portions of the message, such as when SOAP is used in conjunction with the multipart/related MIME binding, or when bound as SOAP header blocks. If the parts attribute is omitted, then all of the parts defined by the associated wsdl:message are assumed to be included in the SOAP body.

The use attribute, if present, indicates whether the message parts are encoded using some encoding rules, or the parts define the concrete schema of the message. If the value is "encoded" the message parts are encoded using encoding rules that are specified by the value, actual or implied, of the encodingStyle attribute. If the value is "literal" then the message parts are literally defined by the schema types referenced.

The encodingStyle attribute (of type xs:anyURI), if present, identifies the set of encoding rules used to construct the message. This attribute must not be present unless the style attribute of the soap12:binding element of the containing wsdl:binding has a value of “rpc” and the use attribute on the containing soap12:body element has a value of "encoded". The value of the encodingStyle attribute, if present, must not be a relative URI.