public static Endpoint toEndpoint(final CxfSpringEndpointBean endpointBean) throws Exception {
if (endpointBean == null) {
throw new IllegalArgumentException("The CxfEndpoint instance is null");
}
// CamelContext
SpringCamelContext context = SpringCamelContext.springCamelContext(endpointBean.getApplicationContext());
// The beanId will be set from endpointBean's property
CxfEndpoint answer = new CxfSpringEndpoint(context, endpointBean);
// check the properties map
if (endpointBean.getProperties() != null) {
Map<String, Object> copy = new HashMap<String, Object>();