[ 
https://issues.apache.org/jira/browse/CAMEL-18736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-18736.
---------------------------------
    Resolution: Fixed

Thanks for reporting and the PR

> Duplicate schema/cxfEndpoint.xsd resource in camel-cxf-spring-rest and 
> camel-cxf-spring-soap jars
> -------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-18736
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18736
>             Project: Camel
>          Issue Type: Bug
>          Components: came-cxf
>    Affects Versions: 3.18.3
>            Reporter: Dave Riseley
>            Priority: Minor
>             Fix For: 3.18.4, 3.20.0
>
>
> 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
>  
>  
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to