from ("seda:x").to("cxf:bean:y") exception: Could not send Message

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

from ("seda:x").to("cxf:bean:y") exception: Could not send Message

pawel.jasinski
hi all,

my test case:
1. sets up the web service out of camel context
2. builds the camel context/route (using SpringTestSupport)
3. sends a message into "direct:B" using template

here what works:
  from("direct:B").process(typeConverter).to("cxf:bean:notifyMockupEndpoint");

when I change the route definition into:
  from("direct:B").to("seda:in").transform(constant(notifyMessageResponse));
  from("seda:in").process(typeConverter).to("cxf:bean:notifyMockupEndpoint");

I get the exception:
  org.apache.cxf.interceptor.Fault: Could not send Message.
        at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
        at org.apache.camel.component.cxf.CxfProducer.invokeClient(CxfProducer.java:285)
        at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:193)
        at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:166)
        at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
        at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:50)
        at org.apache.camel.processor.LoggingErrorHandler.process(LoggingErrorHandler.java:53)
        at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:85)
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:63)
        at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:65)
        at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:66)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: Not Found
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1962)
        at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1865)
        at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
        at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:593)
        at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
        ... 19 more

When I look closer at the error code from exception (Not Found), turned out to be HTTP 404.
I am running 1.5-SNAPSHOT.
What is going on here?

Pawel

Reply | Threaded
Open this post in threaded view
|

Re: from ("seda:x").to("cxf:bean:y") exception: Could not send Message

pawel.jasinski
Short update.
I have inspected the request/reply with tcpmon.
There is no difference between good and bad request (except timestamps on some dateTime elements).

Pawel
Reply | Threaded
Open this post in threaded view
|

Re: from ("seda:x").to("cxf:bean:y") exception: Could not send Message

pawel.jasinski
after some more digging I have found the problem.
My test setup was teared down before the camel had a chance to complete routing.
As far as jUnit was concerned the test was done. In reality the messages were still on the queue waiting to be processed and send to the web service endpoint. Endpoint was already stopped and responded correctly with 404.

Pawel