So, in Evgeny's example, I believe this should work without requiring any fixes.
<cxf:cxfEndpoint id="cxfEndpointConfig" address="/incident" serviceClass="ru.transsys.testcxf.TestEndpointImpl"/> <camel:camelContext xmlns="http://activemq.apache.org/camel/schema/spring" id="camel" useJmx="false"> <!--- put this endpoint in registry --> <endpoint id="serviceEndpoint" uri="cxf:bean:cxfEndpointConfig"/> <route> <from ref="serviceEndpoint"/> <to id="aq1_In" uri="file:c:\temp\in"/> </route> </camel:camelContext> I guess one reason to use "ref" could be reusing an endpoint definition in more than one route. This should achieve it. On Sat, Jan 24, 2009 at 11:15 AM, William Tam <email.w...@gmail.com> wrote: > In the "Ref" wiki page (http://camel.apache.org/ref.html), a sample > usage suggests that endpoint bean is created from URI with component > scheme. Perhaps, we should support this pattern instead? > > <camelContext id="camel" > xmlns="http://activemq.apache.org/camel/schema/spring"> > <endpoint id="endpoint1" uri="direct:start"/> > <endpoint id="endpoint2" uri="mock:end"/> > > <route> > <from ref="endpoint1"/> > <to uri="ref:endpoint2"/> > </route> > </camelContext> > > On Sat, Jan 24, 2009 at 10:45 AM, William Tam <email.w...@gmail.com> wrote: >> Let me ask a dumb question. What is the benefit of doing this? >> What's wrong with using "from" URI "cxf:bean:<beanId>" and let the >> CxfComponent construct the endpoint? I thought endpoint was always >> created by a component(?) Why we want to bypass all of that? Now, I >> think the CxfEndpoint may have a null component which could cause >> problem. And, CxfSpringEndpoint may have empty beanId field which is >> used by the configure() method. >> >> >> On Sat, Jan 24, 2009 at 6:00 AM, Willem Jiang <willem.ji...@gmail.com> wrote: >>> Since there are huge changes between the camel 2.0 and camel 1.6 in >>> camel-cxf module. I just commit a quick of CAMEL-1294 in Camel 2.0. >>> >>> Now you can define the rule like this in CAMEL 2.0-SNAPSHOT. >>> <camel:camelContext >>> xmlns="http://activemq.apache.org/camel/schema/spring" id="camel" >>> useJmx="false"> >>> <route> >>> <from uri="serviceEndpoint"/> >>> <to id="aq1_In" uri="file:c:\temp\in"/> >>> </route> >>> </camel:camelContext> >>> >>> NOTE: we don't support use ref bean in the camel rule, since the auto >>> converting work can't be done in that case. >>> >>> Willem >>> Willem Jiang wrote: >>>> I just created a JIRA[1] for it, it should be fixed in the coming up >>>> CAMEL 1.6. >>>> >>>> [1]https://issues.apache.org/activemq/browse/CAMEL-1294 >>>> >>>> Willem >>>> >>>> Willem Jiang wrote: >>>>> Hi, >>>>> >>>>> Current cxfEndpoint can't be directly used as a camel Endpoint. >>>>> You need to change your camel context >>>>> >>>>> <camel:camelContext >>>>> xmlns="http://activemq.apache.org/camel/schema/spring" id="camel" >>>>> useJmx="false"> >>>>> >>>>> <route> >>>>> <from uri="cxf:bean:serviceEndpoint"/> >>>>> <to id="aq1_In" uri="file:c:\temp\in"/> >>>>> </route> >>>>> </camel:camelContext> >>>>> >>>>> Willem >>>>> >>>>> >>>>> pevgen wrote: >>>>>> Hello. >>>>>> >>>>>> I try to configurate a cxf-endpoint in a spring config. But i got error >>>>>> "org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean >>>>>> named 'serviceEndpoint' must be of type [org.apache.camel.Endpoint], but >>>>>> was >>>>>> actually of type [org.apache.camel.component.cxf.spring.CxfEndpointBean]" >>>>>> >>>>>> config.xml : >>>>>> >>>>>> <?xml version="1.0" encoding="UTF-8"?> >>>>>> <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://activemq.apache.org/camel/schema/cxfEndpoint" >>>>>> >>>>>> xmlns:camel="http://activemq.apache.org/camel/schema/spring" >>>>>> xsi:schemaLocation="http://www.springframework.org/schema/beans >>>>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd >>>>>> http://activemq.apache.org/camel/schema/spring >>>>>> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd >>>>>> http://activemq.apache.org/camel/schema/cxfEndpoint >>>>>> http://activemq.apache.org/camel/schema/cxf/cxfEndpoint.xsd >>>>>> http://cxf.apache.org/jaxws >>>>>> http://cxf.apache.org/schemas/jaxws.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"/> >>>>>> >>>>>> <cxf:cxfEndpoint name="serviceEndpoint" id="serviceEndpoint" >>>>>> address="/incident" >>>>>> serviceClass="ru.transsys.testcxf.TestEndpointImpl"/> >>>>>> <!--endpointName="s:TestEndpointPort"--> >>>>>> <!--serviceName="s:TestEndpointService"--> >>>>>> <!--xmlns:s="http://test.transsys.ru" />--> >>>>>> >>>>>> >>>>>> <camel:camelContext >>>>>> xmlns="http://activemq.apache.org/camel/schema/spring" id="camel" >>>>>> useJmx="false"> >>>>>> >>>>>> <route> >>>>>> <from ref="serviceEndpoint"/> >>>>>> <to id="aq1_In" uri="file:c:\temp\in"/> >>>>>> </route> >>>>>> </camel:camelContext> >>>>>> >>>>>> <!-- implementation of the webservice --> >>>>>> <bean id="testEndpoint" >>>>>> class="ru.transsys.testcxf.TestEndpointImpl"/> >>>>>> >>>>>> </beans> >>>>>> >>>>>> what do you think about it ? >>>>>> >>>>>> thanks, >>>>>> Evgeny >>>>>> >>>>> >>>> >>>> >>> >>> >> >