OK. Got it. So I will not further follow this approach.
Maybe this solution is more straightforward. I'm just wondering if it will
work in a multiuser scenario?
super(Phase.POST_LOGICAL);
addAfter(ReadHeadersInterceptor.class.getName());
}
public void handleMessage(SoapMessage message) throws Fault {
Exchange ex = message.getExchange();
if (message.getVersion() instanceof Soap11) {
Map<String, List<String>> headers = CastUtils.cast((Map)
message.get(Message.PROTOCOL_HEADERS));
if (headers != null) {
List<String> sa = headers.get("SOAPAction");
if (sa != null && sa.size() > 0) {
String action = sa.get(0);
if (action.startsWith("\"")) {
action = action.substring(1, action.length() - 1);
}
System.out.println("[STATISTICS] [action] " + action);
ex.put("startTime", System.currentTimeMillis());
}
}
else {
long diff = System.currentTimeMillis()
-Long.valueOf(ex.get("startTime").toString());
long diffMs = diff % 1000;
System.out.println("[STATISTICS] [duration]"+ diffMs + " ms");
}
}
}
--
GMX DSL SOMMER-SPECIAL: Surf & Phone Flat 16.000 für nur 19,99 Euro/mtl.!*
http://portal.gmx.net/de/go/dsl