Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

CXF client for Atom entities

$
0
0
Hi all,
I am currently trying to find the best way for implementing a RESTful
client for dealing with Atom entities (feed, entry, ...).

I've been building some examples using Webclient and I am pretty
satisfied, when using application/atom+xml:

List<Object> providers = new ArrayList<Object>();
providers.add(new AtomEntryProvider());
providers.add(new AtomFeedProvider());

WebClient client = WebClient.create(
"http://services.odata.org/v3/(S(sn4zeecdefwvblk2xxlk425x))/OData/OData.svc/Products",
providers);

Feed feed =
client.accept(MediaType.APPLICATION_ATOM_XML).get(Feed.class);

This just works, fine.

Now I'd like to be able to (de)serialize Feed (and Entry) instances via
application/json - unfortunately I could not manage to achieve this
using JacksonJaxbJsonProvider nor attempting to derive a custom provider
from Apache Wink's classes.

Any hint?

Regards.

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/

Viewing all articles
Browse latest Browse all 5648

Trending Articles