Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-18736

Duplicate schema/cxfEndpoint.xsd resource in camel-cxf-spring-rest and camel-cxf-spring-soap jars

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.18.3
    • 3.18.4, 3.20.0
    • came-cxf
    • None
    • Unknown

    Description

      We have a project that depends on both camel-cxf-spring-rest.jar and camel-cxf-spring-soap.jar. These both ship with identically named schema/cxfEndpoint.xsd resources:

      https://github.com/apache/camel/blob/main/components/camel-cxf/camel-cxf-spring-rest/src/main/resources/schema/cxfEndpoint.xsd

      https://github.com/apache/camel/blob/main/components/camel-cxf/camel-cxf-spring-soap/src/main/resources/schema/cxfEndpoint.xsd

      which are referenced in spring.schema files:

      https://github.com/apache/camel/blob/main/components/camel-cxf/camel-cxf-spring-rest/src/main/resources/META-INF/spring.schemas

      https://github.com/apache/camel/blob/main/components/camel-cxf/camel-cxf-spring-soap/src/main/resources/META-INF/spring.schemas

       

      However as the classpath resource schema/cxfEndpoint.xsd is duplicated in both modules we get issues when both dependencies are added to the application such as:

      Caused by: org.xml.sax.SAXParseException: TargetNamespace.1: Expecting namespace 'http://camel.apache.org/schema/cxf/jaxws', but the target namespace of the schema document is 'http://camel.apache.org/schema/cxf/jaxrs'.
          at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)

      i.e. the jaxws spring.schemas file has loaded the jaxrs schema.

      Could the xsd's be renamed to be unique (eg schema/cxfJaxwsEndpoint.xsd  and schema/cxfJaxrsEndpoint.xsd ) and the respective spring.schema files updated to avoid this classpath conflict?

      This issue is blocking our upgrade from 3.16.x to 3.18.x

       

       

       

       

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              daveroa Dave Riseley
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: