Goodreads Developers discussion

23 views
questions > XML Schema or Java Wrapper

Comments Showing 1-2 of 2 (2 new)    post a comment »
dateUp arrow    newest »

message 1: by Timo (new)

Timo Janssen | 2 comments Hi everyon.

I am currently trying to build a private application that uses the Goodreads API and writing it in Java.
I am using JAXB to map the XML responses to Java Objects. But this is really tedious becouse I have to look at the sample responses for each of the api methods I intend to use and djust my Java classes.
Therefore it would really help if there is a XML Scheama for the whole api or a Schema for each api method. There are tools that can generate Classes from schema descriptions.
I haven't found a Schema and currently assume there is no Schema but I coould be wrong. If I am wrong, could someone point to where I can find it.

Another option I could take is, is using a wrapper / library implementing access to the Goodreads API for Java.
If There is a library up to date, could someone point me to it.

Thanks!


message 2: by Jeremiah (new)

Jeremiah Adamson | 3 comments Hey Timo,
I searched for a good API Wrapper library written in java but couldn't find any I actually understand. So I decided to write my own. It is slowly growing, but it is for a few calls my application needs. I'd be happy to share it with you, you could modify it to suit your need. I kept it really simple.

JAXB really gave me issues when converting the XML to POJOs, so I decided on another approach. I read the entire XML as a String and parsed it. I used JDOM to get to the specific tags, realizing that more than half of the XML response was not even important to my application. This allowed me to form my POJOs by myself from the XML response.. A bit manual and hacky, but it worked. Enjoy!


back to top