users@glassfish.java.net

Referencing file based wsdl in Glassfish 2.1.1

From: <glassfish_at_javadesktop.org>
Date: Tue, 27 Apr 2010 19:36:56 PDT

Hi there,

We have a web service that was developed recently using java ee 5 code first with Glassfish 2.1.1. Now that we have completed the coding we want to take the generated wsdls, save them to file, and adjust our annotations to point to them.

My project setup is (Maven) is an EJB jar inside of an EAR using the @WebService annotations to expose our beans as services. I thought that by putting the wsdls and schema files in the META-INF/wsdl directory of my EJB project, I could simply have my annotations reference these using the 'wsdlLocation=META-INF/wsdl/MyService.wsdl' parameter of @WebService.

[ERROR] CLI171 Command deploy failed : Deploying application in domain failed; Error loading deployment descriptors for module [MyCommand] -- wsdl file wsdl/MyService.wsdl does not exist for web service MyService

This did not work, and I found a bug on Glassfish 2.1 stating that there was a problem with this. I next tried putting a jax-ws-catalog.xml file in that META-INF directory that looked something like:

<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
prefer="system">

<system systemId="http://www.hello.com/MyService.wsdl"
uri="wsdl/MyService.wsdl"/>

</catalog>


I adjusted my wsdlLocation parameter to reference the system id but again I get a similar deployment error:


CLI171 Command deploy failed : Deploying application in domain failed; java.io.FileNotFoundException: http://www.hello.com/MyService.wsdl -- http://www.hello.com/MyService.wsdl

To be clear, the wsdls are definitely in that META-INF directory along with their schema files.
If there is a similar thread that resolves this issue, please let me know.
[Message sent by forum member 'maloufg']

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