• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

is it possible to make a servlet to a webservice?

 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic