Hello.

I'm upgrading some projects to Camel 3.21.1, and I have some new
issues on the JAXB DataFormat.

The XML schema that is used contains a DOCTYPE declaration, and this
makes JAXB throw an exception. This schema is provided by another
enterprise and is shared by other applications, so I can't modify it
on my side.

org.xml.sax.SAXParseException; systemId:
file:/.../target/classes/schema/XYZ_v_0_2.xsd; lineNumber: 1;
columnNumber: 48; DOCTYPE is disallowed when the feature
"http://apache.org/xml/features/disallow-doctype-decl"; set to true.

This seems to be a new default property set by JAXB on the SAX parser.

I've tried to add "jaxbProviderProperties" with this map :

    <bean
        id="myJaxbProperties"
        class="java.util.HashMap">
        <argument>
            <map>
                <entry
key="http://apache.org/xml/features/disallow-doctype-decl";>
                    <value type="java.lang.Boolean">false</value>
                </entry>
            </map>
        </argument>
    </bean>

But this has no effect.

Is this the right way to get the previous behavior ? Is the map really
taken into account ?

Thanks for your help.

Regards.

Reply via email to