I see from the 2011 surveys that a good part of the community is consuming REST services. I was wondering what are you using to consume those? Right now, I'm playing with ERXRestClient and JBoss' RestEasy to consume REST services, but I'm curious to see what other people use. Just plain Jakarta HTTPClient with a JSON or XML parser?
--
Pascal Robert
pro...@macti.ca
WOWODC 2011 : July 1-2-3, Montreal. wowodc.com
AIM/iChat : MacTICanada
LinkedIn : http://www.linkedin.com/in/macti
Twitter : pascal_robert
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobje...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects-dev-garchive-31333%40googlegroups.com
This email sent to webobjects-dev...@googlegroups.com
We have been using Jersey [1] to produce and consume REST services. We found Jersey the most concise and simple REST implementation. It also offers a good set of tools to test production and consumption of REST services, which is essential in our development process.
Cheers,
Henrique
On 18/05/2011, at 10:05, Pascal Robert wrote:
> Good morning,
>
> I see from the 2011 surveys that a good part of the community is consuming REST services. I was wondering what are you using to consume those? Right now, I'm playing with ERXRestClient and JBoss' RestEasy to consume REST services, but I'm curious to see what other people use. Just plain Jakarta HTTPClient with a JSON or XML parser?
>
>
> --
> Pascal Robert
> pro...@macti.ca
>
> WOWODC 2011 : July 1-2-3, Montreal. wowodc.com
>
> AIM/iChat : MacTICanada
> LinkedIn : http://www.linkedin.com/in/macti
> Twitter : pascal_robert
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (Webobje...@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/hprange%40gmail.com
>
> This email sent to hpr...@gmail.com
On May 18, 2011, at 9:05 AM, Pascal Robert wrote:
> Good morning,
>
> I see from the 2011 surveys that a good part of the community is consuming REST services. I was wondering what are you using to consume those? Right now, I'm playing with ERXRestClient and JBoss' RestEasy to consume REST services, but I'm curious to see what other people use. Just plain Jakarta HTTPClient with a JSON or XML parser?
>
>
> --
> Pascal Robert
> pro...@macti.ca
>
> WOWODC 2011 : July 1-2-3, Montreal. wowodc.com
>
> AIM/iChat : MacTICanada
> LinkedIn : http://www.linkedin.com/in/macti
> Twitter : pascal_robert
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (Webobje...@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/kelleherk%40gmail.com
>
> This email sent to kell...@gmail.com
Just to summarize the simplicity of Jersey client. Here is a sample code of how to do a GET on the resource identified by 10.
Client client = Client.create();
WebResource resource = client.resource( "http://localhost/my-service" );
MyResource response = resource.path("resource").path(10).type(MediaType.APPLICATION_JSON).get(MyResource.class);
Cheers,
Henrique
Pascal,
Just to summarize the simplicity of Jersey client. Here is a sample code of how to do a GET on the resource identified by 10.
Client client = Client.create();
WebResource resource = client.resource( "http://localhost/my-service" );
MyResource response = resource.path("resource").path(10).type(MediaType.APPLICATION_JSON).get(MyResource.class);
ERXRestClient was just a proof of concept ... There's really no reason you couldn't just extend the APi to always use ERXKeyFilter.filterWithAllRecursive() and make a default rest delegate that just makes new instances of classes for you. That said, I think RestEasy and Jersey both do a better job on the client side for things like modeling cookie, header, and form parameters. All would be pretty easy to put into ERXRestClient, though -- we certainly have all the primitives to do it.
it's not really an issue of parsing, it's an issue of mapping that parsed structure onto classes ... i don't know where that lives. seems easier to just add whatever's missing into ERXRestClient, or look into adding custom serializers/deserializers into resteasy. or even better, if you're sending JSON, why do you even care that it's an NSArray? it should just turn into a List on the client ...
Hi Pascal,
Java (SAX), consuming XML
Flex and AIR, consuming XML and JSON
--
Matt.