Well, i have found a solution to insert a custom "escaper". First, i need a filterWriter that escapes like i want. I made one (/CustomXmlEscapingUTFWriter/) based on /com.ctc.wstx.io.UTFTextWriter/. I add "<" escape in all cases.
I also created a custom /org.codehaus.stax2.io.EscapingWriterFactory/ that uses my filterWriter. I finally created a new interceptor that add a XMLOutpuFactory in the message properties. This factory is then retrieved in StaxOutInterceptor. I hope this could help other users. -- Christophe Aki Yoshida-3 wrote > yes. something like that. > > I think there was somone trying to output illegal XML characters or > something like that this way. But I couldn't find his posting anymore. > > Then, you can set the context property over the cxf endpoint > configuration (over its properties). > http://cxf.apache.org/docs/jax-ws-configuration.html > <jaxws:properties> > > <entry key="javax.xml.stream.XMLOutputFactory" ref="..."/> > regards, aki > > 2013/8/14 Christophe Collet < > collet.christophe@ > >: >> The escaping seems to be done in com.ctc.wstx.sw.BufferingXmlWriter >> There's a way to add a custom "escaper" by adding a EscapingWriterFactory >> in >> the config of the XMLWriter. >> >> The SimpleNSStreamWiter is created from a XMLOutputFactory. It seems that >> a >> custom XMLOutputFactory can be passed in the contextualProperty of the >> message. (retrieved in StaxOutInterceptor). >> >> Thus, i need to create my own XMLOutputFactory in order to add a custom >> EscapingWriterFactory at the XMLWriter instantiation. >> >> That's the "cleanest" way i think. But if there's still a "dirty" way >> that >> "hard replace" in the outputstream, i'm ok with it right now. >> >> Regards >> >> >> >> -- >> View this message in context: >> http://cxf.547215.n5.nabble.com/Escaping-right-angle-bracket-tp5732274p5732329.html >> Sent from the cxf-user mailing list archive at Nabble.com. -- View this message in context: http://cxf.547215.n5.nabble.com/Escaping-right-angle-bracket-tp5732274p5732406.html Sent from the cxf-user mailing list archive at Nabble.com.
