Hi, all I need to get content from a xwiki page, this i make in java with xml rpc but the problem is that i can't specify in which language i want the page. My code : stringBuffer.append("<br/><a href='http://cda-pc:8080/xwiki/bin/view/Main/Incendie?language=" + locale + "' target='dynamic'>" + localize(KEY_INSTRUCTIONS, locale) + "</a><br/><br/>"); final String token = (String) client.execute("confluence1.login", new Object[] { "cda", "cda" }); final Map page = (Map) client.execute("confluence1.getPage", new Object[] { token, "Main", "Incendie" }); final String pageId = (String) page.get("id"); final String content = (String) page.get("content"); stringBuffer.append((String) client.execute("confluence1.renderContent", new Object[] { token,"Main", pageId, content })); I tried final Map page = (Map) client.execute("confluence1.getPage", new Object[] { token, "Main", "Incendie?language=fr" }); but doesn't work Hope you can help me thx DALL'AGNOLA Cédric Créez votre adresse électronique pré[email protected] 1 Go d'espace de stockage, anti-spam et anti-virus intégrés.
On 18 juin 08, at 13:56, ced.dall wrote:
I tried final Map page = (Map) client.execute("confluence1.getPage", new Object[] { token, "Main", "Incendie?language=fr" }); but doesn't work
Maybe the problem is how you specify the page ID: Try this instead: Map page = (Map) client.execute("confluence1.getPage", new Object[] { token, "Main.Incendie?language=fr" }); or, better, use directly the getPage(pageId, language) method in the XMLRPC client library (that provides a wrapper for all the XMLRPC API so that you don't have to do those ugly invokes in your code). Does this solve your issue? Cheers, Fabio
participants (2)
-
ced.dall -
Fabio Mancinelli