Header
The optional Header
element offers a flexible framework for specifying additional
application-level requirements. For example, the
Header
element can be used to specify a digital
signature for password-protected services; likewise, it can be used
to specify an account number for pay-per-use SOAP services. Many
current SOAP services do not utilize the Header
element, but as SOAP services mature, the Header
framework provides an open mechanism for authentication, transaction
management, and payment authorization.
The details of the Header
element are
intentionally open-ended, thereby providing maximum flexibility for
application providers. The protocol does, however, specify two header
attributes:
- Actor attribute
The SOAP protocol defines a message path as a list of SOAP service nodes. Each of these intermediate nodes can perform some processing and then forward the message to the next node in the chain. By setting the
Actor
attribute, the client can specify the recipient of the SOAP header.- MustUnderstand attribute
Indicates whether a
Header
element is optional or mandatory. If set totrue
,[5] the recipient must understand and process theHeader
attribute according to its defined semantics, or return a fault. (See Table 3-2 for theMustUnderstand
fault code.)
Here is an example Header
:
<SOAP-ENV:Header> <ns1:PaymentAccount xmlns:ns1="urn:ecerami" SOAP-ENV: mustUnderstand="true"> orsenigo473 </ns1:PaymentAccount > </SOAP-ENV:Header>
The Header
specifies a payment account, ...
Get Web Services Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.