protected void registerServlet(BundleContext bundleContext) throws Exception {
httpServiceRef = bundleContext.getServiceReference(HttpService.class.getName());
if (httpServiceRef != null && !registerService) {
LOG.info("Register the servlet service");
final HttpService httpService = (HttpService)bundleContext.getService(httpServiceRef);
if (httpService != null) {
// create a default context to share between registrations
final HttpContext httpContext = httpService.createDefaultHttpContext();
// register the hello world servlet
final Dictionary<String, String> initParams = new Hashtable<String, String>();
initParams.put("matchOnUriPrefix", "false");
initParams.put("servlet-name", "CamelServlet");
httpService.registerServlet("/camel/services", // alias
new CamelHttpTransportServlet(), // register servlet
initParams, // init params
httpContext // http context
);
registerService = true;