I have a web service that returns a plain text. I am going to add timeout that if the service is not up set a property to true. How can I do that? Below is my code.
<get src="localhost:8080/order/available" dest="${propertyname}"/>
I am getting:
get doesn't support the "maxtime" attribute
You can use something like this. First download to a file, then check if the file is there:
<delete file="${testfile}"/>
<get src="localhost:8080/order/available" dest="${testfile}" maxtime="5000" />
<available file="${testfile}" property="${propertyname}" value="true"/>
EDIT: The maxtime attribute is available in ant 1.8.0 or higher as per their doc
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.