I am using Flex as my client and Java as my server. Using WebOrb in remote host. At times I recieve this error.
faultCode:Client.Error.MessageSend
faultString:'Send failed'
faultDetail:'Channel.Connect.Failed error NetConnection.Call.BadVersion: :
url: 'http://foo.com:5480/bar/weborb.wo''
I don't know why this comes. I googled for it and found no answer. Everything works fine if I handle it in fault handler. But I want to know why this comes. What should I do to avoid this error.
Any help would be greatly appreciated.
Thanks for the response..
Here is my abstracted code
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;
}
}
This is where it connects with server-: Destination id "Rpc"
I am using https, port number 5480 and using secure-amf as channel in remote -config.xml
Thanks in advance.