wood burning stoves 2.0
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

starting/stopping a web service programatically?

Vassili Vladimir
Ranch Hand

Joined: Mar 08, 2007
Posts: 1585

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.

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

Joined: Oct 04, 2006
Posts: 2198
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
I agree. Here's the link: http://aspose.com/file-tools
subject: starting/stopping a web service programatically?
It's not a secret anymore!