String beanId = remaining.substring(CxfConstants.SPRING_CONTEXT_ENDPOINT.length());
if (beanId.startsWith("//")) {
beanId = beanId.substring(2);
}
CxfEndpointBean bean = CamelContextHelper.mandatoryLookup(getCamelContext(), beanId,
CxfEndpointBean.class);
result = new CxfSpringEndpoint(this, bean);
setEndpointHeaderFilterStrategy(result);
// Apply Spring bean properties (including # notation referenced bean). Note that the
// Spring bean properties values can be overridden by property defined in URI query.
// The super class (DefaultComponent) will invoke "setProperties" after this method
// with to apply properties defined by URI query.
if (bean.getProperties() != null) {
Map<String, Object> copy = new HashMap<String, Object>();
copy.putAll(bean.getProperties());
setProperties(result, copy);
}
} else {
// endpoint URI does not specify a bean