• Post Reply Bookmark Topic Watch Topic
  • New Topic

Webservice deployment  RSS feed

Jim Janssens
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apparantly there are two ways to expose a webservice via the web.xml. One is to define the 'JAXRPCServlet' as a generic entry point. Another seems to be defining the service endpoint implementation class in case it is a servlet. You do not need to define both it seems, either one of them sufices.

However, imho, if you have an EJB that you want to expose, you cannot simply list the implementation class as a servlet. In that case it seems that one must use the 'JAXRPCServler' in the hope that it will find the ejb after reading the webservices.xml (which has a ejb-link in it).

Now, is any of my thinking correct? Since I do not see the advantage of using the service endponit servlet notation. I would just put ALWAYS the 'JAXRPCServlet' as a servlet. All the services (either servlet or ejb) are then accessed by 'http://host/jaxrpc/serviceName' with 'jaxrpc' being the servlet mapping to the jaxrpc servlet...

For example (using IBM RAD6) when I generate a webservice based upon a 'java bean' class, I get this in the web.xml:

When I generate a webservice based upon an ejb, I get this:

It is really weird, no real information about the conventions on this.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!