notification that a user authentication attempt has failed.
if (ep == null) {
_logger.fine("Endpoint is null for " + desc.getModuleID());
return;
}
// get the endpoint's fully qualified name
String fqn =WebServiceMgrBackEnd.getManager().getFullyQualifiedName(ep);
if (fqn == null) {
_logger.fine("Fully Qualified could not be computed for the selector " +
ep.getEndpointSelector());
return;
}
WebServiceEndpointStatsProviderImpl impl = (
WebServiceEndpointStatsProviderImpl) StatsProviderManager.
getInstance().getEndpointStatsProvider(fqn);
// set auth failure time stamp
if (impl != null) {
impl.setAuthFailure(System.currentTimeMillis());
}
try {
ConfigProvider cfgProv = ConfigFactory.getConfigFactory().getConfigProvider();
if (cfgProv != null) {
WebServiceConfig wsc = cfgProv.getWebServiceConfig(fqn);
if ((wsc == null) || (wsc.getMonitoringLevel() == null)
|| (wsc.getMonitoringLevel().equals("OFF"))) {
// in this case, there wont be any stats
_logger.fine("Monitoring is OFF for webservice endpoint " +
fqn);
return;
}
}
// get its corresponding stats provider
if (impl == null) {
if (cfgProv != null) {
String msg = _stringMgr.getString("Auth.StatsNotReg", fqn);
throw new RuntimeException(msg);
}
return;
}
} catch (Exception e) {
_logger.fine("Config provider could not be initialized " +
e.getMessage());
}
/** enable the following code, once bug# 6418025 is fixed.
** Need a way to HTTP headers and client host information.
** SOAPMessageContext needed to be passed to this method.
**
// create empty message trace for this element
List l =
FilterRegistry.getInstance().getFilters(Filter.POST_PROCESS_RESPONSE,
fqn);
Iterator itr = l.iterator();
while (itr.hasNext()) {
Object o = itr.next();
if (o instanceof MessageFilter) {
MessageTraceImpl m = new MessageTraceImpl(
new Integer(GlobalMessageListenerImpl.newSequenceNumber())
.toString());
m.setRequestSize(0);
m.setResponseSize(0);
m.setRequestContent(null);
m.setResponseContent(null);
//m.setTransportType();
//m.setHTTPRequestHeaders();
//m.setHTTPResponseHeaders();
//m.setClientHost();
// Setting principal name to principal.getName() causing issues
m.setPrincipalName(null);
m.setResponseTime(0);
m.setFaultCode("999");
m.setFaultString(null);
m.setFaultActor(null);
m.setTimeStamp(System.currentTimeMillis());
//m.setCallFlowEnabled(false);
m.setEndpointName(fqn);
m.setApplicationID(null);
((MessageFilter)o)._handler.addMessage(m);
return;
}
}
*/