[xwiki-users] XWiki XmlRpc help requested
Hello friends, I need a little help here with the XWiki XmlRpc API. I am able to connect to my xwiki instance using the Swizzle Confluence. However, I am currently able to only view contents of a particular page which I supply to the getPage() method. I would like to build a client which could fetch a list of pages based on hql queries (which XWiki supports internally). Could someone please guide me to a search method that could be used here (eg. search(query, maxinterval) ). I've tried pushing queries such as search("where doc.creator='XWiki.Admin", 10) but this results into an empty result list. It was mentioned on the http://platform.xwiki.org/xwiki/bin/view/Features/XMLRPC that XWiki implements the most important part of the Confluence <http://confluence.atlassian.com/display/DOC/Remote+API+Specification> XML-RPC API including Pages: retrieval, rendering, creation, history, update, search and removal. Could someone please please guide me as to what I might be doing wrong here. As always, any help would be much appreciated. import org.codehaus.swizzle.confluence.SpaceSummary; import org.codehaus.swizzle.confluence.Confluence; import java.util.HashMap; import java.util.List; import java.util.Vector; public class ConfluenceExample { public static void main(String[] args) throws Exception { String username = "Admin"; String password = "admin"; String endpoint = "http://127.0.0.1:8080/xwiki/xmlrpc/confluence"; Confluence confluence = new Confluence(endpoint); confluence.login(username, password); String sql = "where doc.creator='XWiki.Admin'"; List searches = confluence.search(sql, 10); System.out.println(searches.size()); } } Regards, Dilipkumar Jadhav
On Oct 29, 2009, at 4:16 AM, Dilipkumar Jadhav wrote:
Hello friends,
I need a little help here with the XWiki XmlRpc API. I am able to connect to my xwiki instance using the Swizzle Confluence.
However, I am currently able to only view contents of a particular page which I supply to the getPage() method.
I would like to build a client which could fetch a list of pages based on hql queries (which XWiki supports internally).
Could someone please guide me to a search method that could be used here (eg. search(query, maxinterval) ).
I've tried pushing queries such as search("where doc.creator='XWiki.Admin", 10) but this results into an empty result list.
The semantics of the "query" parameter of the search method is just a free text that is matched agains document names or content. You cannot execute arbitrary HQL queries using the search method, nor there exist a method for doing so in the current XMLRPC api. -Fabio
participants (2)
-
Dilipkumar Jadhav -
Fabio Mancinelli