Hi Fabio,
Thank you so much for your time & response. I really appreciate your gesture
of sending over the maven project files. I was able to build the xwiki rest
.jar & use it successfully in my project :)
"Your code is correct (except the method getPageSummary() which doesn't
exist in my generated JAXB model classes, but this could be due to the
fact that you are generating them without the simple bindings)"
I think the problem is from where you get your JAXB generated model
classes (which is not clear from the code you posted).
Anyway I tried your code and it works perfectly (modulo a renaming of
getPageSummary() to getPageSummaries())."
I generated the model classes from the .xsd file mentioned in the XWiki
Restful API tutorial at
http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-rest/src/main/r
esources/xwiki.rest.model.xsd
I've used XJC which was bundled with the JAXB 2.1 distribution. Surprisingly
despite using the .xsd that you provided in your project, the XJC still
created a very small Pages.java file. It barely had one method which was the
getPageSummary() method.
However, when I checked the Pages.class file in the jar from your project,
it contained quite a few methods (including the one that I was longing to
see). The difference in technique that I see here is that the jar was built
using mvn while my class files were created using XJC through command
prompt.
Not sure if there are version differences in any of the dependencies whilst
using the two methods. Will have to look into that.
"Since I am not able to spot the problem from your mail, I attach to
this reply the project I used to do the test. You can look at it and
find where are the differences wrt what you wrote. You could also use
it as a template for writing JAXB-clients for the XWiki RESTful API.
Hope this help.
-Fabio"
It is help that arrived just in time Fabio. We have an internal
trouble-ticketing application. The XWiki instance is projected to be our
knowledge base & went live just today. We wanted our application to extract
tags & pass on to XWiki which in turn would return trouble-shooting
articles. Probably, once the search feature is successful, we would like to
be able to "push" new articles/pages to XWiki from our internal application
at the click of a button.
Your work is a great starting point. This will give XWiki a lot more
portability in today's times when applications "interacting" with each
other
is becoming a must.
Thanks Fabio...