On Mon, Jun 13, 2011 at 2:51 PM, Sergiu Dumitriu <sergiu(a)xwiki.com> wrote:
On 06/12/2011 10:05 PM, Chamika Weerasinghe 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/BlogIntroduc…
is different from
JSON content
http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Blog/pages/BlogIntroduc…
This is wrong. The two formats should contain exactly the same
information. This looks like a bug in the restlet framework we're using.
Jerome already started working on the migration to restlet 2.0, let's
see if it solves the problem. You can try to pull from this branch to
test it locally:
https://github.com/jvelo/xwiki-platform/tree/restlet-upgrade
Not sure if it would solve the problem, but we could try using Jackson
(
http://jackson.codehaus.org/) for JSON serializing/unserializing
Plugging Jackson with our Restlet implementation should be fairly easy.
Jerome
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".
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?
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs