Skip to main content
Skip table of contents

<header>

This element defines a SOAP header that may be included in the SOAP envelope. The header's content is mapped to an element of the server request message or from an element of the server reply message by using a <mapping> element.

 

parents

<headers>

children

none

Attributes

AttributeData TypeUsageDefault ValueDescription
namexsd:NCNamerequirednoneThe name of the element. It must be unique within the parent <type>.
typexsd:NCNamerequirednoneThe data type of the element. Must be one of the build-in types or the name of a <type> element.
directionxsd:tokenrequirednone

The direction in which the header travels in the SOAP envelope. Must be one of: "in", "in/out" or "out". If "in", you must define a <mapping> to an element of the request message. If "out", you must define a <mapping> from an element of the reply message. If "in/out", you must define both mappings.

Remarks

If the <header> name = "txControl", no <mapping> is required. The txControl header is used to control transactions with SOAPam Server. See Controlling Transactions for more information. txControl headers must of type "txControl".

If you fail to define a corresponding <mapping> for a <header>, a SOAP fault will occur at runtime.

At runtime, if the expected "in" header is not present in the SOAP request envelope, the associated <mapping> will not be executed. The same behavior applies to "in/out", but the response header is generated nonetheless.

If the SOAP request envelope contains a header with the standard "mustUnderstand" attribute set to "True", a SOAP fault will occur if the corresponding <header> has not been defined.

Example

XML
<method ... >
 <headers>
   <header name="txControl" type="txControl" direction="in/out"/>
   <header name="my-context-info" type="my-context-type" direction="in/out"/>
 </headers>
 <request ... >
   <mappings>
     <mapping name="my-context-info" element="context"/>
     </mapping>
   </mappings>
 </request>
 <replies>
   <reply ... >
     <mappings>
       <mapping name="my-context-info" element="context"/>
       </mapping>
     </mappings>
   </reply>
 </replies>
</method>

 

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.