Hi,
On Fri, May 13, 2011 at 3:40 AM, Uday Ghattamaneni
<ghattamaneni.uday(a)gmail.com> wrote:
Hello,
I am working on developing RPC client for Xwiki3.0 and got the below
exception
Failed to invoke method getObject in class
com.xpn.xwiki.xmlrpc.XWikiXmlRpcApiImpl: [Page 'UserSpace.UserTestPage'
cannot be accessed]
I got the error when I am trying to retrieve objects as mentioned in the
code below. My main problem is the code is working fine with some pages, I
am getting actual values for some pages, but some pages return the above
error message, I checked the privileges for those two pages, they are all
same for the working one and for the page which I am getting this error.
.
..
...
XWikiXmlRpcClient rpc = new XWikiXmlRpcClient(url);
rpc.login(username, password);
XWikiObjectSummary xosum = new XWikiObjectSummary();
xosum.setClassName("XWiki.XWikiRights");
xosum.setPageId(page.getId());
XWikiObject xwo = *rpc.getObject(xosum);*
......
My guess is that you have multiple XWiki.XWikiRights objects in that
page and if you don't specify the object id the server is not able to
understand which one you are referring to.
Try to do a rpc.getObjects(page.getId()) to see is there are
differences between the two pages in term of objects.
Also, I am having problems with the RPC client functionality I tried
using Apache XML-RPC Client ,Client-side Proxy for Java and also native
Swizzle API for RPC , all of them provide limited functions where all the
functions listed in Remote API
specifications<http://confluence.atlassian.com/display/CONFDEV/Remote+AP…
not supported by any of these mainly some of such functions which I
tried to implement is getPagePermissions(String token, String pageId) , I
got an exception *org.codehaus.swizzle.confluence.ConfluenceException: No
such handler: confluence1.getPagePermissions* while I tried to use Apache
XML-RPC Client , I don't have any issue with some of the functions like
getPages() etc. Is there any specific way where we could make all the
functions listed in the Remote API
specifications<http://confluence.atlassian.com/display/CONFDEV/Remote+AP…
as specified, if any one could send me a sample working program or any
document related would be helpful.
The XWiki XMLRPC API is compatible with the Conflucence API
as-much-as-possible because there are some mismatches about how things
are handled.
Rights management falls into the category of things that don't match :)
To see the methods that are common to the two API you should consider
the intersection between the confluence specification and
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwi…
Anyway I would suggest that you use the RESTful API
(
http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI)
because the XMLRPC API is limited and has not evolved since longtime.
-Fabio
Thanks in advance,
Uday
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs