RESTLet on Android as a client let us down
After hours of debugging our code, trying to build a Document, from a DomRepresentation using RESTLet, we have found that even though it doesn't say anywhere in the documentation, a DomRepresentation isn't really supported on android. If you look at the developer wiki you get a clue: http://wiki.restlet.org/developers/172-restlet/271-restlet.html, see the bullet Throw UnsupportedOperationException in write(OutputStream) method. What this basically means is that you can build a DOM Document, but you will never be able to generate xml from it as the developers have proudly added this block of code:
@Override
+ public void write(OutputStream outputStream) throws IOException {
+ if (Edition.CURRENT == Edition.ANDROID) {
+ throw new UnsupportedOperationException(
+ "Instances of DomRepresentation cannot be written at this time.");
+ }
Thank you so much.. See the whole thing here: http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4374&dsMessageId=2375902
So basically, RESTLet is useless as a client on Android, even though what they advertise differently on their website
These problems where discovered using the 2.0 M5 release.