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