Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to get DateTime from PI message SOAP Header


Can you please let me know how we can get the time message received in PI from the SOAP message header


I would like to capture this value and send it in the payload of the message, initially I was using the Current TIme date function.

However, if I can get the time received value from the SOAP Header message, It will be more accurate in providing the Time the message was received by IE.

Thank you,


Sample SOAP Header from MONI:-

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
- <!--  Call Adapter 
- <SOAP:Envelope xmlns:SOAP="" xmlns:SAP="">
- <SOAP:Header>
- <SAP:Main xmlns:SAP="" xmlns:SOAP="" versionMajor="003" versionMinor="000" SOAP:mustUnderstand="1" wsu:Id="wsuid-main-92ABE13F5C59AB7FE10000000A1551F7">
- <SAP:Sender>

Former Member
Former Member replied

If you want to get the TimeSent from SOAP header and map it to some field in ur message then u can easily do it using following UDF :-

GlobalContainer globalContainer;globalContainer = container.getGlobalContainer();
java.util.Map param = globalContainer.getParameters();.
String timeSent = (String) param.get (StreamTransformationConstants.TIME_SENT);
return timeSent ;

Note: This UDF won't need any input. So u need not to maintain any variable in UDF signature.

Edited by: Samiullah Qureshi on Aug 18, 2010 9:41 AM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question