07-13-2015 4:19 PM
Hi,
I have an XML file that is the SOAP Response returned from a Web Service call. I've created an XSLT that will strip out the <FAULTCODE> and <FAULTSTRING> elements. When testing this XSLT in transaction STRANS, it works perfectly. When I read this file within an ABAP and pass the XML string to the XSLT via the CALL TRANSFORMATION statement, it doesn't work.
The reason for this is that, looking in the XSLT debugger, the opening and closing tags "<" and ">" in the source have been escaped into "<" and ">", which is messing up the xpath within the transformation, i.e. it can't find the required nodes.
Can anyone help with this and explain why the tags are being escaped, and how to deal with it?
Thanks,
Pete
07-21-2015 11:11 AM
Found out what it was myself in the end:
Correct:
CALL TRANSFORMATION z_soap_fault
SOURCE XML im_xml
RESULT fault = ls_fault.
Incorrect:
CALL TRANSFORMATION z_soap_fault
SOURCE XML = im_xml
RESULT fault = ls_fault.
Both are syntactically correct but do mean different things, hence the unexpected results.
07-21-2015 11:11 AM
Found out what it was myself in the end:
Correct:
CALL TRANSFORMATION z_soap_fault
SOURCE XML im_xml
RESULT fault = ls_fault.
Incorrect:
CALL TRANSFORMATION z_soap_fault
SOURCE XML = im_xml
RESULT fault = ls_fault.
Both are syntactically correct but do mean different things, hence the unexpected results.
10-19-2021 9:30 AM
Helo Pete/Other expert,
I'm also getting invalid format such as : <?xml version="1.0" encoding
Can any please help.
Thanks in advance.
Best Regards,
Hari Cahyadi