Hi all,
i'm trying to create a Java XML-RPC Client of my Xwiki instance (for
now i'm using xwikie1_6m2)
Documentation used :
- Xwiki XML/RPC doc :
http://platform.xwiki.org/xwiki/bin/view/Features/XMLRPC
- Confluence API Specification :
http://confluence.atlassian.com/display/DOC/Remote+API+Specification
I success with this methods : confluence1.login, confluence1.logout,
confluence1.getPage, confluence1.storePage, confluence1.renderContent
but i got a problem with this one : confluence1.search
Confluence API talk about two ways to use search :
1) Vector search(String token, String query, int maxResults) - return
a list of SearchResults which match a given search query (including
pages and other content types). This is the same as a performing a
parameterised search (see below) with an empty parameter map.
2) Vector search(String token, String query, Map parameters, int
maxResults) - (since 1.3) like the previous search, but you can
optionally limit your search by adding parameters to the parameter
map. If you do not include a parameter, the default is used instead.
The second way (with parameters) is not implemented on Xwiki (cf.
http://jira.xwiki.org/jira/browse/XWIKI-1559 )
So how must we use the first search method (without Map parameters) ?
I'm trying this :
Vector searchResult = (Vector) client.execute("confluence1.search",
new Object[] { p_token, p_query,new Integer(p_maxResults) });
This code return a "ClassCastException" : it's like the returned
object were not a "Vector".. If then what is it ?
Could you help me ?
It's a great feature !
Regards
Brice Vandeputte