cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Capture xml soap envelope in request attribute

cp_patel
Participant

I have a method which is sending some xml soap request to third party for getting payment done. How can I capture the request made by the method in request attribute? Request here is an envelope. I am interested to capture the collection amount from the request which is presented in bold in the below example. Please guide me if it is possible to do or not.

For ex:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body xmlns:ns1="http://iims.services/types/">
<ns1:collectpremium_IssuepolElement>
<ns1:userCode>SKIRCL</ns1:userCode>
<ns1:rolecode>SUPERUSER</ns1:rolecode>
<ns1:PRetCode>1</ns1:PRetCode>
<ns1:userId>SKIRCL</ns1:userId>
<ns1:stakeCode>BROKER</ns1:stakeCode>
<ns1:roleId/>
<ns1:userroleId/>
<ns1:branchcode/>
<ns1:PRetErr/>
<ns1:sourceOfCollection>A</ns1:sourceOfCollection>
<ns1:collectionNo/>
<ns1:receivedFrom/>
<ns1:instrumentAmt>5987</ns1:instrumentAmt>
<ns1:collections>
<ns1:accountCode>9100.130200</ns1:accountCode>
<ns1:draweeBankName/>
<ns1:subCode/>
<ns1:draweeBankCode/>
<ns1:collectionMode>ECS</ns1:collectionMode>
<ns1:debitCreditInd>D</ns1:debitCreditInd>
<ns1:scrollNo/>
<ns1:chequeType/>
<ns1:quoteNo>1302001610602692</ns1:quoteNo>
<ns1:collectionAmount>5987</ns1:collectionAmount>
<ns1:chequeDate/>
<ns1:chequeNo>GHMP4557047775</ns1:chequeNo>
<ns1:draweeBankBranch/>
</ns1:collections>
<ns1:quoteNo>1302001610602692</ns1:quoteNo>
<ns1:collectionType>A</ns1:collectionType>
<ns1:policyNo/>
<ns1:documentLink/>
</ns1:collectpremium_IssuepolElement>
</soapenv:Body>
</soapenv:Envelope>
2 REPLIES 2

Julius_Loman
DynaMight Legend
DynaMight Legend

Not directly. Request attributes are limited to ~250 characters. You have only two options I believe:

  • Find the code level method which is passing the collectionAmount somewhere in your code and setup request attribute on that method capturing the value
  • Use OneAgent SDK and modify your application code to push the value via OneAgent SDK API as a request attribute. For this approach, you need to modify the application code.
Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Hi @Július L.,

I have a use case like this one, and have a doubt: when you refer to ~250 characters, is that what is captured, or what eventually is than saved, say after regex parsing.

Given that the option here would be to grab a POST parameter, and since a SOAP body does not constitute a parameter in HTTP style, do you believe there would be a way around it, even if the ~250 byte limit applies?

Antonio Sousa

Featured Posts