Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated Blueprint schema info.

...

CXF uses XML schemas extensively in the runtime: Its core includes the JAXB mappings of standard schemas such as http://schemas.xmlsoap.org/wsdl/ and http://www.w3.org/2006/03/addressing/ws-addr.xsd. CXF also defines its own schemas for WSDL extensions such as the jms-address element in namespace http://cxf.apache.org/transports/jms, and schemas for both Spring and Blueprint (OSGi) configuration, for example the http://cxf.apache.org/jaxws and http://cxf.apache.org/blueprint/jaxws namespace namespaces.

To avoid accessing resources over the network during a build, CXF maintains local copies of these schemas. Logically however, third party as well as CXF schemas , are as well as the CXF schemas, are referred to by their public URIs in schemaLocation attributes and similar places. The CXF code generators use catalog files to map them to their actual location in the trunk, see the pom.xml file in the api module for an example.

Spring uses a similar way to map URIs to locations on the classpath (spring.schemas files), and that way validates your Spring configuration filesNote if you're using Spring it will validate your Spring configuration files, using information in each JAR's META-INF/spring.schemas file (an example here). Validation is extremely helpful in diagnosing errors in CXF configurations, but it is also very expensive at runtime. Once you have got your application working, you can disable validation by setting a system property: org.apache.cxf.spring.validation.mode (in 2.1) or spring.validation.mode (in 2.0.x). Set it as follows to disable validation: -Dorg.apache.spring.validation.mode=VALIDATION_NONE

The table below lists includes the URIs for the CXF configuration schemas that you need to specify in your Spring configuration file's schemaLocation attribute so that Spring's validating parse parser can validate the file.
In theory you need not be concerned with the actual location of the files: Spring knows about can normally detect their location on from the classpath. And if you want to check the content of a schema file (in a binary distribution), you should be able to do so using its URI. At the moment this is not possible, however CXF aims at publishing its schemas in the future. In the meantime, you can You can also use the classpath location in the table below to find the original version of the schema in the trunk.

Configuration Schemas common to both Spring and Blueprint

http://cxf.apache.org/schemas/core.xsd

URI

Target Namespace

Classpath Resource

Module

http://cxf.apache.org/core /schemas/core.xsd

cxf-rt-core

http://cxf.apache.org/schemas/configuration/http-conf.xsd

http://cxf.apache.org/transports/http/configuration

/schemas/configuration/http-conf.xsd

cxf-rt-transports-http

http://cxf.apache.org/schemas/configuration/http-jetty.xsd

http://cxf.apache.org/transports/http-jetty/configuration

/schemas/configuration/http-jetty.xsd

cxf-rt-transports-http-jetty

http://cxf.apache.org/schemas/configuration/jms.xsd

http://cxf.apache.org/transports/jms

/schemas/configuration/jms.xsd

cxf-rt-transports-jms

http://cxf.apache.org/schemas/configuration/security.xsd

http://cxf.apache.org/configuration/security

/schemas/configuration/security.xsd

cxf-common-schemas

http://cxf.apache.org/schemas/configuration/soap.xsd

http://cxf.apache.org/bindings/soap

/schemas/configuration/soap.xsd

cxf-rt-bindings-soap

http://cxf.apache.org/schemas/jaxwsws-addr-conf.xsd

http://cxf.apache.org/ws/jaxwsaddressing

/schemas/jaxwsws-addr-conf.xsd

cxf-rt-frontendws-jaxws addr

http://cxf.apache.org/schemas/simpleconfiguration/wsrm-manager-types.xsd

http://cxf.apache.org/simplews/rm/manager

/schemas/simple/configuration/wsrm-manager-types.xsd

cxf-rt-frontendws-simple rm

http://cxf.apache.org/schemas/ws-addr-confconfiguration/wsrm-manager.xsd

http://cxf.apache.org/ws/rm/addressingmanager

/schemas/configuration/wswsrm-addr-confmanager.xsd *

cxf-rt-ws-addr -rm

* wsrm-manager.xsd does an "xsd:include" on wsrm-manager-types.xsd as they are in the same namespace. As such, the user just needs to reference wsrm-manager.xsd to use both.

Spring-only Schemas

URI

Target Namespace

Classpath Resource

Module

http://cxf.apache.org/schemas/core.xsd

http://cxf.apache.org/core

/schemas/core.xsd

cxf-rt-core

http://cxf.apache.org/schemas/jaxrs/configuration/wsrm-manager-types.xsd

http://cxf.apache.org/wsjaxrs

/schemas/jaxrs.xsd

cxf-rt-frontend-jaxrs

http://cxf.apache.org/schemas/jaxws.xsd

