Views
Replies
Total Likes
Hi Cameron,
I saw over on the JIRA site that you solved your problem. However, I wanted to ask you how you set the AMF header in the request (using RemoteObject) in the first place. I've been trying to do the same thing, but can't find a way.
UPDATE: Nevermind. I see you extended Operation and did this:
mx_internal override function invoke(msg:IMessage, token:AsyncToken=null):AsyncToken {
msg.headers["TEST"] = "THIS IS A TEST"
return super.invoke(msg, token);
}
Views
Replies
Total Likes
mmissire,
I am trying to do exactly this. I have tried to extend the Operation class but as soon as I do the call is never beeing sent. I have tried both to set an Operator on the RemoteObject and creating a separate Operator and passing in my remoteObject both ways have not worked for me.
Do you mind to show an example of the RemoteObject setup you have to get this working?
Regards,
Jonas
Views
Replies
Total Likes
Here is more or less what we did:
Extend Operation:
package myproject.remoting
{
import mx.core.mx_internal;
import mx.messaging.messages.IMessage;
import mx.rpc.AsyncToken;
import mx.rpc.remoting.RemoteObject;
import mx.rpc.remoting.mxml.Operation;
use namespace mx_internal;
public class MyOperation extends Operation
{
public function MyOperation(remoteObject:RemoteObject , name:String=null)
{
super(remoteObject, name);
}
mx_internal override function invoke(msg:IMessage, token:AsyncToken=null):AsyncToken
{
msg.headers["test"] = "test";
return super.invoke(msg, token);
}
}
}
Extend RemoteObject:
package myproject.remotingViews
Replies
Total Likes
Marc,
Thanks for your reply. I ended up rewriting our security to not rely on
header information but this will come handy for future iterations.
Regards,
Jonas
Views
Replies
Total Likes
I am trying to add AMF headers to all my RemoteObject calls, however my solution does only seem to work the first time I call the method. After that my cusomt AMF headers are gone.
I have tried to add them to the AsynchToken's message property which has a headers array on it. I have also tried to listen for the InvokeEvent on RemoteObject in order to add the headers there, but they aren't added the second time I call the method...
I am not able to figure out what the problem is...
I've tried to use the code in this thread, but it does not compile on SDK 3.5
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies