Webservice - start, stop and "uptime"

  • Thread starter Thread starter MA
  • Start date Start date
M

MA

Hi all!

I know there is other newsgroups for webservices, but I don´t get any
answers on those.

I have developed a webservice that writeing and reading files in different
folders.

Question 1: I need to be able to stop this service by using a web
interface
(using a stop button). But I can´t find any way to this. Any ideas?

Question 2: Where can I see if this service is running?

Question 3: Can I get the current "uptime" for the service?

/Marre
 
MA said:
Hi all!

I know there is other newsgroups for webservices, but I don´t get any answers on those.

I have developed a webservice that writeing and reading files in different
folders.

Question 1: I need to be able to stop this service by using a web
interface
(using a stop button). But I can´t find any way to this. Any ideas?

Question 2: Where can I see if this service is running?

Question 3: Can I get the current "uptime" for the service?

/Marre

A webservice is not like a windows-service. It is not an independant
process that can be stopped or started.

A webservice is part of a web application. As long as the application
is available, the webservice is alo available. "Uptime" for the webservice
is then equal to the uptime of the web-application.
If you want to stop access to that webservice (with the web application
still running), you could use an Application object, that is written to
by some "webservice control page", and read by that webservice:
if that object says "blocked" then the webservice should give an errormessage
else continue as usual.

Hans Kesting
 
Hans Kesting said:
A webservice is not like a windows-service. It is not an independant
process that can be stopped or started.

A webservice is part of a web application. As long as the application
is available, the webservice is alo available. "Uptime" for the webservice
is then equal to the uptime of the web-application.
If you want to stop access to that webservice (with the web application
still running), you could use an Application object, that is written to
by some "webservice control page", and read by that webservice:
if that object says "blocked" then the webservice should give an
errormessage
else continue as usual.

Hans Kesting
So, if I have my service on a webserver, it will be available as long as the
server is available?

/Marre
 
MA,

In addition to what Hans said before, you could craft your own mechanism
to turn the web service on and off. Basically, in your web service method,
you would check some sort of static variable indicating whether or not the
method could be called. If it can, then you proceed normally. If it can't,
then you would throw an exception. This static variable would be able to be
modified by another web service method perhaps, which would turn it on and
off.

Hope this helps.
 
Back
Top