users@jersey.java.net

Re: [Jersey] Marshalling CDATA with JAXB

From: Felipe Gaścho <fgaucho_at_gmail.com>
Date: Mon, 10 Aug 2009 01:57:20 +0200

https://jaxb.dev.java.net/faq/JaxbCDATASample.java

perhaps URL Decode works as well

On Sun, Aug 9, 2009 at 10:01 PM, MS<da_bus_at_arcor.de> wrote:
> Hi,
>
> I have another question related to JAXB and Jersey. I would like to return
> an XML representation that contains CDATA, but apparently JAXB can't deal
> with it correctly. There is a FAQ entry on the JAXB page:
> https://jaxb.dev.java.net/faq/index.html#marshalling_cdata
>
> The XML content in the http request looks like this:
> <myXml>
>   <tagWithCdata><![CDATA[<test>123</test>]]></tagWithCdata>
> </myXml>
>
> The String "tagWithCdata" in the Java object like this: "<test>123</test>"
>
> And the marshalled XML in the http response like this:
> <myXml>
>   <tagWithCdata>&lt;test&gt;123&lt;/test&gt;</tagWithCdata>
> </myXml>
>
> Does anyone have an idea what is the best way to get a response that looks
> like the request and includes CDATA?
>
> Thanks a lot!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>



-- 
Looking for a client application for this service:
http://fgaucho.dyndns.org:8080/footprint-service/wadl