Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

RemoteObject with a non AMF protocol

Avatar

Level 1
Hi !



I am trying to use RemoteObject with a non AMF protocol.

This is a section of my services.xml that is added to the
compiler command line



<channel-definition id="core-services"
class="ro.huddle.rpc.hessian.HessianChannel">

<endpoint uri="
http://devserver:8080/spring-hessian/remoting/Services"
/>

</channel-definition>



here is how I use it:

service = new RemoteObject("coreServices");

service.concurrency = "multiple";

var t:AsyncToken = service.login("user","pass");

...

My problem is that only the first call works as it should,
all the other calls don't even get to the server, the internalSend
from the HessianChannel class doesn't get called except for the
first time.



Anyone can help me with some documentation on how
RemoteObject works ? The Flex2 help is very shallow on how the
remoting mechanism works.



Thanks.
4 Replies

Avatar

Former Community Member
Does your HessianChannel subclass another Channel
implementation?

Avatar

Level 1
Yes, it subclasses Channel, but I also tried with
HTTPChannel, unfortunately I couldn't override the AFMXDecode and
Encode to adapt it ... if I could that would've solved all the
troubles

Avatar

Former Community Member
RemoteObject on the client doesn't do a whole lot, I would
suspect that it's

your custom Channel does not set the right flags to make the
ChannelSet think

that it successfully connected on the first request?



Can you add an event listener to your RemoteObject's
ChannelSet (accessible

via its channelSet property) and listen for channelFault
events?





Avatar

Level 1
Hi

I've added a TraceTarget to the main MXML this is what I get

'core-services' channel endpoint set to
http://pc3:8080/remoting/Services

'8F17263B-CDAB-BCAB-0634-B93F8D347453' producer set
destination to 'core-services'.

'8F17263B-CDAB-BCAB-0634-B93F8D347453' producer sending
message 'D2B42D6E-4D55-37AF-ED77-B93F8D34C30B'

'core-services' channel is connected.

'core-services' channel sending message:

(mx.messaging.messages::RemotingMessage)#0

body = (Array)#1

[0] "user"

[1] "pass"

clientId = (null)

destination = "core-services"

headers = (Object)#2

messageId = "D2B42D6E-4D55-37AF-ED77-B93F8D34C30B"

operation = "login"

source = (null)

timestamp = 0

timeToLive = 0

'8F17263B-CDAB-BCAB-0634-B93F8D347453' producer connected.

'8F17263B-CDAB-BCAB-0634-B93F8D347453' producer acknowledge
of 'D2B42D6E-4D55-37AF-ED77-B93F8D34C30B'.

---- This is end of the first call on the service ----

--- and this is a trace after I push a button for another
call ---

'8F17263B-CDAB-BCAB-0634-B93F8D347453' producer sending
message 'C3961123-04D1-8A2A-5C6D-B93FEFFFD51E'

--- And nothing after this ----



the ChannelFaultEvent.FAULT .. event on ChannelSet is never
fired



Thanks