Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in encoding characters in SOAP  RSS feed

 
mamata surapaneni
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have written a Webservice which is returning a sequence of xml tags and values as a string. For example:

STRING S= "<NAME>ABC<\NAME><ADDRESS>ccc<\ADDRESS>"

When I invoke this in SOAP client
The output is
<NAME>ABC<\NAME><ADDRESS>ccc&ly\ADDRESS>

It's giving < instead of <, how can I get it.

Thanks,
Mamata
 
Yaron Naveh
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a correct behaviour.
Even if you add a certain string value in your client application, it is serialized as an XML message (SOAP) before going to the server. XML has some encoding rules that represent special characters differently. However your server application should be able to de-serialize this SOAP so you will get the old characters back.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!