File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is com.sun.xml.ws.transport.http.servlet.WSServlet and any documentation on this.

 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

If not all, atleast in few of the examples I referred, I see com.sun.xml.ws.transport.http.servlet.WSServlet being declared in web.xml. I did not do this, when I deployed by application in GlassFish using eclipese (Dynamic Web Project). Apparently GlassFish must be providing a servlet implicitly, which I did not happen to see.

But what is com.sun.xml.ws.transport.http.servlet.WSServlet and I could not get any good information or API around this component. So, can some body point me to a link where I can read more about this.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I think this is the servlet that is responsible for directing incoming web service requests to the appropriate endpoint implementation class and to make any conversions/preparations needed before the endpoint appropriate implementation class is invoked.
With JAX-WS, this is taken care of "behind the scenes", as you correctly suspect. That is, when GlassFish encounters an endpoint implementation class, it knows it must use a WSServlet to handle incoming requests and thus it adds the servlet to the generated deployment descriptor etc. etc.
The only resource I was able to find being in a hurry was this:
http://www.google.com/codesearch/p?hl=en#V5msdoCsUcY/src/share/classes/com/sun/xml/internal/ws/server/package-info.java&q=WSServlet%20lang:java&sa=N&cd=6&ct=rc
Reading that you will at least get a feel for how incoming web service requests over HTTP are handled.
If someone has a better source for information, I would also be very interested!
Best wishes!
 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ivan.

From your explanation and my understanding, can we consider this servlet as a part of Service Interaction layer, you described in "Endpoint Design and Architecture" in your notes. Also, this being a servlet I guess, it is possible to have the filters and listeners to be configured as any other web app. Though the functionality of filters can be achieved using Handlers in Jax-WS. What are your thoughts on this?

and this servlet seems to be implementation and container dependent. Because when I deployed an app, having this servlet configured in Tomcat 6, my tomcat startup failed, as there was a failure in initializing a listener. I wish Sun provides a better documentation on this servlet.
 
Lester Burnham
Rancher
Posts: 1337
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There was some discussion on how to use the "raw" JAX-WS RI in Tomcat in http://www.coderanch.com/t/223670/Web-Services/java/Deploy-JAXWS-Mustang-WS-Tomcat. That involves configuring this servlet.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Kumar Raja wrote:From your explanation and my understanding, can we consider this servlet as a part of Service Interaction layer, you described in "Endpoint Design and Architecture" in your notes.

No, I would not say that this servlet is part of anything related to a specific service. As far as I am concerned, the servlet is part of the web service stack (Metro in this case).
As you correctly point out, the servlet is implementation and container dependent. If it were part of the service interaction layer then the service would have to be rewritten for every container I wished to deploy the service on.
Admitted, in reality there may still be things that affect portability in a negative manner.
Best wishes!
 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ivan.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic