users@glassfish.java.net

Stuck creating a Web Service Client

From: <glassfish_at_javadesktop.org>
Date: Sat, 05 Jan 2008 10:49:53 PST

Happy New Year to everyone.
 
I'm using NB 5.5.1 and Glassfish-v2 to experiment creating webservices and consuming them. I've been successful in creating the webservice and deploying it. Next, I created a new application to test the webservice and tried to create a Web Service Client. It worked fine for the Calculator exercise. Feeling a bit confident, I created and deployed a Web Service (stubbed, of course) for the application I'm adapting for my company. When I tried to create the Web Service Client, it's failing with messages like:
 
warning: src-resolve: Cannot resolve the name 'ns1:POS' to a(n) 'element declaration' component.
  line 15 of http://gbarnard620.revelex.com:8080/HotelSearchWebService/HotelSearchService/__container$publishing$subctx/WEB-INF/wsdl/HotelSearchService_schema1.xsd
 
warning: src-resolve: Cannot resolve the name 'ns1:Criteria' to a(n) 'element declaration' component.
  line 16 of http://gbarnard620.revelex.com:8080/HotelSearchWebService/HotelSearchService/__container$publishing$subctx/WEB-INF/wsdl/HotelSearchService_schema1.xsd

etc. etc.
 
The thread I am following is that my application uses a more complicated object in the request and response (whereas the Calcuator used native java types). Thus, my WSDL is more complicated because it references external XSD's. Hence, a number of XSD files are <insert>ed in the WSDL. I feel certain that's correctly done because NB deploys the web service fine to Glassfish. Now, in the Glassfish directory domains/domain1/generated/xml/j2ee-modules, I see that Glassfish has transformed the wsdl and XSD's. Glassfish simplifyied the WSDL, converted the XSD <includes> into <imports>, and built new XSD files in place of those in the application....the names of which are schema_1 and schema_2. schema_1 defines the request/response objects and imports schema_2 that defines the data elements in those objects.
 
It all looks fine to me although I'm not an expert at reading XSD's.
 
During the creation of the Web Service Client, NB displays the (above) messages in the console window. These messages indicate (to me) that elements are missing, but they are defined in the schema_2.xsd. Both the WSDL and schema_1.xsd <import> the schema_2.xsd. So, it looks to me like NB's WSDL parser is having trouble reading the imports.
 
And, that's where I need some help/guidance.
 
Here are some notes about my environment:
 
1. The XSD's in the application are published on a Tomcat server behind the company's firewall, not in Glassfish (would like to publish them in Glassfish, if you could advise on how to deploy them, it would be appreciated, but resolving this problem is my key concern right now!).
 
2. I've zipped up the WebService application into one attachment, The functions are stubbed and there is nothing proprietary about the XSD's. Yes, it's a travel application. *
 
3. I've zipped the web resources that Glassfish generated into another attachment.
 
Thanks for your help!

* I had to remove the build and dist directories to save space.
[Message sent by forum member 'gbarnard' (gbarnard)]

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