You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Omar Atia <om...@its.ws> on 2011/11/04 11:15:23 UTC
RE: Using XPATH to choose Converto object
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
Re: Using XPATH to choose Converto object
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Please do not cross post to multiple mailing lists.
Take a look at camel-jaxb which can convert to JAXB POJO classes from
a XML data.
On Fri, Nov 4, 2011 at 11:15 AM, Omar Atia <om...@its.ws> wrote:
> 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
>
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/