次のコードを使用して合流ページを更新しています。
public void publish() throws IOException {
XWikiXmlRpcClient rpc = new XWikiXmlRpcClient(CONFLUENCE_URI);
try {
rpc.login(USER_NAME, PASSWORD);
//The info macro would get rendered an info box in the Page
Page page = new Page();
page.setSpace("ATF");
page.setTitle("New Page");
page.setContent("New Page Created \\\\ {{info}}This is XMLRPC Test{{/info}}");
page.setParentId("demo UTF Home");
rpc.storePage(page);
} catch (XmlRpcException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
プログラムを実行しようとすると、次の例外が発生します。
org.apache.xmlrpc.client.XmlRpcClientException: Failed to parse server's response: Expected methodResponse element, got html
これは、この JIRA による Apache xml-rpc クライアントのバグのようです: https://issues.apache.org/jira/browse/XMLRPC-159
ライブラリの 3.1.2 で修正されたと言われていますが、私は 3.1.3 を使用しています。
これを前に見た人はいますか?