Modifying SOAP Envelope using XSLT



I am fairly new with XSLT and wondering how to change the XML SOAP message to add more tags in between


Source XML:





<soapenv:Envelope xmlns:soapenv="http://ift.tt/sVJIaE" xmlns:soapenc="http://ift.tt/wEYywg" xmlns:xsd="http://ift.tt/tphNwY" xmlns:xsi="http://ift.tt/ra1lAU">
<soapenv:Body>
<DataValidationFailureFault xmlns="http://sample.com">
<ValidationErrorList>
<ValidationError>
<ErrorCode>1234</ErrorCode>
<ErrorString>Test Error</ErrorString>
</ValidationError>
</ValidationErrorList>
</DataValidationFailureFault>
</soapenv:Body>
</soapenv:Envelope>



After XSLT, I want the XML SOAP to look like:





<soapenv:Envelope xmlns:soapenv="http://ift.tt/sVJIaE" xmlns:soapenc="http://ift.tt/wEYywg" xmlns:xsd="http://ift.tt/tphNwY" xmlns:xsi="http://ift.tt/ra1lAU">
<soapenv:Body>
<soapenv:Fault>
<faultcode>HardCoded Value</faultcode>
<faultstring>HardCoded Value</faultstring>
<detail>
<DataValidationFailureFault xmlns="http://sample.com">
<ValidationErrorList>
<ValidationError>
<ErrorCode>1234</ErrorCode>
<ErrorString>Test Error</ErrorString>
</ValidationError>
</ValidationErrorList>
</DataValidationFailureFault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>



No comments:

Post a Comment