AnsweredAssumed Answered

How to convert xml request body into string removing xml declaration

Question asked by irfan.mugale on Dec 22, 2017
Latest reply on Dec 26, 2017 by irfan.mugale

How to remove XML declaration and white spaces in request XML and convert the XML into string

 

Gateway 9.2

I am able to remove white spaces and XML declaration using regular expression assertion but I am not able to get my desired response

 

Input xml 

<?xml version="1.0" encoding="UTF-8"?>
<Request>
<sourceappcode>RCAS</sourceappcode>
<RqUID></RqUID>
<message_type_cd>KB100</message_type_cd>
<TransactionId>ABC12345</TransactionId>
<reportType>xml</reportType>
<txnId>qwert</txnId>
<vendorId>123456</vendorId>
</Request>

 

Output xml

<Request><sourceappcode>RCAS</sourceappcode><RqUID></RqUID>message_type_cd>KB100</message_type_cd><TransactionId>ABC12345</TransactionId>reportType>xml</reportType><txnId>qwert</txnId><vendorId>123456</vendorId></Request>

 

Need to convert the request XML into string by removing XML declaration 

Outcomes