String endpointName = config.getInitParameter("endpoint");
if (endpointName == null) {
throw new ServletException("You must configure a servlet config parameter of endpointRef");
}
SpringJBIContainer jbi = (SpringJBIContainer) applicationContext.getBean(jbiName);
if (jbi == null) {
throw new ServletException("Could not find the JBIContainer in the Spring application context for name: " + jbiName);
}
Object value = jbi.getBean(endpointName);
if (value == null) {
throw new ServletException("Could not find bean in the SpringJBIContainer for id: " + endpointName);
}
if (value instanceof HttpBinding) {
return (HttpBinding) value;