2 Replies Latest reply on Oct 23, 2012 12:14 PM by fiddlerpianist

    Can you use Blueprint to publish a Camel CXF endpoint to the NMR?

    fiddlerpianist

      I've looked at the cxf-camel-nmr example that ships with ServiceMix. It uses Spring-DM to configure the endpoint.

       

      Is there a similar way to do this in Blueprint? I gave it a shot, but CXF (2.5.0.fuse-7-061) throws this exception:

       

      java.lang.NullPointerException

           at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:136)

           at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:93)

           at org.apache.cxf.endpoint.ServerImpl.(ServerImpl.java:72)

           at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:160)

      ...

       

      I have all the NMR features I could find installed in FuseESB. It seems that CXF doesn't know about the NMR transport, and Blueprint isn't telling it about it, either.

       

      Many thanks!

      Jonathan

       

      Edited by: fiddlerpianist on Oct 17, 2012 4:37 PM (clarified terminology in the subject)

        • 1. Re: Can you use Blueprint to publish a Camel CXF endpoint to the NMR?
          ffang

          Hi,

           

          It should work IIRC, camel-cxf endpoint could use NMR transport. Please append your configuration file so that we can take a look.

           

          Freeman

          • 2. Re: Can you use Blueprint to publish a Camel CXF endpoint to the NMR?
            fiddlerpianist

            My blueprint file is attached.

             

            The stack trace occurs on osgi:start of the bundle:

             

            java.lang.NullPointerException

                 at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:136)

                 at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:93)

                 at org.apache.cxf.endpoint.ServerImpl.(CxfConsumer.java:226)

                 at org.apache.camel.component.cxf.CxfEndpoint.createConsumer(CxfEndpoint.java:195)

                 at org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:65)

                 at org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:80)

                 at org.apache.camel.impl.RouteService.warmUp(RouteService.java:134)

                 at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:1921)

                 at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1849)

                 at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1642)

                 at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1531)

                 at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1413)

                 at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)

                 at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1381)

                 at org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:90)

                 at org.apache.camel.blueprint.BlueprintCamelContext.init(BlueprintCamelContext.java:82)

                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_31]

                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_31]

                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_31]

                 at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_31]

                 at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:225)[9:org.apache.aries.blueprint:0.3.1.fuse-7-061]

                 at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:838)[9:org.apache.aries.blueprint:0.3.1.fuse-7-061]

                 at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:638)[9:org.apache.aries.blueprint:0.3.1.fuse-7-061]

             

            Edited by: fiddlerpianist on Oct 23, 2012 11:14 AM