FAQ
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

Search Discussions

  • Claus Ibsen at Nov 4, 2011 at 10:40 am
    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 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/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedNov 4, '11 at 10:14a
activeNov 4, '11 at 10:40a
posts2
users2
websitecamel.apache.org

2 users in discussion

Omar Atia: 1 post Claus Ibsen: 1 post

People

Translate

site design / logo © 2022 Grokbase