You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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 Spring configuration, for example the http://cxf.apache.org/jaxws namespace.

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 systemIds to locations on the classpath (spring.schemas files), and that way validates your Spring configuration files. Validation can be disabled by setting system property spring.validation.mode to VALIDATION_NONE), but the default is to have validation enabled. This is very useful when you are configuring CXF and not very familiar with CXF's configuration schemas or with Spring itself.

What you need to know when writing a valid Spring configuration file is the system IDs for the schema file(s) defining the types that are using in the configuration file.
The table below contains the system IDs for the CXF schema files that you may need to specify in your configuration file, along with their target namespace.
In theory you need not be concerned with the actual location of these files, as they should be available at their URI. In practice however, only the standard schemas are actually available that way, but CXF aims at publishing its schemas in the future. In the meantime, to check the content of a schema file, you can use the classpath location in the table below to find the schemas.

System ID

Target Namespace

Classpath Resource

Module

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

TODO: complete this table

Note for Developers: If you define your own configuration schema, place it in the schemas subdirectory of the resources directory, then combine http://cxf.apache.org/ and the path of the schema relative to the resources directory to form the system ID, and make the latter known to Spring by adding a line similar to the following to the spring.schemas file in your module's META-INF directory (note the escaped : character):

http\://cxf.apache.org/schemas/wsdl/http-conf.xsd=schemas/wsdl/http-conf.xsd
  • No labels