[flexcoders] Sending data to the Server

2008-05-09 Thread netdeep
I need to send data to the server.  Up til now I've been using messaging.  But 
as far as I can 
tell, I can only send strings this way.

What other alternatives are there?  For instance, I would like to be able to 
send an array or a 
custom data structure.  I'm using Java for the backend.  Ideally I would not 
want to launch a 
new RemoteObject for each send from Flex, but instead have a persistent 
listener to hear all 
requests (which is why I initially chose messaging and created a channel for 
the java message 
manager to listen to).



RE: [flexcoders] Sending data to the Server

2008-05-09 Thread Seth Hodgson
You can send any type of data as the body of a message. If you want to send an 
instance of a typed class, be sure to include 
[RemoteClass(alias=your.java.Class)] metadata in your ActionScript class so 
that the Player serializes it with type info and the server can deserialize it 
to your desired type.

Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of netdeep
Sent: Friday, May 09, 2008 7:21 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Sending data to the Server

I need to send data to the server. Up til now I've been using messaging. But as 
far as I can 
tell, I can only send strings this way.

What other alternatives are there? For instance, I would like to be able to 
send an array or a 
custom data structure. I'm using Java for the backend. Ideally I would not want 
to launch a 
new RemoteObject for each send from Flex, but instead have a persistent 
listener to hear all 
requests (which is why I initially chose messaging and created a channel for 
the java message 
manager to listen to).