}
private void addEndpointMappingToConfiguration(Map<String, Object> parameters,
SpringWebserviceConfiguration configuration) {
// Obtain generic CamelSpringWSEndpointMapping from registry
CamelSpringWSEndpointMapping endpointMapping = resolveAndRemoveReferenceParameter(parameters, "endpointMapping", CamelSpringWSEndpointMapping.class, null);
if (endpointMapping == null && configuration.getEndpointDispatcher() == null) {
throw new IllegalArgumentException("No instance of CamelSpringWSEndpointMapping 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);