Integration Server 10.5 | Web Services Developer’s Guide | Web Services Addressing (WS-Addressing) | Accessing WS-Addressing Headers of a SOAP Message
 
Accessing WS-Addressing Headers of a SOAP Message
If you need to access and/or update the WS-Addressing headers of a SOAP message, you can do so using the following methods:
*Use pub.soap.handler:getMessageAddressingProperties.
In a handler service, invoke the pub.soap.handler:getMessageAddressingProperties service to get the message addressing properties of the SOAP message in the provided message context.
For more information about the pub.soap.handler:getMessageAddressingProperties service, see pub.soap.handler:getMessageAddressingProperties.
*Use web service handlers to access, remove, or add the WS-Addressing headers.
In a handler service, invoke the following services:
*The pub.soap.handler:getHeaderBlock service to access the WS-Addressing headers
*The pub.soap.handler:removeHeaderBlock service to remove the WS-Addressing headers
*Thepub.soap.handler:addHeaderBlock service to add the WS-Addressing headers
Note:
To update a header, first remove it, then add the updated header.
Integration Server provides IS document types that define the structure of the WS-Addressing headers. These IS document types reside in the pub.soap.wsa folder in the WmPublic package. You can use these IS document types when specifying a value for the documentType input parameter of the getHeaderBlock and addHeaderBlock services.
For more information about the pub.soap.handler:getHeaderBlock service, the pub.soap.handler:removeHeaderBlock service pub.soap.handler:addHeaderBlock services, and the IS document types for WS-Addressing headers, see the webMethods Integration Server Built-In Services Reference.
Note:
These IS document types for WS-Addressing headers cannot be used for an RPC/Encoded web service descriptor.
*Make the SOAP headers available in the pipeline.
You can instruct Integration Server to place the SOAP headers in the endpoint service or connector pipeline by enabling the provider and/or consumer web service descriptor’s Pipeline headers enabled property. For more information about adding headers to the pipeline, see Including SOAP Headers in the Pipeline.
Alternatively, in a service handler you can use the pub.soap.handler:getServicePipeline service to access the pipeline for an endpoint service or connector. Use pub.soap.handler:getMessageAddressingProperties or pub.soap.handler:getHeaderBlock services to retrieve the addressing headers, and then, put the retrieved headers into the endpoint service or connector pipeline. For more information about these services, see the webMethods Integration Server Built-In Services Reference.