3.5. SOAP Header element

发布时间 :2023-12-18 23:00:02 UTC      

Optional SOAP Header element contains header information.

3.5.1. SOAP Header element

The optional SOAP Header element can contain application-specific information about SOAP messages (such as authentication, payments, and so on).

If Header element is provided, it must be a Envelope the first child of the element.

Note: all Header the immediate child element of the element must be a qualified namespace.

<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<soap:Header>
  <m:Trans xmlns:m="http://www.w3schools.com/transaction/"
  soap:mustUnderstand="1">234
  </m:Trans>
</soap:Header>
...
...
</soap:Envelope>

The above example contains a header with a “Trans” element with a value of 234. the value of the “mustUnderstand” attribute of this element is “1”.

SOAP is in the default namespace (” http://www.w3.org/2001/12/soap-envelope ”) defines three attributes.”

These three attributes are: actor mustUnderstand and encodingStyle . These properties, defined in the SOAP header, define howthe container handles SOAP messages.

3.5.2. MustUnderstand attribute

The mustUnderstand property of SOAP can be used to identify whether the title item is mandatory or optional for the recipient to process it.

If you add “mustUnderstand=” 1 “to a child element of the Header element,it indicates that the recipient processing the header must recognize the element. If the recipient cannot recognize the element, it must fail to process the header.

Grammar

soap:mustUnderstand="0|1"

Example

<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<soap:Header>
  <m:Trans xmlns:m="http://www.w3schools.com/transaction/"
  soap:mustUnderstand="1">234
  </m:Trans>
</soap:Header>
...
...
</soap:Envelope>

3.5.3. Actor attribute

SOAP messages can be propagated from a sender to a receiver by passing through different endpoints along the message path. Not all parts of the SOAP message are intended to be delivered to the final endpoint of the SOAP message, but on the other hand, it may be intended to be delivered to one ormore endpoints on the message path.

SOAP’s actor property can be used to set the Header element is addressed to a specific endpoint.

Grammar

soap:actor="*URI*"

Example

<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<soap:Header>
  <m:Trans xmlns:m="http://www.w3schools.com/transaction/"
  soap:actor="http://www.w3schools.com/appml/">234
  </m:Trans>
</soap:Header>
...
...
</soap:Envelope>

3.5.4. EncodingStyle attribute

SOAP’s encodingStyle property is used to define the data type used in the document. This attribute can appear in any SOAP element and is applied to the contents of the element and to all child elements of the element.

There is no default encoding for SOAP messages.

Grammar

soap:encodingStyle="*URI*"

Principles, Technologies, and Methods of Geographic Information Systems  102

In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress.