Quantcast
Channel: Metro and JAXB Related Items on Java.net
Viewing all articles
Browse latest Browse all 171

Catalog is ignored when validating xsd files

$
0
0

Hi,

I've been trying to run a simple WS app that uses attachments, and thus requires http://ws-i.org/profiles/basic/1.1/swaref.xsd. This schema file is indeed referenced from every xsd file created by wsgen.

The server doesn't have internet access, so as often suggested I've put swaref.xsd in a local folder and created a catalog file:

<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
   <rewriteSystem systemIdStartString="http://ws-i.org/profiles/basic/1.1/" rewritePrefix="wsdl/"/>  
</catalog>

My catalog file is in WEB-INF, and I have some traces showing that it's actually parsed:

Parse catalog: jndi:/localhost/jaxws-exemple-svc/WEB-INF/jax-ws-catalog.xml
rewriteSystem: http://ws-i.org/profiles/basic/1.1/
wsdl/
REWRITE_SYSTEM: http://ws-i.org/profiles/basic/1.1/
jndi:/localhost/jaxws-exemple-svc/WEB-INF/wsdl/

The problem is that when schema validation is enabled, I still get this error:
org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'swaRef:swaRef' to a(n) 'type definition' component.

After some research and debugging, it actually looks like the catalog, while used to resolve the wsdl's location, isn't used when creating the XMLSchemaFactory that is part of the ServerSchemaValidationTube.

Has anyone here met a similar issue ? And if we were to fix it, what would be the best way to comply with Metro's architecture ?

Regards,
Eric


Viewing all articles
Browse latest Browse all 171

Trending Articles