0 Replies Latest reply on Aug 5, 2014 11:12 AM by Mirko Caserta

    Enabling HTTPS on a JAX-WS Endpoint

    Mirko Caserta Newbie

      Hello everyone,

      I'm having a little bit of trouble configuring https on a jax-ws endpoint that is exposed though camel in blueprint. We're running jboss-fuse-6.0.0.redhat-024.


      We are exposing the service using the <camel-cxf:cxfEndpoint .../> tag in blueprint.


      From what I understand, the cxf camel component uses jetty to expose the http service and most configuration examples refer either to spring or to the "native" cxf.xml configuration file, which is also spring based.


      I have tried a couple approaches:


      1) providing a cxf.xml in the root of the bundle


      2) providing a spring configuration file in the bundle's META-INF/spring dir


      The first approach doesn't work because cxf doesn't seem to scan for the config file and it doesn't get picked up.


      The second one makes camel throw a NPE while initializing the jetty component:


      15:21:41,047 | ERROR | NAPSHOT-thread-1 | BlueprintCamelContext            | 138

      - org.apache.camel.camel-blueprint - 2.10.0.redhat-60024 | Error occurred durin

      g starting Camel: CamelContext(mainCamelContext) due null


              at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(Jet



      My guess is that the cxf bus is getting initialized by spring and camel is getting initialized in blueprint and the two contexts don't see each other (of course, they are two different DI frameworks).


      I was wondering if there is a recommended way of configuring https when using blueprint. I guess we could easily rewrite the blueprint file as a spring file, but we prefer using blueprint instead of spring since the bundlr plugin takes care of magically importing all the OSGi stuff.


      Thanks a lot in advance.