You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by co...@cristallium.com on 2022/03/29 19:03:59 UTC

RemoteObject AMF issue

Hi Guys,

I have issue with RemoteObject AMF since sdk 0.9.9

I'm completely lost on now how to use RemoteObject

I had open a ticket on it some time ago : 
https://github.com/apache/royale-asjs/issues/1174


now I 'm trying sdk 0.9.10, but the issue is not the same :

[AMFBinaryData.readObject] - Deserialization Error :AMF0 support is 
unimplemented by default, supported via bead

But I'm not using AMF0....


Is there an exemple on how to use RemoteObject in pure as3 (no mxml) ?

I'm using there imports :

  import mx.rpc.AsyncToken;
  import mx.rpc.Responder;
  import mx.rpc.events.FaultEvent;
  import mx.rpc.events.ResultEvent;
  import mx.rpc.remoting.RemoteObject;

Are the right ones ? Or must I use anothers include like import 
org.apache.royale.net.RemoteObject ? (but this one has no 'source' 
property !)

My code is something like this :

_ro = new RemoteObject();
_ro.source = "aadmin";
_ro.addEventListener(FaultEvent.FAULT,onFaultEvent);
_ro.endpoint = _gatewayURL;
_ro.destination = "amfphp";

  public function callService(name:String, listener:Function, 
args:Object):void
{
var pos:int =  name.indexOf(".");
if (pos == -1) return;
var ops:Array = name.split(".");
var r:Responder = new Responder(listener, onFaultEvent);
_ro.source = ops[0];
var t:AsyncToken = _ro.getOperation(ops[1]).send(args);
t.addResponder(r);
}


Any help would be greatly apprecied

Regards

Re: RemoteObject AMF issue

Posted by co...@cristallium.com.
Hi,

I answer myself my question as I find the solution to this issue.

I beleve that from sdk 0.9.9 RemoteObject have been modified and removed 
AMF0 support to add it in a bed.

Adding this to main app solve the issue :

<j:beads>
    <js:AMF0SupportBead/>
</j:beads>

Now, I don't know why (I didn't dig), I think that AMFPHP from silexlabs 
out of the box send AMF0 response. This is another story..

Regards



Le 2022-03-29 21:03, contact@cristallium.com a écrit :

> Hi Guys,
> 
> I have issue with RemoteObject AMF since sdk 0.9.9
> 
> I'm completely lost on now how to use RemoteObject
> 
> I had open a ticket on it some time ago : 
> https://github.com/apache/royale-asjs/issues/1174
> 
> now I 'm trying sdk 0.9.10, but the issue is not the same :
> 
> [AMFBinaryData.readObject] - Deserialization Error :AMF0 support is 
> unimplemented by default, supported via bead
> 
> But I'm not using AMF0....
> 
> Is there an exemple on how to use RemoteObject in pure as3 (no mxml) ?
> 
> I'm using there imports :
> 
> import mx.rpc.AsyncToken;
> import mx.rpc.Responder;
> import mx.rpc.events.FaultEvent;
> import mx.rpc.events.ResultEvent;
> import mx.rpc.remoting.RemoteObject;
> 
> Are the right ones ? Or must I use anothers include like import 
> org.apache.royale.net.RemoteObject ? (but this one has no 'source' 
> property !)
> 
> My code is something like this :
> 
> _ro = new RemoteObject();
> _ro.source = "aadmin";
> _ro.addEventListener(FaultEvent.FAULT,onFaultEvent);
> _ro.endpoint = _gatewayURL;
> _ro.destination = "amfphp";
> 
> public function callService(name:String, listener:Function, 
> args:Object):void
> {
> var pos:int =  name.indexOf(".");
> if (pos == -1) return;
> var ops:Array = name.split(".");
> var r:Responder = new Responder(listener, onFaultEvent);
> _ro.source = ops[0];
> var t:AsyncToken = _ro.getOperation(ops[1]).send(args);
> t.addResponder(r);
> }
> 
> Any help would be greatly apprecied
> 
> Regards