Hi, I'm writing a schema for my web service, and would like to generate binding code (using jaxb), client and server stubs from it, very similar to what is explain in the documentation ( http://xfire.codehaus.org/JAXB+2.0).
My schema includes another schema, using the <xsd:include schemaLocation="..."> tag. In order to have a valid schema files, the included schema must be resolved from this file. I've put the included schema next to the "main" schema, in the META-INF/xfire directory. Like this, when I open my project in Eclipse, it validates/resolves nicely. The first problem appears when generating client code as explained in the documentation (http://xfire.codehaus.org/Client+and+Server+Stub+Generation+from+WSDL ). The generator is pointed to the published wsdl ( http://localhost:8080/...../?wsdl), which is generated automatically by xfire for me. But since the wsdl contains an include to an xsd file that is not published (accessible through a http url), the generator fails, as it can not resolve the included xsd. I managed to solve this by saving the wsdl to a file, and placing it in the META-INF/xfire directory. Now I can point the generator to the file directly, and the included xsd can be resolved. It's not a very good solution, since "real" clients typically don't have access to this directory, but for now it works for me. When I run my generated client, the server fails, since it can not resolve the included xsd. It seems to expect it in the classpath root. Since it is located in META-INF/xfire, and not in the root, it can't find it. Copying the xsd to the classpath root fixes the problem, but I don't want to have multiple copies of the xsd around. Can somebody help me to find a good solution to this problem? Thanks, Tom
