I read the article a little too quickly. My web.xml was a little
messed up.
I needed to do two things:
- the servlet-class should not be the webservice class; rather,
it should be com.sun.xml.ws.transport.http.servlet.WSServlet
- add the following class as a listener:
com.sun.xml.ws.transport.http.servlet.WSServletContextListener
It's working great now!
Matt
-----Original Message-----
From: Coarr, Matt [mailto:mcoarr_at_mitre.org]
Sent: Wednesday, February 13, 2008 11:07
To: users_at_glassfish.dev.java.net
Subject: web.xml for restful jax-ws web service (using HTTPBinding)
Hi,
I'm having some trouble with getting a jax-ws RESTful web service up
and running on glassfish.
My problem is that I created my webservice class and then declare it in
a "servlet" element via the "servlet-class" element. I then go on to
create a servlet-mapping. But my problem is that glassfish complains
that it cannot cast my class to javax.servlet.Servlet.
My code right now is based on the code from this article:
http://weblogs.java.net/blog/kohlert/archive/2006/01/publishing_a_re.ht
ml
...