On Sun, Jun 12, 2011 at 22:05, Chamika Weerasinghe <[email protected]> wrote: > Hi, > > For now I added Wiki and Space and the Search access in xwiki-android-rest > via handling JSON objects. > I commited new files to repo. > > When I implementing access to Page resources I found that Xwiki REST sends > different contents in XML and JSON > For example > XML content > http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Blog/pages/BlogIntroduction?media=xml > is different from > JSON content > http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Blog/pages/BlogIntroduction?media=json > > Because of this difference I decided to deserialize XML instead of JSON. (I > must modify all the class files for this). > > XWiki RESTful API doc ( > http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI) describes > XML -> Java conversion by using "org.apache.commons.httpclient".
No it's not, "org.apache.commons.httpclient" is just taking care of HTTP protocol and the example is using JAXB to do XML <-> Java which is included in Java 6 but not in Dalvik. That's why you have the following error. > But this library seems to be larger in size. As Thomas said size does matter > in Android. Therefore I decided to use "org.apache.http" which built in > Android. > > But I got following error > > 06-12 20:02:55.070: WARN/dalvikvm(650): VFY: unable to resolve static method > 1169: Ljavax/xml/bind/JAXBContext;.newInstance > (Ljava/lang/String;)Ljavax/xml/bind/JAXBContext; > > Can anybody suggest me what causes this error? As far as I remember I already taold yoiu several time that we are using JAXB to do XML serialization and that JAXB is not included into Android (yet I hope since it's starting to be pretty sandard). You should be able to do that using Restlet android library but problem is that Restlet android lib is pretty bug so using Gson sounded like a good idea. Maybe the problem you have with Json would be fixed by an upgrade of Restlet verison used by XWiki which is in progress. > > > Best Regards, > Chamika Weerasinghe > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs > -- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

