protocolDefinition = impls.next();
}
}
// Create and init the filter (which we do anyway, even if there are no protocol implementation)
FilterMapping filterMapping = new FilterMapping();
filterMapping.setName("WGAServices SOAP Request Filter");
filterMapping.setEnabled(true);
filterMapping.setImplClassName(WGAServicesSOAPFilter.class.getName());
List<String> patterns = new ArrayList<String>();
patterns.add("/services/*");
patterns.add("//services/*");
filterMapping.setUrlPatterns(patterns);
Map<String, String> parameters = new HashMap<String, String>();
// If we have a definition we pass on the servlet class to the filter, otherwise we used the "SOAP disabled" servlet
if (protocolDefinition != null) {
parameters.put(WGAServicesSOAPFilter.PARAM_PROTOCOL_SERVLET, protocolDefinition.getImplementationClass().getName());
}
else {
parameters.put(WGAServicesSOAPFilter.PARAM_PROTOCOL_SERVLET, WGAServicesSOAPDisabledServlet.class.getName());
}
filterMapping.setInitParameters(parameters);
WGAServicesSOAPFilter filter = new WGAServicesSOAPFilter();
WGAFilterConfig filterConfig = WGAFilterConfig.createFromMapping(filterMapping);
filterConfig.setServletContext(core.getServletContext());
filter.init(filterConfig);
_filters.add(filter);
_filterToURLPatterns.put(filter, filterMapping.getUrlPatterns());
if (protocolDefinition != null) {
core.getLog().info("WGAServices enabled using protocol implementation " + protocolDefinition.getTitle(Locale.getDefault()));
}
else {