2 Replies Latest reply on Mar 13, 2015 5:15 AM by Miguel Fernández Martínez

    Consuming Services from Java Camel Implementation

    Miguel Fernández Martínez Newbie

      Hi!

       

      I'm trying to consume a service from a Processor in a Java Camel implementation. The service reference is a gateway to a external SOAP WebService.

      I tried to used a ReferenceInvoker with annotations as explained in the documentation, but it doesn't get injected...throwing a NPE when I try to use it.

       

      This is what I tried:

      @Inject

      @Reference("CamelServiceRoute/MonitoringWS")

        private ReferenceInvoker service;

       

      and:

      @Inject

      @Reference("MonitoringWS")

        private ReferenceInvoker service;

       

      And this is how the project looks like:

      sy.PNG

       

      Camel route:

      from("switchyard://ProxyService")

           .to("switchyard://ProxifiedService")

           .process(processorThatTriesToInvokeMonitoringWithTheReferenceInvoker)

           .end();

       

      What can I do to achive my objective?

       

      Thank you.

      Regards,

       

      Miguel