This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Web Services and the fly likes Publishing web service from existing web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Publishing web service from existing web application" Watch "Publishing web service from existing web application" New topic
Author

Publishing web service from existing web application

Royston Nadar
Greenhorn

Joined: Jul 26, 2011
Posts: 6

Hi all,

I have a web app, which is already deployed and running on tomcat. I need to create a web service, which will receive three parameters, and update two tables in the db. Can i create the service class within the same application and publish it as web service, or should i create brand new web application for this purpose alone?

Thanks.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Both your options are valid options.
If the web service will be coupled to the web application, then containing the web service in the web application may be a good idea.
If the web service is more independent, then publishing it in a web application of its own may be a better idea.
There are other factors as well, for instance if the web service is likely to change and the web application is not or vice versa, then separating the two may also be a good idea.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Royston Nadar
Greenhorn

Joined: Jul 26, 2011
Posts: 6

Thanks for the detailed answer Ivan !
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Publishing web service from existing web application
 
It's not a secret anymore!