Here is my code :
Code:
log.info("TESTING_WEBSERVICES");
PrintWriter out = response.getWriter();
out.println("<html><head><title>Test Webservices</title></head><body><h1>Status of webservices listed below</h1>");
Map services = getApplicationContext().getBeansOfType(ECareWebserviceClient.class);
Iterator i = services.entrySet().iterator();
ECareWebserviceClient service;
while (i.hasNext()) {
long before =System.currentTimeMillis();
Object o = ((Entry)i.next()).getValue();
if (o instanceof Advised) {
service = (ECareWebserviceClient)((Advised)o).getTargetSource().getTarget();
} else {
service = (ECareWebserviceClient)o;
}
String endpoint = service.getEndpointUrl();
out.println("Name : <b>" + service.getClass().getName() + "</b><br/>");
out.println("Endpoint : " + endpoint + "<br/>");
out.println("Status : " + getStatus(endpoint) + "<br/>");
out.println("ResponseTime : " + (System.currentTimeMillis() - before) + "<p></p>");
}
out.println("</body></html>");
out.flush();
this works great for the beans that aren't proxied by EHCache, but for the one that is proxied I get :
Name : com.rms.test.SamApiClientImpl
Endpoint : null
Status : no protocol: null?wsdl
ResponseTime : 4546