Problem we've faced with the catalog solution is the case where the XSDs your WSDL is referencing also references other XSDs in a relative way. It seems (to me) that you can't make a catalog entry which overrides "../" to point to a specific place on the classpath.

For instance:
WSDL has <xsd:import schemaLocation="schemas/3rdPartySchema.xsd"/>
We map schemas to classpath:/schemas in a catalog and that works well.

then, in 3rdPartySchema.xsd there is a: <xsd:import schemaLocation="../ coreschemas/base.xsd"/>. There seems no way to catalog "../" to point to classpath:/coreschemas...

What happens is anytime 3rdPartySchema.xsd makes reference to an element from base.xsd, it complains it's an unresolved element (but doesn't seem to complain that it can't find base.xsd mind you).

Craig.


On 16-Nov-09, at 7:25 AM, Daniel Kulp wrote:


This is exactly what the XML catalogs are designed for (and the - catalog flag on wsdl2java). Basically, they allow URL patterns and such used for imports to be mapped into new URL's where the stuff really lives. Thus, you can have "http://..."; type URL's in the wsdl's/xsd's, but have those remapped
into file things or such.

Dan


On Sat November 14 2009 9:31:43 am Dominik Raymann wrote:
Hi there,

I use WSDL2JAVAto generate client code from a WSDL. I'd like to store the WSDL (and all referenced dependencies) locally so that the stubs can be generated offline. However, the WSDL references (imports) other WSDLs as
well as schema files. These references are absolute URLs.

Is it possible to map these URLs to local files somehow or do I have to edit the WSDL manually and change to URLs so that they point to the local
files?

Or is there a tool (wsdl2java itself?) that downloads everything needed for codegeneration and changes the references so that they point to the local
copies of the files?

Thanks for your answer,

Dominik


--
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to