CJS
CJS

Reputation: 1545

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

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

Our app has the Woodstox parser 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?

Upvotes: 3

Views: 3266

Answers (1)

Kevin
Kevin

Reputation: 30439

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

Upvotes: 3

Related Questions