Hi,
Can you try to use the latest Camel 2.3.0-SNAPSHOT? I just remembered I
fixed a bus related issue[1] last month.
[1]https://issues.apache.org/activemq/browse/CAMEL-2465
Willem
jejmaster wrote:
Okay so here's how i defined my applicationContext for camel routing. By the
way, I am using both Soap And REST as router endpoints for this.
applicationContext-camel.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:cxf="http://camel.apache.org/schema/cxf"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.0.xsd
http://cxf.apache.org/jaxrs
http://cxf.apache.org/schemas/jaxrs.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<import
resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"
/>
<!-- SOAP -->
<cxf:cxfEndpoint id="soapRouter" address="/soapRouter"
serviceClass="com.project.service.TestManager"
endpointName="s:TestManagerImplPort"
serviceName="s:TestService"
xmlns:s="http://impl.service.test.com/" />
<cxf:cxfEndpoint id="soapEndpoint"
address="http://localhost:8080/services/testService"
wsdlURL="http://localhost:8080/services/testService?wsdl"
serviceClass="com.project.service.TestManager"
endpointName="s:TestManagerImplPort"
serviceName="s:TestService"
xmlns:s="http://impl.service.test.com/" />
<!-- REST -->
<cxf:rsServer id="restRouter" address="/restRouter/"
serviceClass="com.project.service.impl.TestManagerImpl" />
<cxf:rsClient id="restEndpoint"
address="http://localhost:8080/services/rest"
serviceClass="com.project.service.impl.TestManagerImpl" />
<!-- CAMEL CONTEXT -->
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="cxf:bean:soapRouter" />
<to uri="cxf:bean:soapEndpoint" />
</route>
<route>
<from uri="cxfrs:bean:restRouter"/>
<to uri="cxfrs:bean:restEndpoint"/>
</route>
</camelContext>
</beans>
Thanks.
willem.jiang wrote:
You are using CXFServlet transport, can I have a look at your hole
application context configuration?
It may relate to CXF Bus configuration.
Willem
jejmaster wrote:
Hello,
Currently, I tried to upgrade Camel version from 2.0.0 to 2.2.0 and CXF
version to 2.2.2 to 2.2.6. In 2.0.0, I have a CXFRS Endpoints and Route
as
follows:
<cxf:rsServer id="restRouter" address="/restRouter/"
serviceClass="com.project.service.impl.ServiceManagerImpl" />
<cxf:rsClient id="restEndpoint"
address="http://localhost:8080/services/rest"
serviceClass="com.project.service.impl.ServiceManagerImpl" />
<route>
<from uri="cxfrs:bean:restRouter"/>
<to uri="cxfrs:bean:restEndpoint"/>
</route>
Upon invoking the restRouter, it causes an error which roots to 404 not
found "http://localhost:8080/services/rest/restRouter/<Path...>". It
seems
that the address restEndpoint Address is being appended by the
restRouter's
address. Thus, making the invocation fails.
I would like to know what should be the fix here. Is this a current
limitation with camel 2.2.0 and CXF 2.2.6?
I have created an issue at
https://issues.apache.org/activemq/browse/CAMEL-2575.
Thanks in advance.