Ok i'll test also the other way in my tutorial.

Emil Ong wrote:
> On Tue, Apr 15, 2008 at 12:38:27AM +0200, Riccardo Cohen wrote:
>> thanks a lot, it works all right.
> 
> Cool!
> 
>> in the Words.as file, there is also an attribute :
>>
>> public var hessianTypeName:String = "com.caucho.ria.examples.words.Word";
>>
>> Is this necessary ? and what for  ?
> 
> This is for the other direction: that is it sets the type when
> serializing from Flash/Flex.  In your case, it probably won't help, but
> we might do an equivalent on the Java side which would help you.
> 
> Best,
> Emil
> 
>> Emil Ong wrote:
>>> On Mon, Apr 14, 2008 at 02:32:21PM +0200, Riccardo Cohen wrote:
>>>> Hello
>>>> I have an object on the server : "Adluser". This object is sent to the 
>>>> client as a return value of getUser() function.
>>>>
>>>> I have an object on the flex side : "Adluser" with the same properties, 
>>>> and 
>>>> eventually some methods
>>>>
>>>> Is it possible to receive directly a flex user ? For the moment, the 
>>>> object 
>>>> received is of class Object. I cannot "cast" it into my class :
>>> Hi Riccardo,
>>>
>>> It should be doing this automatically as long as your full class name is
>>> the same on both sides.  That is, the Flash/Flex class name and package
>>> must match the Java class name and package exactly.  If that's the case
>>> and you're still having problems, please feel free to send the code and
>>> I'll take a look.
>>>
>>> Best,
>>> Emil
>>>
>>>
>>>> for each (obj in event.result)
>>>> {
>>>>   output.text+=obj.name; // this works but my object is of class Object
>>>>   var user:Adluser=Adluser(obj); // this compiles but does not work
>>>>   output.text+=user.getFullName();
>>>> }
>>>>
>>>> the output of user.getFullName() does not display anything...(the program 
>>>> seems to stop there)
>>>>
>>>> Of course I can simply use the received object, but then I have to write a 
>>>> class with static methods to work on this object instead of calling 
>>>> methods 
>>>> of the object itself.
>>>>
>>>> In the sample provided with flex hessian client, the "Words" are not 
>>>> directly used, all fields are copied from the received object.
>>>> Thanks for any info. (enclosed the Adluser flex class)
>>>>
>>>> -- 
>>>> Très cordialement,
>>>>
>>>> Riccardo Cohen
>>>> -------------------------------------------
>>>> Articque
>>>> http://www.articque.com
>>>> 149 av Général de Gaulle
>>>> 37230 Fondettes - France
>>>> tel : 02-47-49-90-49
>>>> fax : 02-47-49-91-49
>>>> package 
>>>> {
>>>>   //[RemoteClass(alias="adljavaflex.Adluser")]
>>>>   [Bindable]
>>>>   public class Adluser 
>>>>   {
>>>>     public var id:int;
>>>>     public var firstname:String;
>>>>     public var name:String;
>>>>     //public var hessianTypeName:String = "adljavaflex.Adluser";
>>>>     public function Adluser()
>>>>     {
>>>>       id=0;
>>>>       firstname="";
>>>>       name="";
>>>>       super();
>>>>     }
>>>>     //ADL
>>>>     public function getFullName():String
>>>>     {
>>>>       return(firstname+" "+name);
>>>>     }
>>>>   }
>>>> }
>>>> _______________________________________________
>>>> hessian-interest mailing list
>>>> [email protected]
>>>> http://maillist.caucho.com/mailman/listinfo/hessian-interest
>>> ============================================================
>>>
>>> Emil Ong
>>> Chief Evangelist
>>> Caucho Technology, Inc.
>>> Tel. (858) 456-0300
>>> mailto:[EMAIL PROTECTED]
>>> http://blog.caucho.com/
>>>
>>> Caucho: Reliable Open Source
>>> --> Resin: application server
>>> --> Quercus: PHP in Java
>>> --> Hessian Web Services
>>>
>>> Visit us at booth #518 at the JavaOne Conference, San Francisco, May 6-8
>>>
>>>
>>>
>>> _______________________________________________
>>> hessian-interest mailing list
>>> [email protected]
>>> http://maillist.caucho.com/mailman/listinfo/hessian-interest
>>>
>> -- 
>> Très cordialement,
>>
>> Riccardo Cohen
>> -------------------------------------------
>> Articque
>> http://www.articque.com
>> 149 av Général de Gaulle
>> 37230 Fondettes - France
>> tel : 02-47-49-90-49
>> fax : 02-47-49-91-49
>>
>>
>>
>> _______________________________________________
>> hessian-interest mailing list
>> [email protected]
>> http://maillist.caucho.com/mailman/listinfo/hessian-interest
> ============================================================
> 
> Emil Ong
> Chief Evangelist
> Caucho Technology, Inc.
> Tel. (858) 456-0300
> mailto:[EMAIL PROTECTED]
> http://blog.caucho.com/
> 
> Caucho: Reliable Open Source
> --> Resin: application server
> --> Quercus: PHP in Java
> --> Hessian Web Services
> 
> Visit us at booth #518 at the JavaOne Conference, San Francisco, May 6-8
> 
> 
> 
> _______________________________________________
> hessian-interest mailing list
> [email protected]
> http://maillist.caucho.com/mailman/listinfo/hessian-interest
> 

-- 
Très cordialement,

Riccardo Cohen
-------------------------------------------
Articque
http://www.articque.com
149 av Général de Gaulle
37230 Fondettes - France
tel : 02-47-49-90-49
fax : 02-47-49-91-49


_______________________________________________
hessian-interest mailing list
[email protected]
http://maillist.caucho.com/mailman/listinfo/hessian-interest

Reply via email to