You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Davide Mora <da...@gmail.com> on 2009/02/16 11:21:54 UTC

Re: JSON client?


Hi all, anybody found a solution for this? i need to do the same...
Thanks,
Davide


Bill Crook wrote:
> 
> Hi all,
> I've got my JSON endpoints up with CXF which is great. I now want to
> write a java client that can hit the JSON endpoint and turn the JSON
> response into the corresponding java objects. What is the best
> approach for doing this? Does anyone have any experience with this?
> Thanks for the help!
> 
> 

-- 
View this message in context: http://www.nabble.com/JSON-client--tp13960345p22034709.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: JSON client?

Posted by Christine Karman <ch...@christine.nl>.
On Mon, 2009-02-16 at 03:39 -0800, Davide Mora wrote:
> 
> hi Christine,
> i tried to use the client lib for call my rest service, following this
> http://cwiki.apache.org/CXF20DOC/simple-frontend.html but without success.
> do you think it should work?

The code on the wiki should work, that's for sure.
At http://cwiki.apache.org/CXF20DOC/a-simple-jax-ws-service.html there's
a link at the bottom of the page that shows you a very simple client. 

I haven't used client cxf myself, my clients are in js (generated by
cxf) or run on Android which doesn't support cxf, hence the XStream.


> 
> i will take a look to XStream.
> thanks,
> Davide
> 
> 
> Christine-27 wrote:
> > 
> > On Mon, 2009-02-16 at 02:21 -0800, Davide Mora wrote:
> >> Bill Crook wrote:
> >> > I've got my JSON endpoints up with CXF which is great. I now want to
> >> > write a java client that can hit the JSON endpoint and turn the JSON
> >> > response into the corresponding java objects. What is the best
> >> > approach for doing this? Does anyone have any experience with this?
> > 
> > I guess there's a number of ways for doing that. I use XStream to
> > convert either xml or json into java objects. Works perfectly, mostly
> > out of the box. Works both for incoming and outgoing.
> > 
> > But isn't there a CXF java client lib that does it for you? 
> > 
> > dagdag
> > Christine
> > 
> > -- 
> > dagdag is just a two-character rotation of byebye...
> > 
> > 
> >  
> > 
> 
-- 
dagdag is just a two-character rotation of byebye...


Re: JSON client?

Posted by Davide Mora <da...@gmail.com>.

hi Christine,
i tried to use the client lib for call my rest service, following this
http://cwiki.apache.org/CXF20DOC/simple-frontend.html but without success.
do you think it should work?

i will take a look to XStream.
thanks,
Davide


Christine-27 wrote:
> 
> On Mon, 2009-02-16 at 02:21 -0800, Davide Mora wrote:
>> Bill Crook wrote:
>> > I've got my JSON endpoints up with CXF which is great. I now want to
>> > write a java client that can hit the JSON endpoint and turn the JSON
>> > response into the corresponding java objects. What is the best
>> > approach for doing this? Does anyone have any experience with this?
> 
> I guess there's a number of ways for doing that. I use XStream to
> convert either xml or json into java objects. Works perfectly, mostly
> out of the box. Works both for incoming and outgoing.
> 
> But isn't there a CXF java client lib that does it for you? 
> 
> dagdag
> Christine
> 
> -- 
> dagdag is just a two-character rotation of byebye...
> 
> 
>  
> 

-- 
View this message in context: http://www.nabble.com/JSON-client--tp13960345p22035717.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: JSON client?

Posted by Christine Karman <ch...@christine.nl>.
On Mon, 2009-02-16 at 02:21 -0800, Davide Mora wrote:
> Bill Crook wrote:
> > I've got my JSON endpoints up with CXF which is great. I now want to
> > write a java client that can hit the JSON endpoint and turn the JSON
> > response into the corresponding java objects. What is the best
> > approach for doing this? Does anyone have any experience with this?

I guess there's a number of ways for doing that. I use XStream to
convert either xml or json into java objects. Works perfectly, mostly
out of the box. Works both for incoming and outgoing.

But isn't there a CXF java client lib that does it for you? 

dagdag
Christine

-- 
dagdag is just a two-character rotation of byebye...


Re: JSON client?

Posted by Sergey Beryozkin <sb...@progress.com>.
Hi,

If you're willing to play with the trunk then you can do either a proxy-based or http-centric client which will test your service 
class. Another alternative which does require a bit more work is to use Jettison api directly on the client...

Cheers, Sergey


----- Original Message ----- 
From: "Davide Mora" <da...@gmail.com>
To: <us...@cxf.apache.org>
Sent: Monday, February 16, 2009 10:21 AM
Subject: Re: JSON client?


>
>
> Hi all, anybody found a solution for this? i need to do the same...
> Thanks,
> Davide
>
>
> Bill Crook wrote:
>>
>> Hi all,
>> I've got my JSON endpoints up with CXF which is great. I now want to
>> write a java client that can hit the JSON endpoint and turn the JSON
>> response into the corresponding java objects. What is the best
>> approach for doing this? Does anyone have any experience with this?
>> Thanks for the help!
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/JSON-client--tp13960345p22034709.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>