Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP response contains < instead of <

Former Member
0 Kudos


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 "&lt;" and "&gt;", 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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

2 REPLIES 2

Former Member
0 Kudos

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.

haricahy1
Participant
0 Kudos

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