Hello. After debugging the failing route, I think that the properties I put in the map are correctly set when the data format is created, but not used at all to read the XSD files. The method "getJaxbProviderProperties" is not called during my execution. Is it a bug ? How can I make the data format work with such kind of XSD files ?
Thanks again. Regards. Le sam. 30 sept. 2023 à 11:59, Ephemeris Lappis <ephemeris.lap...@gmail.com> a écrit : > > 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.