How to Read SOAP Header Information
Although this is an old topic, I’ve continued to receive questions on this subject. The question is “how can I read the SOAP header elements in PI and use them in mapping?”
Then, the follow-up question always related to how do I write an user-defined function in Message Mapping to access those header information, which might be accessible through the Global Container object?
But, in fact, the solution is much simpler. No coding is required. It is merely a check in the SOAP communication channel configuration.
The SOAP sender communication channel gives us an option to send the complete SOAP XML, including the header. Then, we just need to construct a message type in the Enterprise Service Repository (ESR) or Integration Repository (IR) to represent the XML. With that, message mapping can be performed.
Let us use the example below.
By default, the communication channel configuration is below:
The XML of the SOAP message is below, when retrieved from SXBM_MONI in PI:
By making two changes we can send the complete XML of the SOAP message, including the header:
As a result, the XML payload as seen in SXMB_MONI: