users@glassfish.java.net

Resolving wsdlLocation via jax-ws-catalog.xml

From: <glassfish_at_javadesktop.org>
Date: Thu, 11 Dec 2008 05:40:56 PST

Hi,

I have an EAR with the following structure:

myapp.ear:
lib/mycore.jar
myservice.jar

The mycore.jar contains a WSDL at META-INF/wsdl/myservice.wsdl and the generated classes, SEI, and web service stub. The myservice.jar contains an EJB implementing the web service. If I annotate the web service implementation as

@WebService( ..., wsdlLocation="META-INF/wsdl/myservice.wsdl")

then Glassfish's verifier throws an error:

SEVERE: wsdl file META-INF/wsdl/myservice.wsdl does not exist for web service MyService

After a quick glance at ModuleContentValidator.java in the Glassfish SVN, it looks like Glassfish resolves relative URLs only inside the actual archive where the web service implementation resides. If it doesn't find the WSDL it throws an error.

I tried to trick Glassfish into looking inside mycore.jar by placing META-INF/jax-ws-catalog.xml inside mycore.jar with:

<system systemId="META-INF/wsdl/myservice.wsdl" uri="wsdl/myservice.wsdl"/>

This doesn't work either. But Glassfish DOES pick up the catalog if I use, e.g., wsdlLocation="http://example.com/myservice.wsdl" and map this absolute URL to the relative system URI "wsdl/myservice.wsdl".

Is there anything else I can do, that's standards compliant? They way I understand the JAX-WS 2.1 spec the wsdlLocation attribute should _always_ be resolved via the catalog file even if it's relative.

Regards, Janko
[Message sent by forum member 'jkh_' (jkh_)]

http://forums.java.net/jive/thread.jspa?messageID=321246