14 Dec 2022 06:52 AM - last edited on 14 Dec 2022 08:29 AM by Ana_Kuzmenchuk
Dear Community,
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:alr="http://www.alrajhiwebservices.com/" xmlns:ejad="http://www.ejada.com/">
<soapenv:Body>
<ejad:NotificationSendRq>
<ejad:Hdr>
<alr:Msg>
<alr:RqID>3a3c3005-dee7-41d1-9379-805a4743e350</alr:RqID>
<alr:SvcID>0080</alr:SvcID>
<alr:SubSvcID>0500</alr:SubSvcID>
<alr:FuncID>0002</alr:FuncID>
<alr:MsgTimestamp>2019-03-12T11:05:32</alr:MsgTimestamp>
<alr:MsgVer>1.0</alr:MsgVer>
</alr:Msg>
<alr:Agt>
<alr:UserLang>EN</alr:UserLang>
</alr:Agt>
<alr:Sys>
<alr:ChID>OTHER</alr:ChID>
<alr:SessionID>3a3c3005-dee7-41d1-9379-805a4743e350</alr:SessionID>
<alr:OSID>00</alr:OSID>
<alr:SessionLang>EN</alr:SessionLang>
</alr:Sys>
</ejad:Hdr>
<ejad:Body>
<ejad:EventCode>DYNATRC_1</ejad:EventCode>
<ejad:RecipsList>
<ejad:RecipInfo>
<ejad:LangPref>EN</ejad:LangPref>
<ejad:NotificationMethodInfo>
<ejad:NotificationMethod>SMS</ejad:NotificationMethod>
<ejad:Contact>966500000000</ejad:Contact>
</ejad:NotificationMethodInfo>
<ejad:ParamList>
<ejad:ParamItem>
<ejad:ParamCd>MSG_BDY</ejad:ParamCd>
<ejad:ParamVal>Message notification text</ejad:ParamVal>
</ejad:ParamItem>
</ejad:ParamList>
</ejad:RecipInfo>
</ejad:RecipsList>
</ejad:Body>
</ejad:NotificationSendRq>
</soapenv:Body>
</soapenv:Envelope>Solved! Go to Solution.
14 Dec 2022 10:54 AM - edited 14 Dec 2022 10:54 AM
You can create a Problem Notification (Custom Integration) and add that entire block as the payload. Then just replace the relevant fields with placeholders. e.g.
<ejad:ParamVal>Message notification text</ejad:ParamVal> with
<ejad:ParamVal>{ProblemDetailsText}</ejad:ParamVal>
14 Dec 2022 10:56 AM
Thanks @pahofmann
Yes just tried it before and I thing it will work (Waiting for port opening).
The most important thing is to add the right Header (content type), otherwise, the XML is not accepted by Dynatrace.
BRs.
14 Dec 2022 11:06 AM
That depends more on the system receiving the request not dynatrace.
If they expect the content-type header to be there you need to add it to the integration 🙂
14 Dec 2022 12:38 PM - edited 14 Dec 2022 12:41 PM
Its Dynatrace Itself that not accept the XML payload if you not put the header, not the recipient.
14 Dec 2022 02:32 PM - edited 14 Dec 2022 02:32 PM
Ah you're right ofc. It tries to parse the body as a json otherwise by default.
Been a while since I had to use XML for a problem notification 😜