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 starting/stopping a web service programatically? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "starting/stopping a web service programatically?" Watch "starting/stopping a web service programatically?" New topic
Author

starting/stopping a web service programatically?

Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585
Hello,

I wonder if I can start/stop a web service programatically? I am using apache axis 2.

If it's possible, can you please tell me how?

Thanks in advance,


Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 577

Hi Vassili,

I wonder if I can start/stop a web service programatically?

You can do it like any web/enterprise application in a server.

When you say Axis2, are you using Axis2 as a web server? If not, what web/application server are you using?

As a quick hint, here is one of the folks trying to do it in JBoss and not sure if his problem is resolved but this will point to some right direction atleast.


Cheers,
Naren
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
What do you mean by starting/stopping?
There are several possible meanings of this:
- Deploying/undeploying.
This depends on the server in which you run the web service. GlassFish v3, for instance, exposes a RESTful service allowing for programmatic management. See: http://weblogs.java.net/blog/arungupta/archive/2009/08/totd_96_glassfi.html
- Process requests/ignore requests.
See alternative below.
- Accept requests/not accept requests.
The last two alternatives can be accomplished in the web service by exposing some kind of control operation or JMX bean that allows for turning the service on or off.
For instance, if the flag is set to true then requests are processed in a normal fashion. If the flag is set to false, then requests may be ignored or a fault may even be returned as the result of a request to the service when it is in a mode not to accept requests.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
 
wood burning stoves
 
subject: starting/stopping a web service programatically?