Hello Jim, On Thu, Nov 16, 2006 at 07:27:12PM +0800, Jim Ma wrote: > Hi Robin , > > I tried http.xsd using the "-catalog" option . It works fine. > > XJC seems do not invoke catalog resolver if the schemaLoacation defined with > relative path like " /schemas/wsdl/wsdl.xsd", > > so I need to change the schemaLocation as following : > > <xs:import namespace="http://schemas.xmlsoap.org/wsdl/" > schemaLocation="http://schemas/wsdl/a.xsd"/> > > And this is my catalog file : > > <!DOCTYPE catalog > PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" > "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> > <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" > prefer="public"> > <rewriteSystem > systemIdStartString="http://schemas/wsdl/a.xsd" > rewritePrefix="jar:file:/mavenrepo/org/apache/cxf/cxf-common-schemas > /2.0-incubator-M1-SNAPSHOT/cxf-common-schemas-2.0-incubator-M1-SNAPSHOT.jar! > /schemas/wsdl/wsdl.xsd" /> > </catalog>
In my case, the location of the jar cannot be present in the catalog since it is variable. Is there a way for the catalog resolver to pick the jar up from the classpath? Also, this would create a maintenance problem since all catalogs would have to be updated when switching to a new version of cxf-common-schemas. Is there a way to do it without specifying the version? The best solution would be to specify "/schemas/wsdl/wsdl.xsd" and have the catalog resolver search the classpath. Is there a way to do this? Thanks, Robin
