File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services Certification (SCDJWS/OCPJWSD) and the fly likes Servlet-Based Web Service Configuration Example from Ivan Kriz's Tutorial Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Web Services Certification (SCDJWS/OCPJWSD)
Reply Bookmark "Servlet-Based Web Service Configuration Example from Ivan Kriz Watch "Servlet-Based Web Service Configuration Example from Ivan Kriz New topic
Author

Servlet-Based Web Service Configuration Example from Ivan Kriz's Tutorial

Kumar Sonu
Ranch Hand

Joined: Apr 05, 2011
Posts: 36
I configured the web service as explained in the example (Servlet-Based Web Service Configuration Example, Pg-277)

The webservices.xml has one setting as:
<wsdl-file>WEB-INF/wsdl/HelloWorldWSService.wsdl</wsdl-file>

After deploying the service to Glass Fish (v3.1) I get an error as:


The error is for obvoius reason that I don't have the WSDL yet at the location until I have deployed the service to GlassFish.

Is the WSDL needs to be coded first for the example to work ?
And if the WSDL needs to be coded first I am just wondering what is the whole point of defining a "webservices.xml" file.

Too confusing ...

Please clarify.


SCJP,SCWCD, SCDJWS
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2186
Hi!
The WSDL file can be found on page 278.
In addition, on page 279 there is a motivation to why a webservices.xml file is needed:

When developing on GlassFish v2 and supplying a web.xml deployment descriptor but no webservices.xml deployment descriptor, a servlet-based web service will not be recognized as a web service. After having supplied a webservices.xml deployment descriptor, the web service will once again appear in GlassFish.

This may have changed in GlassFish v3.

By the way, my last name is Krizsan.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Kumar Sonu
Ranch Hand

Joined: Apr 05, 2011
Posts: 36
Got it. Thanks again and sorry again for the name ..
 
 
subject: Servlet-Based Web Service Configuration Example from Ivan Kriz's Tutorial
 
Threads others viewed
Exception: Unable to find resource '/WEB-INF/templates/hello.vm'
Problem with Package execution
Java EE 5 Tutorial - Problem with Web Services
service interface in both web.xml and webservices.xml?
JSE Deployment
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture