Link to home
Start Free TrialLog in
Avatar of Crazy_Bytes
Crazy_BytesFlag for Germany

asked on

How to monitor / check availability of web service prior to consuming it?

Hello,

I am using self written Java programmes at home that consume SOAP web services from my rc plane club. So far everything works good, But sometimes the SOAP web services that I use are not available due to maintnance or problems at the club's server. I want to monitor the availability of the SOAP services and persist the status. When I use the SOAP services the programme shall first check the availability from the monitor and if the status is 'available' perform the desired request or else queue the request until the service becomes available again.

Before I start to re-invent the wheel and write my own monitor I wanted to know if there are already tools that can accomplish this task, which can be easily embedded or used in Java before a request.

Best regards,
CB
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

I'm not sure why you'd do that. Why not just catch the inevitable exceptions in the same program and deal with them appropriately?
Avatar of Crazy_Bytes

ASKER

There is a problem when the services are unavailable. After performing a request it takes about 30 seconds until a timeout occurs, during that time the thread which performs the request is blocked. When a request is performed it takes 30  seconds until a timeout occurs because the service is unavailable. Currently this function in my programme is exclusive/modal, so the entire programme stalls until the timeout.
OK. In that case, take a look at the networking properties (in particular *timeout properties) and handle exceptions appropriately. It would in any case be the same for any additional code you were to write.
http://docs.oracle.com/javase/7/docs/technotes/guides/net/properties.html
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.