BlazeDS の AMFConnection クラスを使用して pyamf に接続しようとしていますが、AMFConnection.call() を呼び出すと、HTTP ステータス 400 (Bad Request - 「リクエスト ボディを正常にデコードできませんでした。」) が返されます。私は多かれ少なかれこの例に従っています: (pyamf.org/wiki/ClientHowTo ... 申し訳ありませんが、私は新しいユーザーなので、ハイパーリンクを使用できないと思います。あなたはそれらをフォローしたい)
これが私のコードです:
package amfconnectiontest;
import flex.messaging.io.amf.client.AMFConnection;
import flex.messaging.io.amf.client.exceptions.*;
public class Main {
public static void main(String[] args) {
AMFConnection amfConnection = new AMFConnection();
String url = "http://demo.pyamf.org/gateway/recordset";
String service = "service.getLanguages";
try
{
amfConnection.connect(url);
}
catch (ClientStatusException cse)
{
System.out.println(cse);
return;
}
// Make a remoting call and retrieve the result.
try
{
Object result = amfConnection.call(service);
System.out.println("results: " + result.toString());
}
catch (ClientStatusException cse)
{
System.out.println(cse);
}
catch (ServerStatusException sse)
{
System.out.println(sse);
}
// Close the connection.
amfConnection.close();
}
}
何か案は?