You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Gulyás Gergely <GG...@grepton.hu> on 2011/11/03 16:54:43 UTC

change client URL dynamically

Hi Guys,

I would like to change my (dosgi) cxf client url dynamically from the program code, but i have no any idea, how i can do it. ( (dosgi)cxf server is available as remote service)
Could you help me in that? Thanks in advance!

Best regards,
Gergo


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/

RE: Using XPATH to choose Converto object

Posted by Omar Atia <om...@its.ws>.
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 Omar Atia <om...@its.ws>.
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: change client URL dynamically

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 03/11/11 15:54, Gulyás Gergely wrote:
> Hi Guys,
>
> I would like to change my (dosgi) cxf client url dynamically from the program code, but i have no any idea, how i can do it. ( (dosgi)cxf server is available as remote service)
> Could you help me in that? Thanks in advance!
>
I'm not sure how to do it as with DOSGI the idea is that on the client 
side one just queries a service interface the OSGI way and works with 
that interface, you may want to experiment with making the properties 
such as endpoint.id [1] available during the service interface query,
that may help

Sergey

[1] 
http://svn.apache.org/repos/asf/cxf/dosgi/trunk/systests2/common/src/main/resources/rs-test1.xml
> Best regards,
> Gergo
>
>