http://cxf.apache.org/jaxws

/schemas/jaxws.xsd

cxf-rt-frontend-jaxws

http://cxf.apache.org/schemas/policy.xsd

http://cxf.apache.org/policy

/schemas/policyrm/manager /schemas/configuration/wsrm-manager-types.xsd

cxf-rt-ws-rm policy

http://cxf.apache.org/schemas/configuration/wsrm-manager.xsdsimple.xsd

http://cxf.apache.org/simple

/schemas/simple.xsd

cxf-rt-frontend-simple

Blueprint-only Schemas

URI

Target Namespace

Classpath Resource

Module

http://cxf.apache.org/schemas/blueprint/core.xsd

http://cxf.apache.org/core

/schemas/blueprint/core.xsd

cxf-rt-core

http://cxf.apache.org/schemas/blueprint/jaxrs.xsd

http://cxf.apache.org/jaxrs /ws/rm/manager

/schemas/configurationblueprint/wsrm-managerjaxrs.xsd *

cxf-rt-wsfrontend-rm

* wsrm-manager.xsd does an "xsd:include" on wsrm-manager-types.xsd as they are in the same namespace. As such, the user just needs to reference wsrm-manager.xsd to use both.

jaxrs

http://cxf.apache.org/schemas/blueprint/jaxws.xsd

http://cxf.apache.org/jaxws

/schemas/blueprint/jaxws.xsd

cxf-rt-frontend-jaxws

http://cxf.apache.org/schemas/blueprint/policy.xsd

http://cxf.apache.org/policy

/schemas/blueprint/policy.xsd

cxf-rt-ws-policy

http://cxf.apache.org/schemas/blueprint/simple.xsd

http://cxf.apache.org/simple

/schemas/blueprint/simple.xsd

cxf-rt-frontend-simple

Example

The following is an example of a valid Spring configuration file. Using the table above, there is no magic involved in setting the correct value for the schemaLocation attribute!

...

The following schemas are imported by one or more of the schemas above, directly or indirectly. You may also find their classpath locations useful when you import or include any of the schemas below in your own schema, and want to know hpw you can access them locally (actually, it'd be cool if someone wrote a CatalogResolver based on the URI - classpath location mappings that already exist and get the CXF tools and/or xjc to use it).

URI

Target Namespace

Classpath Resource

Module

http://cxf.apache.org/schemas/configuration/cxf-beans.xsd

http://cxf.apache.org/configuration/beans

/schemas/configuration/cxf-beans.xsd

cxf-common-utilities

http://cxf.apache.org/schemas/wsdl/http-conf.xsd

http://cxf.apache.org/transports/http/configuration

/schemas/wsdl/http-conf.xsd

cxf-rt-transports-http

http://cxf.apache.org/schemas/wsdl/jms.xsd

http://cxf.apache.org/transports/jms

/schemas/wsdl/jms.xsd

cxf-rt-transports-jms

http://www.w3.org/2010/soapjms

http://www.w3.org/2010/soapjms

/schemas/wsdl/spec/jms-spec-wsdl.xsd

cxf-rt-transports-jms

http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd

http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd

/schemas/oasis-200401-wss-wssecurity-secext-1.0.xsd

cxf-rt-ws-policy

http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd

http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd

/schemas/oasis-200401-wss-wssecurity-utility-1.0.xsd

cxf-rt-ws-policy

http://schemas.xmlsoap.org/ws/2004/08/addressing

http://schemas.xmlsoap.org/ws/2004/08/addressing

/schemas/wsdl/addressing.xsd

cxf-common-schemas

http://schemas.xmlsoap.org/ws/2004/09/policy/ws-policy.xsd

http://schemas.xmlsoap.org/ws/2004/09/policy

/schemas/ws-policy-200409.xsd

cxf-rt-ws-rm

http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd

http://schemas.xmlsoap.org/ws/2005/02/rm/policy

/schemas/configuration/wsrm-policy.xsd

cxf-rt-ws-rm

http://schemas.xmlsoap.org/wsdl/

http://schemas.xmlsoap.org/wsdl/

/schemas/wsdl/wsdl.xsd

cxf-common-schemas

http://schemas.xmlsoap.org/wsdl/http/

http://schemas.xmlsoap.org/wsdl/http/

/schemas/wsdl/http.xsd

cxf-common-schemas

http://www.w3.org/2001/xml.xsd

http://www.w3.org/XML/1998/namespace

/schemas/xml.xsd

cxf-rt-ws-policy

http://www.w3.org/2006/07/ws-policy.xsd

http://www.w3.org/2006/07/ws-policy

/schemas/ws-policy-200607.xsd

cxf-rt-ws-policy

...