Cloud Application Integration (On-Premises) : Integration Server Built-In Services : SOAP Folder : pub.soap.handler:getHeaderElement
pub.soap.handler:getHeaderElement
WmPublic. Deprecated - Replaced by pub.soap.handler:getHeaderBlock.
Retrieves a header element from a SOAP message.
Input Parameters
messageContext
Object Message context containing the SOAP message from which to retrieve a header element.
A message context contains properties for the SOAP message and provides access to the SOAP message. Integration Server creates the message context and passes it to the header handler. All handlers invoked by a given instance of a SOAP request or SOAP response use the same message context, which enables you to use the message context to pass information among handlers.
QName
Document Optional. Qualified name (namespace name and local name) of the header element to retrieve.
The QName document references the pub.soap.utils:QName document type. If you do not specify QName, you must specify documentType.
documentType
String Optional. Fully qualified name of the IS document type that specifies the structure to impose on the resulting document. Integration Server uses the explicit universal name assigned to the document type to determine which header element to retrieve from the SOAP message.
If you do not specify documentType, you must specify QName.
Output Parameters
outputHeaderDocument
Document Header element from the SOAP message in the form of a document (IData).
Usage Notes
QName and documentType are mutually exclusive. Even though the parameters are optional, you must specify one or the other. If you do not specify either, Integration Server displays the following error:
[ISS.0088.9422] One of the mutually exclusive parameter QName or
documentType is missing or invalid.
If you specify values for QName and documentType, Integration Server uses QName and ignores documentType.
Example
Suppose that messageContext contains a SOAP message with the following header:
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:user="userHandlerNamespaceName" xmlns:pfx="pfx1namespace"
xmlns:ns1="ns1namespace" xmlns:ns2="ns2namespace">
<SOAP-ENV:Header>
<user:userHandlerLocalName>
<pfx:myLocalName>
<ns1:myField>
<ns2:myFieldValue>someValue</ns2:myFieldValue>
</ns1:myField>
</pfx:myLocalName>
</user:userHandlerLocalName>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
...
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Additionally, suppose that pub.soap:handler:getHeaderElement uses the following input values, where messageContext has already been obtained:
Input Parameter
Provided Value
QName
namespaceName
userHandlerNamespaceName
localName
userHandlerLocalName
documentType
documentTypes:myHeaderStructure
The structure of documentTypes:myHeaderStructure looks like this:
The prefixes in documentTypes:myHeaderStructure refer to the following namespaces.
Prefix
Namespace
myPrefix
pfx1namespace
myNS1
ns1namespace
myNS2
ns2namespace
Execution of the pub.soap.handler:getHeaderElement service results in the following value for outputHeaderDocument:
Integration Server uses the following conventions in outputHeaderDocument:
*outputHeaderDocument always contains a document list named HDRDOC1:localName. The document list contains the header retrieved by the pub.soap.handler:getHeaderElement service.
*Integration Server uses HDRDOC1 as the prefix for the header element (block). The value of HDRDOC1 is the namespace name portion of the QName. The outputHeaderDocument/nsDecls document identifies the namespace associated with the namespace prefix of the requested header element (block).
*TheHDRDOC1:localName [0] document contains an nsDecls document that identifies the namespace prefixes used within the retrieved header element. Integration Server replaces the prefixes used in the SOAP envelope with the prefixes that the document type specifies for the same namespaces.
Integration Server uses the same general structure when placing SOAP headers in the pipeline for IS services acting as web services. For more information, see "Server Configuration Parameters" in webMethods Integration Server Administrator’s Guide.
See Also
pub.soap.handler:addHeaderElement
pub.soap.handler:removeHeaderElement
Copyright © 2015- 2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback