PDA

View Full Version : remoting error?


finnstones
09-05-2003, 02:36 PM
NetServices info 1: getFunc_Result was received from server: [object Object]

anyone know why this would happen with the below code?

#include "NetServices.as"
#include "NetDebug.as"
#include "DataGlue.as"
changeShipMethod = function () {

_global.myOrderID = new Array();
_global.shipMethod ="02";

init = function () {
if (this.inited != undefined) {
return;
} else {
this.inited = true;
//
// connect to the Flash Remoting service provider
// NOTE: change the URL to match that of your ColdFusion MX server
// NOTE2: if you are calling the webservice from the same domain your
// swf file is called from, you don't need to declare the SetDefaultGatewayURL
//
NetServices.setDefaultGatewayUrl("http://localhost:8500/flashservices/gateway");
gatewayConnnection = NetServices.createGatewayConnection();
myService = gatewayConnnection.getService("petmarket.api.upsrate", this);
myService.getFunc(shipMethod);
dataForServer = new Object();
trace("REMOTING INITIALIZED");

}
}

//
// :::: FLASH REMOTING: Server Functions Initializer ::::
//
//
// Retrieve the Func List from the server

// Handle the Function List when returned from the server
function getFunc_Result(result)
{
item=result.items[0];

myOrderID.push(item.TotalCharges);

trace(myOrderID);

}


this.init();

}
this.changeShipMethod ();