}
private void addEndpointMappingToConfiguration(Map<String, Object> parameters,
SpringWebserviceConfiguration configuration) {
// Obtain generic CamelEndpointMapping from registry
CamelEndpointMapping endpointMapping = resolveAndRemoveReferenceParameter(parameters, "endpointMapping", CamelEndpointMapping.class, null);
if (endpointMapping == null && configuration.getEndpointDispatcher() == null) {
throw new IllegalArgumentException("No CamelEndpointMapping found in Spring ApplicationContext."
+ " This bean is required for Spring-WS consumer support (unless the 'spring-ws:beanname:' URI scheme is used)");
}
configuration.setEndpointMapping(endpointMapping);