Inner schema includes are not resolved with their absolute paths in cxf endpoint wsdl

Solution Verified - Updated -

Issue

  • The project structure is like this,

├── pom.xml
├── Readme.md
├── src
│ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ └── redhat
│ │ │ └── GreetingServiceImpl.java
│ │ └── resources
│ │ └── META-INF
│ │ ├── greeting.xsd
│ │ ├── jax-ws-catalog.xml
│ │ ├── schema.xsd
│ │ ├── spring
│ │ │ └── context.xml
│ │ └── wsdl
│ │ └── greeting.wsdl

  • Here the greeting.wsdl, imports the greeting.xsd.
    'greeting.xsd' includes 'schema.xsd'.

  • Testing this on Fuse 6.1.x, the deployed wsdl contract seems to be publishing the inner xsd, schema.xsd with the absolute URI,
    for example,

<?xml version='1.0' encoding='UTF-8'?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:types="http://ws.samples.redhat.com/types" targetNamespace="http://ws.samples.redhat.com/types" version="1.0">
  <xs:include schemaLocation="http://localhost:8181/cxf/absolute?xsd=../schema.xsd"></xs:include>
  • In Fuse 6.2.x, we only get the relative path of the xsd import,
<?xml version='1.0' encoding='UTF-8'?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:types="http://ws.samples.redhat.com/types" targetNamespace="http://ws.samples.redhat.com/types" version="1.0">
  <xs:include schemaLocation="schema.xsd"></xs:include>

Environment

  • Red Hat JBoss Fuse
    • 6.2.x
  • Apache CXF

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.