Hi,

Following is my camel-context.xml file. "HelloServiceEndpoint" is the actual
remote web service implementation. "proxyEndpoint" is the front end accessed
by clients. 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

<beans xmlns="http://www.springframework.org/schema/beans";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xmlns:cxf="http://camel.apache.org/schema/cxf";
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
        http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd
        http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd";>
 
    <cxf:cxfEndpoint id="proxyEndpoint"
                     address="http://localhost:8080/HelloService";
                     wsdlURL="../../wsdl/HelloService.wsdl"
                     endpointName="tns:HelloServicePort"
                     serviceName="tns:HelloService"                     
                     xmlns:tns="http://tempuri.org/HelloService"; />
 
 
    <camelContext xmlns="http://camel.apache.org/schema/spring";>  
        
        <endpoint id="HelloServiceEndpoint"
              uri="http://localhost:8080/axis2/services/HelloService"/>
        <route>            
            <from uri="cxf:bean:proxyEndpoint" />
            <to ref="HelloServiceEndpoint"/>
        </route> 
    </camelContext>

</beans>

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

When I deploy it in ServiceMix 4.5.2, I get the following exception. Please
help me to solve this. 

2013-11-13 14:03:30,381 | ERROR | xtenderThread-32 | ContextLoaderListener      
     
| 82 - org.springframework.osgi.extender - 1.2.1 | Application context
refresh failed (OsgiBundleXmlApplicationContext(bundle=HelloSerice,
config=osgibundle:/META-INF/spring/*.xml))
org.apache.camel.RuntimeCamelException:
org.apache.camel.FailedToCreateRouteException: Failed to create route
route16 at: >>> To[ref:HelloServiceEndpoint] <<< in route:
Route[[From[cxf:bean:proxyEndpoint]] -> [To[ref:HelloService... because of
Cannot lookup: HelloServiceEndpoint from registry:
org.apache.camel.spring.spi.ApplicationContextRegistry@ef152b with expected
type: interface org.apache.camel.Endpoint due: Error creating bean with name
'HelloServiceEndpoint': FactoryBean threw exception on object creation;
nested exception is org.apache.camel.ResolveEndpointFailedException: Failed
to resolve endpoint: http://localhost:8080/axis2/services/HelloService due
to: No component found with scheme: http
        at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1326)[100:org.apache.camel.camel-core:2.10.6]



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-expose-a-remote-Web-Service-tp5743119p5743159.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to