Thanks a lot for your quick answer, I am going nut with this issue.
I changed my camel-context (logs are now before to:jbi...) and enabled
logging on my CXF web service. The log shows that camel sends an empty soap
enveloppe to my web service when content-based routing is activated.
As you recommended I tried to use servicemix 3.3-SNAPSHOT and Camel
1.4-SNAPSHOT. I changed all my pom's to have
<servicemix-version>3.3-SNAPSHOT</servicemix-version>
<camel-version>1.4-SNAPSHOT</camel-version>
I launch my SA using "mvn clean install jbi:servicemix", deploying is fine
but when I send a message to camel I have :
java.lang.NoSuchMethodError:
org.apache.camel.Endpoint.getCamelContext()Lorg/apache/camel/CamelContext;
at
org.apache.servicemix.camel.CamelJbiEndpoint.handleActiveProviderExchange(CamelJbiEndpoint.java:100)
at
org.apache.servicemix.camel.CamelJbiEndpoint.process(CamelJbiEndpoint.java:74)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:582)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:533)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:487)
at
org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
2008-06-23 14:40:30,028 [btpool1-1 ] WARN jetty
- /ProcessusAdmissionConsumer/
java.lang.IllegalStateException: Exchange not found
at
org.apache.servicemix.http.processors.ConsumerProcessor.process(ConsumerProcessor.java:190)
at
org.apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.java:71)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:324)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:374)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at
org.mortbay.jetty.nio.SelectChannelConnector$RetryContinuation.run(SelectChannelConnector.java:506)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
Any idea ?
Gert Vanthienen wrote:
>
> L.S.,
>
> If you put the <to uri="log:..."> after the routing step to CXF in your
> camel file, you implicitly create a pipeline that first sends an in-out
> exchange to CXF and afterwards logs the out message from the CXF service
> call, that's why you see the StaxSource at that point. To see what
> Camel is sending to the endpoint, you'll need to add a <to uri="log...">
> before the jbi:endpoint.
>
> Could you enable DEBUG logging to see what the MessageExchanges going
> to/from your CXF endpoints look like? You probably want to get the
> latest SNAPSHOT version of the servicemix-camel component in ServiceMix
> as well because it has some fixes with regards to MEP processing you're
> going to need for this scenario to work.
>
> Regards,
>
> Gert
>
> John MIPIH wrote:
>> Hello,
>>
>> Here is my camel config file :
>>
>> <camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
>> <route>
>> <from
>> uri="jbi:endpoint:urn:fr:mipih:poc:soa:Routage:RouteVersAdmission"/>
>> <to uri="log:Before-routing"/>
>> <choice>
>> <when>
>> <xpath>.//prenom = 'John'</xpath>
>> <to
>> uri="jbi:endpoint:urn:fr:mipih:poc:soa:ProcessusAdmissionImplService:ProcessusAdmissionImplPort?mep=in-out"/>
>> <to uri="log:Routage-vers-reference"/>
>> </when>
>> <otherwise>
>> <to
>> uri="jbi:endpoint:urn:fr:mipih:poc:soa:ProcessusAdmissionImplBisService:ProcessusAdmissionImplBisPort?mep=in-out"/>
>> <to uri="log:Routage-vers-convergence"/>
>> </otherwise>
>> </choice>
>> </route>
>> </camelContext>
>>
>>
>> When an incoming message comes I get in the console :
>>
>> 2008-06-23 11:27:07,892 [-camel-thread-1] INFO Avant-routage -
>> Exchange[JbiMessage:
>> [EMAIL PROTECTED]:
>> {}}]
>> 2008-06-23 11:27:08,282 [-camel-thread-1] INFO Routage-vers-convergence
>> -
>> Exchange[Message: [EMAIL PROTECTED]
>>
>> or
>>
>> 2008-06-23 11:27:16,048 [-camel-thread-4] INFO Avant-routage -
>> Exchange[JbiMessage:
>> [EMAIL PROTECTED]:
>> {}}]
>> 2008-06-23 11:27:16,079 [-camel-thread-4] INFO Routage-vers-reference -
>> Exchange[Message: [EMAIL PROTECTED]
>>
>> according to the message content (so the routing works fine !)
>>
>> This is good but the target service (cxf webservice) receives a bad
>> message
>> (nullpointer exception). Why do the message change between my first log
>> and
>> the second from NormalizedMessage to StaxSource ? The problem is this
>> change
>> because when I change my camel context to :
>>
>> <camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
>> <route>
>> <from
>> uri="jbi:endpoint:urn:fr:mipih:poc:soa:Routage:RouteVersAdmission"/>
>> <to
>> uri="jbi:endpoint:urn:fr:mipih:poc:soa:ProcessusAdmissionImplBisService:ProcessusAdmissionImplBisPort?mep=in-out"/>
>> </route>
>> </camelContext>
>>
>> everything works fine (but no routing...)
>>
>>
>>
>>
>
>
>
> -----
> ---
> Gert Vanthienen
> http://www.anova.be
>
--
View this message in context:
http://www.nabble.com/Content-Based-Routing-with-Camel-tp18065614p18067096.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.