ブログにテスト投稿を作成するためにwordpress-java(http://code.google.com/p/wordpress-java/)を使用していますが、例外が発生します。
redstone.xmlrpc.XmlRpcException: The response could not be parsed.
at redstone.xmlrpc.XmlRpcClient.handleResponse(Unknown Source)
at redstone.xmlrpc.XmlRpcClient.endCall(Unknown Source)
at redstone.xmlrpc.XmlRpcClient.invoke(Unknown Source)
at redstone.xmlrpc.XmlRpcProxy.invoke(Unknown Source)
at net.bican.wordpress.$Proxy1.newPost(Unknown Source)
at net.bican.wordpress.Wordpress.newPost(Wordpress.java:606)
at Ienmx.<init>(Ienmx.java:39)
at Pulso.obtenerMinutoAMinuto(Pulso.java:68)
at principal$1.run(principal.java:24)
at java.util.TimerThread.mainLoop(Timer.java:534)
at java.util.TimerThread.run(Timer.java:484)
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://pulso.wpengine.com/xmlrpc.php
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1403)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
... 11 more
これは私のコードです:
this.w = new Wordpress(usuario, password, xmlUrl);
Page p = new Page();
p.setTitle("Se crea el objeto en el script");
p.setDescription("Este es el cuerpo del post");
try{
w.newPost(p, true);
}catch(Exception e){
e.printStackTrace();
System.out.println(e.getMessage());
}
URLに移動すると、URLには従来のメッセージが表示されます。
XML-RPCサーバーはPOST要求のみを受け入れます。
何が悪いのかわからない:(
ありがとう :)