• Post Reply Bookmark Topic Watch Topic
  • New Topic

> is not replaced with > in axis2 response

 
Prakash Venk
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using axis2 web service and i want to retun an XML as string in the response. In my response all the "<" are converted in to & lt; as expected by our client but ">" is not being converted to & gt;

Can anyone hlp me out with this. My client is expecting & gt; for >
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Axis does not change the payload on its own - your code needs to do that. Be sure to wrap this kind of data in a CDATA section.
 
Prakash Venk
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If that is the case then even "<" should not be escaped, right?.

My question is why only few characters are escaped (<) and few are not (>)
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Keep in mind that certain characters MUST be replaced by their logical entities, or placed in CDATA sections, in order to be transported over XML. See section 2.4 of the XML specification for more information, especially for how < and > differ from one another.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!