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...)