users@glassfish.java.net

Re: Resolving wsdlLocation via jax-ws-catalog.xml

From: <glassfish_at_javadesktop.org>
Date: Fri, 12 Dec 2008 00:59:07 PST

BTW: using an absolute URI doesn't seem to help either. I changed the wsdlLocation and added an entity catalog to my-core.jar#META-INF/jax-ws-catalog.xml:

HelloWorldServiceEJB.java:
[code]
@WebService( ..., wsdlLocation="http://example.com/HelloWorld.wsdl")
[/code]

jax-ws-catalog.xml:
[code]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE catalog
        PUBLIC "-//OASIS//DTD XML Catalogs V1.1//EN"
        "http://www.oasis-open.org/committees/entity/release/1.1/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
        <system systemId="http://example.com/HelloWorld.wsdl" uri="wsdl/mysrvice.wsdl"/>
</catalog>
[/code]

But the verifier seems to use the absolute URI:

[code]
WSDL file does not exist in the archive at URI [ http://example.com/HelloWorld.wsdl ]
[/code]

I rummaged through the Glassfish sources and discovered WSDLFileCheck.java. The verification check that fails translates roughly to:

[code]
String wsdlUri = descriptor.getWebService().getWsdlFileUri();
FileArchive arch = new FileArchive();
arch.open(getAbstractArchiveUri(descriptor));
if (arch.getEntry(wsdlUri) == null) {
        // fail
}
[/code]

If there isn't any hidden magic here I fail to see, then this looks like its always checking for the wsdlLocation inside the current archive, i.e., the my-service.jar, without any resolving taking place.
[Message sent by forum member 'jkh_' (jkh_)]

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