Modify XML request paylaod.

Hi I am trying to modify a XML request payload sample below. remove xml few tags here.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header>
		<Bodytest12e/>
   </soapenv:Header>
   <soapenv:Body>
		<Bodytest>data</Bodytest>
		<Bodytest1>data1</Bodytest1>
   </soapenv:Body>
</soapenv:Envelope>

I want to remove the soap header XML tag completely <soapenv:Header> </soapenv:Header> and just read the SOAP body in the request payload so when I apply xmltojson the conversion is proper. Appreciate your help.

1 1 283
1 REPLY 1

If you want to remove it BEFORE applying the xml2json conversion, then you're best bet is to use an XSLT. If you Google "xslt remove soap envelope" you'll find plenty of XSLT examples to do just that.

The other option is to extract the body once it has been converted to json. You can use the JSONPath option of ExtractVariable to do that.