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 and the fly likes Webservice servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Webservice servlets" Watch "Webservice servlets" New topic
Author

Webservice servlets

Sireesh Ganagam
Greenhorn

Joined: May 08, 2012
Posts: 16
All ,

I am new to webservices . I am trying to understand Jax-ws , Jax-Rs

Till now my understanding is

we have top down , bottom up approaches. (wsgen ,wsimport) tools to generate in jax-ws.

Here my doubt is how does the request will (from wsgen , wsimport generated class , what is the role of servlet ) go when we do request like (Ex :http://localhost:8080/WebServicesExample/hello) .

what is the role of servlet or servlet container will do in both Jax-ws , jax-rs top down , bottom up approaches.


I really appreciate you guys help . I am sorry i can't format question correctly.

many many thanks in advance.
William P O'Sullivan
Ranch Hand

Joined: Mar 28, 2012
Posts: 860

The servlet should delegate to a service layer that invokes the web-service, handles the marshalling and returns a model.

The servlet can then do whatever it wants with the model object prior to returning to the view.

Just like database operations, keep the business logic out of the servlet and let dedicated service objects do their job.
(Must easier to test in a TDD environment also)

WP
 
Don't get me started about those stupid light bulbs.
 
subject: Webservice servlets
 
Similar Threads
Learning WS using JBOSS and following sun JEE5 tutorial
beginner questions regarding axis2
disable xjc(JAXB generation) in wsimport task
Objective 4.7 - Describe creating a Web Service using JAX-WS
JAXWS Stubs