I've tried it with and without that.  As of now, my client side VO
looks like this:

package net.imageplant.mediamanager.services
{
        [RemoteClass(alias="net.imageplant.ClientInfo")]
        public class ClientInfo
        {
                private var _nClientId:uint;
            private var _strName:String;
            private var _strDomain:String;
            private var _strStyle:String;
            private var _strLogo:String;
            private var _errorObj:ErrorObject;
    
                public function ClientInfo()
                {
                        
                }
                
                public function get id():uint
                {
                        return _nClientId;
                }
                
                public function set id(nClientId:uint):void
                {
                        _nClientId = nClientId;
                }
                
                public function get name():String
                {
                        return _strName;
                }
                
                public function set name(strName:String):void
                {
                        _strName = strName;
                }
                
                public function get domain():String
                {
                        return _strDomain;
                }
                
                public function set domain(strDomain:String):void
                {
                        _strDomain = strDomain;
                }
                
                public function get style():String
                {
                        return _strStyle;
                }
                
                public function set style(strStyle:String):void
                {
                        _strStyle = strStyle;
                }
                
                public function get logo():String
                {
                        return _strLogo;
                }
                
                public function set logo(strLogo:String):void
                {
                        _strLogo = strLogo;
                }
                
                public function get error():ErrorObject
                {
                        return _errorObj;
                }
                
                public function set error(errorObj:ErrorObject):void
                {
                        _errorObj = new ErrorObject();
                        _errorObj = errorObj;
                }
        }
}

Is it better to have getter/setter methods, or should all the
properties just be public?  Does it matter?  I'm pretty sure I've
tried both ways with no success...



--- In [email protected], "Jim Hayes" <[EMAIL PROTECTED]> wrote:
>
> Do you have the RemoteClass tag on your flex VO class ? That's what I
> needed to fix that problem (it was flourine remoting, I'm guessing the
> webservice needs the same)
>  
> [RemoteClass(alias="com.yourdomain.vo.YourServerVO")]
> Public class YourFlexVO
> {
>  
> hth
>  
> Jim.
>  
>  
>  
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of mrand02
> Sent: 05 October 2007 14:49
> To: [email protected]
> Subject: [flexcoders] VO from WebService not being translated?
>  
> I have a .NET web service that sends a VO back as a result for one of
> its methods. The VO has 5 properties (4 strings, 1 uint), and one
> property that is another VO that contains 2 strings. Looks like this:
> 
> ClientInfo
> uint
> string1
> string2
> string3
> string4
> ErrorObject
> string1
> string2
> 
> This information gets returned to my Flex app no problem, but when I
> try to cast it to my client side ClientInfo object, it comes back as
> null or errors out. I'm trying like this inside my event handler:
> 
> var clientInfo:ClientInfo = evt.result as ClientInfo;
> 
> after this line, clientInfo is set to null. The object has the exact
> properties that it should, so what gives? I'm new to Flex, so I'm not
> sure if I'm expecting too much, I just kinda figured this would work...
>  
> 
> ______________________________________________________________________
> This communication is from Primal Pictures Ltd., a company
registered in England and Wales with registration No. 02622298 and
registered office: 4th Floor, Tennyson House, 159-165 Great Portland
Street, London, W1W 5PA, UK. VAT registration No. 648874577.
> 
> This e-mail is confidential and may be privileged. It may be read,
copied and used only by the intended recipient. If you have received
it in error, please contact the sender immediately by return e-mail or
by telephoning +44(0)20 7637 1010. Please then delete the e-mail and
do not disclose its contents to any person.
> This email has been scanned for Primal Pictures by the MessageLabs
Email Security System.
> ______________________________________________________________________
>


Reply via email to