Hi Sergey,James,

The application is quite old now, so CDATA is not an option since the
client may need to change.

I think writing a custom XMLStreamWriter may fit the purpose.

Thanks
Kiren

On Mon, Aug 3, 2015 at 11:36 PM, James Hutton <[email protected]>
wrote:

> I've had to deal with this and the only way I could see was to extend the
> jaxws/jaxb front-end and basically filter the output. Only works with two
> of the four writers.
> On Aug 3, 2015 4:34 PM, "Sergey Beryozkin" <[email protected]> wrote:
>
> > Hi Kiren
> > Can using CData blocks help ?
> > Another option is to use a Stax transformation feature and drop some
> > simple elements that may have the illegal values:
> >
> >
> >
> http://cxf.apache.org/docs/transformationfeature.html#TransformationFeature-Droppingoutputandinputelements
> >
> > Finally you can register a custom XMLStreamWriter and do a more
> > fine-grained control...
> >
> > HTH, Sergey
> >
> > On 03/08/15 13:55, Kiren Pillay wrote:
> >
> >> Hi
> >>
> >> Which is the most efficient way of removing illegal characters from the
> >> JAXB XML Output for a JAX-RS service?
> >>
> >> I have data values that have 0x00 which does get marshalled,  however
> the
> >> client falls over because of this. I want to prevent these values from
> >> being written to the JAXB Output stream.
> >>
> >> Regards
> >> Kiren
> >>
> >>
> >
>

Reply via email to