0

I have Datapower http based MPG service. I am getting response soap message from backend which has Size element values Ex:

<Size><10000</Size>
<Size>10000></Size>

It is showing correctly as it is in datapower probe. but when it comes to soapUI lessthan symbol not showing correctly.Showing like below:

<Size>&lt;10000</Size>
<Size>10000></Size>

How to get '<' less than symbol correctly?

Thanks for your help in advance.

Mike
  • 35
  • 9

2 Answers2

1

The follow symbols in a XML: <, >, ",',& could be replaced by &lt;,&gt;,&quot;,&apos;,&amp; respectively. In the XML text to avoid errors it's recommended to replace all, but only < and & must be replaced all the times (as @michael.hor257k comments). Alternatively to avoid the replacement it's possible to use CDATA).

Probably Datapower "prettify" the response before it shows you (here I'm only guessing since I don't know Datapower).

SOAPUI doesn't perform any transformation in your response and it is showing the response like it is, this is why you see &lt; character; due your web server replace < to avoid generate a invalid XML response.

Here you can see a good response explaining the general rules for this characters in XML depends on where they are.

Community
  • 1
  • 1
albciff
  • 18,112
  • 4
  • 64
  • 89
0

Less than symbol is escape character in XSLT. So you can use &#x003C; instead of &lt;

Rudramuni TP
  • 1,268
  • 2
  • 16
  • 26