I'm just trying to set up a simple flash remoting example that returns the
work 'good' from the server.  I have a simple bit of action script (below>
that work only if its looking at localhost for the gateway.  If I direct it
to another MX server with the same CFC on it it fails.  I have read an
document that explained there was problem using the setDefaultGateway
variable but I still could not solve the problem.  

On first attempt the gateway returns a 407 error (proxy auth required).  On
second attempt it goes away for 5 minutes  and then returns with an http
failed error.

I'm open to any ideas.  I dont think its a proxy problem as the machines are
on the same network.

#include "NetServices.as"

// uncomment this line when you want to use the NetConnect debugger
#include "NetDebug.as" 

// --------------------------------------------------
// Handlers for user interaction events
// --------------------------------------------------

// This gets called when the "aaaa" button is clicked
function aaaa_Clicked ()
{
        // ... put code here
        
        // For example, you could call the "bbbb" function of "my.service"
by doing:
        // myService.bbbb(123, "abc");
}

// --------------------------------------------------
// Handlers for data coming in from server
// --------------------------------------------------

// This gets called with the results of calls to the server function "bbbb".
function bbbb_Result ( result )
{ 
        // ... put code here
        
        // For example, if the result is a RecordSet, you could display it
in a ListBox by doing:
        // myListBox.setDataProvider(result);
}

// --------------------------------------------------
// Application initialization
// --------------------------------------------------

if (inited == null)
{       
        // do this code only once
        inited = true;
        
        // set the default gateway URL (this is used only in authoring)
        var gatewayURL = "http://10.6.255.254/flashservices/gateway";;
 
//NetServices.setDefaultGatewayUrl("http://10.6.255.254/flashservices/gatewa
y");
        
        // connect to the gateway
    gateway_conn =
NetServices.createGatewayConnection("http://10.6.255.254/flashservices/gatew
ay");
        trace(_root._url);
        searchresults = _root._url;
        
        // get a reference to a service
    myService = gateway_conn.getService("com.results", this);
        
        // call method 
        myService.submit_results({yes:11,no:22,userid:33,topic:44})
}

function submit_results_result (result) {
        //send result to text box
        searchresults = result;
}

stop();

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to