aspose file tools*
The moose likes Web Services and the fly likes is it possible to make a servlet to a webservice? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "is it possible to make a servlet to a webservice?" Watch "is it possible to make a servlet to a webservice?" New topic
Author

is it possible to make a servlet to a webservice?

yamini nadella
Ranch Hand

Joined: Apr 13, 2004
Posts: 257
I know a java program can be made as webservice. Is it possible to make a servlet to webservice. can a webapplication is converted to webservice?

in a website if we enter personal data and press submit button then it called dopost() or doget()method of HTTPservlet. can we make this servlet as webservice?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42608
    
  65
Is this question any different from this one?

Let me turn tables: Do you think a web app can be transformed into a web service? If yes, why? If not, why not? Trying to answer these (and posting the answers here), would be a good starting point to know where you might need some help.


Ping & DNS - my free Android networking tools app
yamini nadella
Ranch Hand

Joined: Apr 13, 2004
Posts: 257
In above I mentioned that there is a website which takes input parameters of user information and that servlet stores that information in database.

Here I would like to this manual process of entering data automatically by calling a webservice.

Here I have 2 options one is rewrite servlet as a stand alone java class and convert it into webservice
other optin is converting the existing servlet application into webservice.

Here how can I convert a sevlet into webservice? like in case of weblogic or websphere is there any tools to convert?

Yamini
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42608
    
  65
Here I have 2 options one is rewrite servlet as a stand alone java class and convert it into webservice
other optin is converting the existing servlet application into webservice.


I don't see any real difference between the two. The web service is implemented in its own class, and ususally implements an interface, which is then used to create helper classes. Tools like java2wsdl and wsdl2java (which come with Axis) help in that process. There's really very little code you need to write by hand, except for the service implementation, and possibly some client-side code. I'm sure WL and WS come with comparable tools; they should be mentioned in the documentation.
 
 
subject: is it possible to make a servlet to a webservice?