Hi

On Mon, May 10, 2010 at 2:54 AM, Mustafa Sezgin <[email protected]> wrote:

>
> Hi all,
>
>
> Im trying to find the best solution to a character encoding issue we are
> experiencing. Some of the strings we marshal can contain some chars which
> end up making the XML document generated invalid, and as a result, we get
> the following XML returned to the client
>
>
>
>
> <ns1:XMLFault 
> xmlns:ns1="http://cxf.apache.org/bindings/xformat";><ns1:faultstring
> xmlns:ns1="http://cxf.apache.org/bindings/xformat";>java.lang.IllegalArgumentException:
> Wrong media type parameter, seperator is
> missing</ns1:faultstring></ns1:XMLFault>
>
>
Looks like the exception is thrown here at the moment of generating the
error response, specifically, a media type contains a parameter with no
value, I've removed this restriction.



>
> What is the best way to go about this? We want to apply a solution to all
> of our services which will encode special chars like '&', '<' and '>' so
> that they do not affect the generated XML response.
> Is this something we have to do manually using an outbound interceptor or
> is there a flag somewhere relating to the JAXB marshaller that we can enable
> which will do the encoding for us automatically?
>
> How exactly are such strings marshalled ? I've tried to reproduce but I can
see illegal characters such as '&' and '<' being escaped. Can you show some
sample code please ?

thanks, Sergey


>
> Thanks in advance!

Reply via email to