By mokargas on
Hey guys
Once upon a time I had this working on the same site but since updating to 5.6, calling views.getView in my flash app returns undefined/no results.
If I go to to /services/amfphp I just get the message that it's working. Also if I use the services ui to call views.getView manually it works no problem. Has anyone encountered problems with services and amfphp under 5.6? I'm using amfphp-1.9.beta.2
Here's the flash code, where in service.getView("montage", null, ["26"]), montage is my view and '26' is an arg passed to it (in this case, a tid of a category containing images).
import com.mosesSupposes.fuse.*;
import mx.utils.Delegate;
// remoting
import mx.remoting.Service;
import mx.remoting.PendingCall;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;
import mx.remoting.debug.NetDebug;
// expose debugging info to clientside "NetConnection debugger" utility
mx.remoting.debug.NetDebug.initialize();
ZigoEngine.simpleSetup(FuseItem, Shortcuts, PennerEasing, FuseFMP);
var gatewayUrl:String = "http://dru56/services/amfphp"
NetDebug.initialize();
var container_mc:MovieClip;
var ret:Object;
var nCount:Number;
var allShoesRet:Object;
var allShoesCount:Number;
var loader:MovieClipLoader = new MovieClipLoader();
var listener:Object = new Object();
var count = 0;
var as:Array;
var home = this;
var filepath;
var body;
var imageCount = 1; //always at least 1
var pos = 0;
//Call nike node view... parameterless...
var _service:Service = new Service(gatewayUrl, null, 'views', null , null);
as = new Array();
function getImages(){
trace("click - gettingImages");
allShoes = _service.getView("montage", null, ["26"]); //returns 'undefined'
allShoes.responder = new RelayResponder(this, "allShoesResult", "allShoesError");
}
function allShoesResult(re:ResultEvent)
{
allShoesRet = re.result;
allShoesCount = allShoesRet.length;
trace("nodes: "+allShoesCount);
for(i=0;i<allShoesCount;i++)
{
trace(allShoesRet[i].title);
trace(allShoesRet[i]['images']['_original']);
//add to array
as.push("../../"+allShoesRet[i]['images']['_original']);
}
//Get all node values
//container1_mc.loadMovie(as[0]);
startPreload(as[count]);
}
function allShoesError(fe:FaultEvent)
{
trace(fe + ' There has been an error');
}
getImages();
Comments
I've upgraded to 5.7, and
I've upgraded to 5.7, and I'm still getting undefined being returned. This is just with amfphp + services modules installed and using the example located here:
Please if anyone has a remedy for this do tell, it's driving me mad!
To update on this, I've made
To update on this, I've made a completely fresh install of 5.7 and installed the modules. Everything works on this install.
If I replace the non working install's database with the fresh one, everything works. Does anyone know why this is? There must be some variable?
Did you figure out where
Did you figure out where your error came from? I seem to have the same problem...
Sorry spoit, I could not
Sorry spoit, I could not pinpoint the problem and had to rebuild the database into the new one by hand.