开发者

Can I can configure cxf to use a specific XML parser?

开发者 https://www.devze.com 2022-12-19 20:10 出处:网络
Is there a way to specify which XML parser cxf uses?Either through the cfx.xml file or programmatically?

Is there a way to specify which XML parser cxf uses? Either through the cfx.xml file or programmatically?

Our app has the Woodstox par开发者_开发问答ser on its classpath, and cxf seems to be using that by default. However, the Woodstox implementation seems to truncate large Base64 encoded byte arrays in the SOAP packet.

Removing Woodstox from the classpath eliminates this truncation problem, but that's not an option right now since other parts of our app also depends on Woodstox.

It would be ideal if I could simply tell cxf to use another XML parser. Is this possible?


Try setting the following system property:

javax.xml.stream.XMLInputFactory=com.sun.xml.internal.stream.XMLInputFactoryImpl

See XMLInputFactory#newInstance() for details on how the XMLInputFactory is configured

0

精彩评论

暂无评论...
验证码 换一张
取 消