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 check web sevice availability/ connection 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 "check web sevice availability/ connection" Watch "check web sevice availability/ connection" New topic

check web sevice availability/ connection

sandeepkum kumar

Joined: Oct 11, 2011
Posts: 3
Hi All,

I am consuming web service using axis2.

I want to know that how can i check availability of web service, is it running or not in java.

can I test through ping but i assume its not the good way to test the web service. there must be another way to test web service.

example :

URL url = new URL("http://1xx.00.0.x/wsa/wsa1/wsdl?targetURI=proms");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
int res = connection.getResponseCode();
System.out.println("running : "+res);

So please reply soon its urgent.
It is sorta covered in the JavaRanch Style Guide.
subject: check web sevice availability/ connection
It's not a secret anymore!