aspose file tools*
The moose likes Web Services and the fly likes how can I get the status of webservice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "how can I get the status of webservice" Watch "how can I get the status of webservice" New topic
Author

how can I get the status of webservice

mou haj
Ranch Hand

Joined: Sep 12, 2001
Posts: 81
I am writing a utility for our project where I provide a page where the status of all the resources used in the application and the webseri
vices the application access are provided.

For Datasources I am running a dummy querry to test the status.

For webserivices I am trying to conenct to the webservce URL and if I get a response code of 200 I am saying status is OK.

--------------------------------------------------------------------
final URL url = new java.net.URL( endPointURL );
final URLConnection uconn = url.openConnection( );
final java.net.HttpURLConnection conn = (java.net.HttpURLConnection)uconn;
conn.connect( );
responseCode = conn.getResponseCode( );
--------------------------------------------------------------------

Can you suggest of any other test that I can do. These are external webserivices that my application calls.

Regards
Mou
mou haj
Ranch Hand

Joined: Sep 12, 2001
Posts: 81
One more thing is when I call these webservices from browser ie type the webservice URL in browser I get a response

Hi there, this is a Web service!

Is there any way of getting this test back in my java program?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12682
    
    5
Is there any way of getting this test back in my java program?


Sure - look into use of java.net.HttpURLConnection.

Bill


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how can I get the status of webservice
 
Similar Threads
How i get "HFSJ final mock" exam?
Problem while connecting to Servlet
AJAX response to a Restful Jersey Resource
HTTP/1.1 407 Proxy Authorization Required
iText: Digital signature