I turned on remote object debugging, but it seems to make my
flexbuilder unresponsive. After a while, builder says that I should
abort the script or it will make my machine lock up. If I set remote
object debug to false and restart the server, this no longer happens.

But I think I found the issue anyway; it seems that for some reason,
the Group isn't being sent over the wire as a Group, even though I
have the Object.registerClass correct. Also, when I get an array of
Groups from my server, they are correct. 

But it seems that in my client class, when I do:

var group:Group = new Group();
group.name = "test";
remoteDelegate.addGroup(group);

it gives me that "can't invoke method error", because it's not a Group
POJO, it's just a hashmap. Why is this happening?


--- In [email protected], "Peter Farland" <[EMAIL PROTECTED]> wrote:
> Have you managed to turn on debugging for remote-object in
> /WEB-INF/flex/flex-config.xml and looked at the trace of the AMF error
> in the NetConnection Debugger? There may be more information on the
> fault object in the rootcause property.
> 
> If you have access to the server locally, you can also try turning on
> Debug level logging for the AMF Gateway in
> /WEB-INF/flex/gateway-config.xml and checking your Flex logs (or
> possibly just watching the console output if you manually launch JRun
> and have console logging enabled for Flex). This will show you what data
> type was being deserialized for your input parameter and it will also
> let you see the raw response going back with information similar to that
> shown in the NetConnection Debugger (though the server side is more
> accurate as the NCD is an old Flash Remoting tool that has a few issues
> - mainly that it doesn't show objects typed with Object.registerClass).
> 
> 
>  
> 
> -----Original Message-----
> From: cazzaran [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 28, 2005 4:58 PM
> To: [email protected]
> Subject: [flexcoders] Re: Error: Cannot invoke method when using a VO
> 
> 
> 
> Peter,
> 
> Here's my whitelist:
> 
> <whitelist>
>     <unnamed>
>         <source>*</source>
>     </unnamed>
>     <named>
>         <object name="userDelegate">
>             <source>businessdelegates.UserDelegate</source>
>             <type>stateful-class</type>
>             <allow-unnamed-access>false</allow-unnamed-access>
>         </object>
>         <object name="groupDelegate">
>             <source>businessdelegates.GroupDelegate</source>
>             <type>stateful-class</type>
>             <allow-unnamed-access>false</allow-unnamed-access>
>         </object>
>     </named>
> </whitelist>
> 
> -Josh
> 
> --- In [email protected], "Peter Farland" <[EMAIL PROTECTED]>
> wrote:
> > Ah, what does the unnamed whitelist in the remote-object section look
> > like? Does it include your Group class? I apologize for not double
> > checking whether it was still a requirement in Flex 1.5, but I know it
> > was in Flex 1.0.
> > 
> > -----Original Message-----
> > From: cazzaran [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, March 28, 2005 4:19 PM
> > To: [email protected]
> > Subject: [flexcoders] Re: Error: Cannot invoke method when using a VO
> > 
> > 
> > 
> > Peter,
> > 
> > It does... 
> > 
> > -Josh
> > 
> > --- In [email protected], "Peter Farland" <[EMAIL PROTECTED]>
> > wrote:
> > > Does the Java version of Group have a public no args constructor?
> > > 
> > > 
> > > -----Original Message-----
> > > From: cazzaran [mailto:[EMAIL PROTECTED] 
> > > Sent: Monday, March 28, 2005 3:50 PM
> > > To: [email protected]
> > > Subject: [flexcoders] Error: Cannot invoke method when using a VO
> > > 
> > > 
> > > 
> > > I have a delegate class on my server called GroupDelegate, and it
> has
> > > a method addGroup(Group group).
> > > 
> > > When I try and call this method on my remote object, I get the
> error:
> > > 
> > > Error: Cannot invoke method addGroup
> > > 
> > > However, if I switch my method's signature to addGroup(String
> > > groupName), the method executes, and the group is added to the DB.
> > > 
> > > Group is just a POJO, and obviously the second method wont work
> > > because there is a lot more information than just the groupName that
> > > needs to be recorded...
> > > 
> > > Interestingly, when I do a getGroups I get back an array of the
> > > correct objects, and in my client side model of my Group class I
> have
> > > correctly done the Object.registerClass. The only time I seem to
> have
> > > an issue is when I pass it BACK to my server as a Group.
> > > 
> > > Any ideas? -Josh
> > > 
> > > 
> > > 
> > > 
> > > 
> > >  
> > > Yahoo! Groups Links
> > 
> > 
> > 
> > 
> > 
> >  
> > Yahoo! Groups Links
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to