Paul, sorry to jump in here but this caught me out originally.
Basically if you leave the schema locations alone everything is fine in the container as the Spring stuff is already set up to intercept the scema lookups. The key thing is to have the catalogue entry set up correctly in Eclipse so you don't get problems reported. The trick is to match the Eclipse catalogue entries to the Spring catalogue entries. For example, taking spring-beans.xsd you want an Eclipse XML catalogue entry of location: <path_to_local_copy> Key type: Schema Location Key: http://www.springframework.org/schema/beans/spring-beans.xsd This will cause Eclipse to map the key value to your local copy. For proof of the magic, look at http://www.springframework.org/schema/beans/spring-beans.xsd. It doesn't actually exist. If you look in META-INF/spring.schemas you can see all the required mappings. Hopefully I got all that right so it will make some sense. Brad. On Wed, Apr 23, 2008 at 10:28 AM, paulbrickell <[EMAIL PROTECTED]> wrote: > > Ah I see. Thanks for that. I guess it's just a bit of a joining up problem. > > What I still do not understand is how I am going to make this work in all > cases. > > To set up the catalog and convince Eclipse that the xml files are valid I > have to make a local copy of the schema files, modify them so that they are > consistent and then modify my own xml files to point to the local schema > files. > > Now Eclipse is happy and I can build my application, but (and this is > troubling me) when I deploy my application to Tomcat, for example, the xml > files now contain reference to local schema files. Am I going to have to > 'rewrite' them as I build my war file? That doesn't seem particularly clever > to me. > > Most likely I am just missing a point here. > > Cheers, > Paul B. > > > > > ianroberts wrote: > > > > paulbrickell wrote: > >> This is quite painful, but having followed the steps described above > >> eclipse > >> is now happy that my XML files are valid. But what happens when I deploy > >> my > >> project? > >> > >> Hard coded paths are not gonna do it really. > >> > >> Is there a 'real' solution for this? > > > > Using a catalog *is* the real solution. Spring has its own internal > > catalog built from all the META-INF/spring.schemas files it finds on the > > classpath that does the same job at runtime that it uses to resolve the > > http://cxf.apache.org/schemas/... URIs to Class.getResource locations > > (i.e. inside the JAR files). > > > > Ian > > > > -- > > Ian Roberts | Department of Computer Science > > [EMAIL PROTECTED] | University of Sheffield, UK > > > > > > -- > View this message in context: > http://www.nabble.com/Eclipse-XSD-validation-for-jaxws.xsd-tp11691580p16833564.html > > > Sent from the cxf-user mailing list archive at Nabble.com. > >
