import compbio.data.msa.JABAService;\r
import compbio.ws.client.Services;\r
import compbio.ws.client.WSTester;\r
import compbio.data.msa.JABAService;\r
import compbio.ws.client.Services;\r
import compbio.ws.client.WSTester;\r
* Stores tested and passed (the test) services and their testing time\r
*/\r
private final static Map<Services, Date> operating = new ConcurrentHashMap<Services, Date>();\r
* Stores tested and passed (the test) services and their testing time\r
*/\r
private final static Map<Services, Date> operating = new ConcurrentHashMap<Services, Date>();\r
Writer testlog = new StringWriter();\r
PrintWriter writer = new PrintWriter(testlog, true);\r
WSTester tester = new WSTester(getServicePath(), writer);\r
Writer testlog = new StringWriter();\r
PrintWriter writer = new PrintWriter(testlog, true);\r
WSTester tester = new WSTester(getServicePath(), writer);\r
synchronized (operating) {\r
for (Services service : Services.values()) {\r
try {\r
if (tester.checkService(service)) {\r
operating.put(service, new Date());\r
synchronized (operating) {\r
for (Services service : Services.values()) {\r
try {\r
if (tester.checkService(service)) {\r
operating.put(service, new Date());\r
}\r
} catch (Exception e) {\r
log.info(e, e.getCause());\r
}\r
} catch (Exception e) {\r
log.info(e, e.getCause());\r
- writer.println("Fails to connect to a web service: "\r
- + service + " With " + e.getLocalizedMessage()\r
- + "\nDetails: ");\r
+ String rep = "Fails to connect to a web service: " + service + " with";\r
+ writer.println(rep + e.getLocalizedMessage() + "\nDetails: ");\r
private String getServicePath() {\r
assert wsContext != null : "WS context injection failed!";\r
MessageContext msContext = wsContext.getMessageContext();\r
private String getServicePath() {\r
assert wsContext != null : "WS context injection failed!";\r
MessageContext msContext = wsContext.getMessageContext();\r
\r
StringBuffer server = request.getRequestURL();\r
server = server.delete(server.lastIndexOf("/"), server.length());\r
\r
StringBuffer server = request.getRequestURL();\r
server = server.delete(server.lastIndexOf("/"), server.length());\r