5 Replies Latest reply on Nov 5, 2012 7:45 PM by Freeman(Yue) Fang

    Camel route from NMR to cxf:bean

    Alejandro Romero Newbie

      Hi,

       

      I want to expose a web service (provider). In addition, I need to use a client with another services, and I want the comunication by nmr.

       

      My configuration file is as follows:

       

      <cxf:cxfEndpoint id="test3_consumer" address="http://localhost:8076/test3"

      wsdlURL="http://www.webservicex.net/WeatherForecast.asmx?WSDL"

      serviceName="cc:WeatherForecast" serviceClass="net.webservicex.WeatherForecastSoap">

                 

                <cxf:properties>

                     <entry key="loggingFeatureEnabled" value="true" />

                </cxf:properties>

           </cxf:cxfEndpoint>

            

           <cxf:cxfEndpoint id="test3_nmr" address="nmr:test3"

                wsdlURL="http://www.webservicex.net/WeatherForecast.asmx?WSDL"

                serviceName="cc:WeatherForecast" serviceClass="net.webservicex.WeatherForecastSoap">

                 

                <cxf:properties>

                     <entry key="loggingFeatureEnabled" value="true" />

                </cxf:properties>

           </cxf:cxfEndpoint>

            

                      

           <cxf:cxfEndpoint id="test3_provider"

                address="http://www.webservicex.net/WeatherForecast.asmx" wsdlURL="http://www.webservicex.net/WeatherForecast.asmx?WSDL"

                serviceName="cc:WeatherForecast" serviceClass="net.webservicex.WeatherForecastSoap">

                <cxf:properties>

                     <entry key="loggingFeatureEnabled" value="true" />

                </cxf:properties>

           </cxf:cxfEndpoint>

            

            

           <jaxws:client id="client"

                serviceClass="net.webservicex.WeatherForecastSoap"

                serviceName="cc:WeatherForecast" address="nmr:test3">

                <jaxws:features>

                     <bean class="org.apache.cxf.feature.LoggingFeature" />

                </jaxws:features>

           </jaxws:client>

            

           <osgi:service id="proxyTest3" ref="client"

                interface="net.webservicex.WeatherForecastSoap" />

       

       

       

       

      <camelContext id="test3_route" xmlns="http://camel.apache.org/schema/spring">

       

                <route id="test3_route1" streamCache="true">

                     <from uri="cxf:bean:test3_consumer?dataFormat=MESSAGE" />

       

                     <to uri="cxf:bean:test3_provider?dataFormat=MESSAGE" />

                </route>

                 

                <route id="test3_route2" streamCache="true">

                     <from uri="nmr:test3" />

       

                     <to uri="cxf:bean:test3_provider?dataFormat=MESSAGE" />

                </route>

                 

      </camelContext>

       

      The error that I get is:

       

      javax.xml.ws.soap.SOAPFaultException: Could not find conduit initiator for address: nmr:test3 and transport: http://schemas.xmlsoap.org/soap/http

       

      regards

      Alex