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 URIs to locations on the classpath (spring.schemas files), and that way validates your Spring configuration files. 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 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 can validate the file.
In theory you need not be concerned with the actual location of the files: Spring knows about their location on 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 use the classpath location in the table below to find the original version of the schema in the trunk.
Configuration Schemas
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!
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<http-conf:conduit name="{http://cxf.apache.org/hello_world_soap_http}SoapPort.http-conduit">
<http-conf:client DecoupledEndpoint="http://localhost:9999/decoupled_endpoint"/>
</http-conf:conduit>
<jaxws:client name="{http://cxf.apache.org/hello_world_soap_http}SoapPort" createdFromAPI="true">
<jaxws:conduitSelector>
<bean class="org.apache.cxf.endpoint.DeferredConduitSelector"/>
</jaxws:conduitSelector>
</jaxws:client>
Other Schemas
The following schemas are imported by 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).
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