Dears,
I'm using Apache camel with CXF , my web service response inside the route below is of two types
rm.type.SReturnVO or rm.type.Tisexception , the input to load balancer is of POJO
<loadBalance>
<failover>
<exception>java.io.IOException</exception>
</failover>
<to uri="cxf:bean:Masterpcrf" />
<to uri="cxf:bean:slavepcrf" />
</loadBalance>
<to uri="log:afterrecsoap"/>
<convertBodyTo type="rm.type.SReturnVO"/>
<marshal ref="dec"/>
<convertBodyTo type="String"/>
<bean ref="nulladd"/>
I'm using POJO dataformat to handle the request .
How can I manage to convertbody to TisException or SReturnVO , sometime the <to uri="cxf:bean:Masterpcrf" />
<to uri="cxf:bean:slavepcrf" /> returns expetion sometimes it returns a valid response .
The above route when SReturnVO is returned it works fine , I want to stay on POJO format as my route depends on them .
If you can suggest to use XPATH as well or any other to differentiate between normal return and excpetion?
Thanks,
Omar Atia