Well, the correct way in camel router to invoke a cxf se endpoint is
use jbi schema[1], you need deploy a cxf se endpoint(this is a jbi
endpoint which can be targeted in camel router by jbi schema), and in
the cxf se endpoint you can inject the proxy as I mentioned before.
So the flow should be
camel router---> cxf se endpoint(with proxy)---> provider---->
standalone external server.
[1]http://camel.apache.org/jbi.html
Freeman
On 2010-8-19, at 上午4:06, amigo wrote:
Well, I resolved problem with referencing cxfse:endpoint into camel
route
definition by this trick:
<camel-osgi:camelContext xmlns="http://camel.apache.org/schema/
spring">
<route>
<from uri="timer://myTimer?
fixedRate=true&period=3000000" />
<bean ref="translator" method="translate" />
</route>
</camel-osgi:camelContext>
<cxfse:endpoint pojo="#translator"/>
<bean class="com.translator.my.Translator" id="translator" />
But it still doesn't work and throws exception:
20:35:26,525 | ERROR | myTimer |
TimerConsumer |
rg.apache.camel.processor.Logger 248 | Error processing exchange.
Exchange[Message: [Body is null]]. Caused by:
[javax.xml.ws.soap.SOAPFaultException - No conduit initiator was
found for
the namespace http://schemas.xmlsoap.org/soap/http.]
javax.xml.ws.soap.SOAPFaultException: No conduit initiator was found
for the
namespace http://schemas.xmlsoap.org/soap/http.
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:
146)
at $Proxy93.translate(Unknown Source)
at com.translator.my.Translator.test(Translator.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun
.reflect
.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun
.reflect
.DelegatingMethodAccessorImpl
.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.apache.camel.component.bean.MethodInfo.invoke(MethodInfo.java:214)
at
org.apache.camel.component.bean.MethodInfo$1.proceed(MethodInfo.java:
133)
at
org
.apache
.camel.component.bean.BeanProcessor.process(BeanProcessor.java:137)
at
org
.apache
.camel
.management
.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
at
org
.apache
.camel
.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
at
org
.apache
.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
at
org
.apache
.camel
.processor
.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
at
org
.apache
.camel
.management
.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
at
org
.apache
.camel
.processor
.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:
177)
at
org
.apache
.camel
.processor
.RedeliveryErrorHandler
.processErrorHandler(RedeliveryErrorHandler.java:143)
at
org
.apache
.camel
.processor
.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
at
org
.apache
.camel
.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
at
org
.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:
228)
at
org
.apache
.camel
.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:
66)
at
org
.apache
.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
at
org
.apache
.camel
.management
.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
at
org
.apache
.camel
.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:
103)
at
org.apache.camel.component.timer.TimerConsumer
$1.run(TimerConsumer.java:50)
at java.util.TimerThread.mainLoop(Timer.java:534)
at java.util.TimerThread.run(Timer.java:484)
--
View this message in context:
http://servicemix.396122.n5.nabble.com/Problem-with-http-endpoint-tp2267630p2640016.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org