服务器请求xmlrpc上的错误403

时间:2012-07-16 17:16:59

标签: java wordpress xml-rpc

我正在使用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());
}

如果你去网址,网址会显示经典信息:

  

XML-RPC服务器仅接受POST请求。

我不知道什么是错的:(

谢谢:)

0 个答案:

没有答案
相关问题