0
votes

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.

2
Try posting this on the WebORB Forum. tech.groups.yahoo.com/group/flashorb .JeffryHouser

2 Answers

0
votes

The badversion error often is the result of the web server showing an error when doing the remote call instead of throwing the exception amf-style. Since the amf client can not parse the response you get that error message.

2
votes

Are you using an 'https' uri and building your remoteObject's channelSet with an AMFChannel instead of a SecureAMFChannel?

This kind of generic error could mean anything and is more likely tied to IIS being so awesome. Though the problem could have something to do with the way you're calling the remote Operation...

If you have abstracted your remote services into one magical class, post some of that code and I may have some suggestions for you.... or I may not... 'on sait jamais'

Talk to you soon, Jeremy