クライアントとしてFlexを使用し、サーバーとしてJavaを使用しています。リモートホストでのWebOrbの使用。時々私はこのエラーを受け取ります。
faultCode:Client.Error.MessageSend
faultString:'送信に失敗しました'
faultDetail:'Channel.Connect.Failed error NetConnection.Call.BadVersion::
url:' http://foo.com:5480/bar/weborb.wo''
なぜこれが来るのかわかりません。私はそれをグーグルで検索しましたが、答えが見つかりませんでした。フォールトハンドラーで処理すれば、すべて正常に動作します。しかし、なぜこれが来るのか知りたいです。このエラーを回避するにはどうすればよいですか。
どんな助けでも大歓迎です。
返信ありがとうございます。
これが私の抽象化されたコードです
public class FOOProxy implements IFOOProxy
{
public static var FOO_PROXY:IFOOProxy;
private var remote:RemoteObject;
public function FOOProxy()
{
}
public function runCommand(request:IClientRequest):void
{
remote.addEventListener("result", onResult);
remote.addEventListener("fault", onFault);
if(request is GeneralRequest)
{
var req:Request = request as CmdRequest ;
if (req.requestType == fooController.UPDATE_REQUEST)
{
remote.requestTimeout=null;
}else
{
remote.requestTimeout = 30;
}
}
remote.runCommand(request);
}
public function onResult(event:ResultEvent):void {
var result:Object = (event as ResultEvent).result as Object ;
/*
Updating my result using callback.
*/
CursorManager.removeBusyCursor();
}
public function onFault(event:FaultEvent):void {
if(event.fault.faultCode=="Client.Error.MessageSend")
{
//This is where "NetConnection.call.badversion occurs"
}
else if(event.fault.faultCode=="Server Exception")
// Server Exception Handling
{
//Dispatch Something
}
}
public static function createProxy(callback:ICallback):IFOOProxy {
if (FOO_PROXY != null) {
FOO_PROXY.setCallback(callback);
return FOO_PROXY;
}
var iProxy:IFOOProxy = new FOOProxy();
var proxy:FOOProxy = iProxy as FOOProxy;
//setting my callback here to update
proxy.remote = new RemoteObject();
proxy.remote.destination = "Rpc";
return proxy;
}
}
これは、サーバーと接続する場所です-:宛先ID「Rpc」
https、ポート番号5480を使用しており、remote-config.xmlのチャネルとしてsecure-amfを使用しています
前もって感謝します。