Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I restrict converting the < > into special characters for CDATA?

 
Sujay Patil
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am calling a Web Service with CDATA elements. I am facing issue with passing objects like shown below,

<![CDATA[<name>ABC</name>]]>

It is getting converted in to below string while passing (just without - ),

&-lt;![CDATA[<name>ABC</name>]]&-gt;

How can I restrict converting the < > for CDATA? I want to pass the data with < > only. The conversion of these characters is creating issue while receiving at the Web Service. I don't have control over the service. I have to
handle this at the client level. I know it should work, but it is not working for my execution. I am using JAXB for client.

- Sujay
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic