aspose 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


Win a copy of Spring in Action this week in the Spring forum!
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: 21
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: 859

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Webservice servlets