users@jersey.java.net

Re: [Jersey] entities encoding issues in the response

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 19 May 2008 10:23:44 +0200

Arul Dhesiaseelan wrote:
> Paul,
>
> Sorry, this error seems to have occurred when the CXF service was down.
> Now I started both the services and I see this error go away. Lookslike,
> Jersey is now able to find my custom messagebodywriter.
>
> INFO: Provider classes found:
> class rest.jaxb.CDATAProvider
>
> But when I invoke the REST method, I still see this un-encoded CDATA.
>
> <cell>&lt;![CDATA[&lt;div class=&quot;progressOuterRow&quot;&gt;&lt;
> div class=&quot;progressInnerRow&quot; style=&quot;width:
> 0px;&quot;&gt;&lt;/div
> &gt;&lt;div class=&quot;progressText&quot;&gt;0/0
> MB&lt;/div&gt;&lt;/div&gt;]]&g
> t;</cell>
>
> Am I missing something?
>

It is escaping the CDATA, are you writing the CDATA section explicitly?
or are you deferring to XMLStreamWriter.writeCData? Can you send the
wrapper code?

It may be a problem with your XMLStreamWriter method, or it could be a
bug with the XMLStreamWriter implementation. I recommend writing a stand
alone test using XMLStreamWriter.writeCData to verify it is doing the
right thing.

Paul.

> Thanks for all the help.
>
> Regards,
> Arul
>
>
> Paul Sandoz wrote:
>> Hi Arul,
>>
>> That error appears independent of the RESTful service, is that the
>> case? i.e. this error would be reproducible if you wrote some stand
>> alone Java code to invoke a CXF JAX-WS Service ?
>>
>> More specifically the problem appears to be with the XML document
>> returned from the CXF JAX-WS Service. The client is having trouble
>> parsing it, most likely for the reason that Tatu gives.
>>
>> Paul.
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109