Todd,
Sorry, I think I'm misunderstanding something very basic here. Aren't
both mxml and RO calling the method views.getView("test",
['nid','title','body','changed'])?

The method server side is views.getView("view name" (string), "fields"
(array), "args" (array)). I've attached the code below.

Thanks for your help,
Ben


function views_service_service() {
  return array(
    array(
      '#method'   => 'views.getView',
      '#callback' => 'views_service_get_view',
      '#args'     => array('string', 'array', 'array'),
      '#args'     => array(
        array(
          '#name'         => 'view_name',
          '#type'         => 'string',
          '#description'  => t('View name.')),
        array(
          '#name'         => 'fields',
          '#type'         => 'array',
          '#optional'     => TRUE, 
          '#description'  => t('A list of fields to return.')),
        array(
          '#name'         => 'args',
          '#type'         => 'array',
          '#optional'     => TRUE,
          '#description'  => t('An array of arguments to pass to the
view.'))),
      '#return'   => 'array',
      '#help'     => t('Retrieves a view defined in views.module.')),
  );
}


--- In flexcoders@yahoogroups.com, "twcrone70" <[EMAIL PROTECTED]> wrote:
>
> Method signature is my attempt to be language neutral when asking for
> the interface like in Java it might be:
> 
> public List getSomething( int param, String param );
> 
> The getNodes() call does not matter.  What matter is the RemoteObject
> method call.  It appears to me that you are passing different
> parameters in the AS implementation as you are the MXML implementation.
> 
> I'll look again, but quite often I send the wrong types of parameters
> through an RO and the server side cannot find the method properly.
> 
> With PHP, not really sure how an "interface" or method looks.
> 
> - Todd
> 
> 
> --- In flexcoders@yahoogroups.com, "bennybobw" <bennybobw@> wrote:
> >
> > Todd,
> >     That's the part I dont understand. If I use either the mxml or the
> > javascript, init() is calling getNodes() in both cases. It works when
> > I use the mxml instead of the remoteObject declaration. That's why I
> > am thinking it has something to do with my use of remoteObject.
> > 
> > I'm not exactly sure what you mean by "server code signature", but I'm
> > running Drupal 5 with services and the AMFPHP module.
> > 
> > Thanks,
> > Ben
> > 
> > --- In flexcoders@yahoogroups.com, "twcrone70" <twcrone70@> wrote:
> > >
> > > Well at first glance it appears that you are passing parameters
in the
> > > actionscript and not in the MXML so they are each looking for a
> > > different method on the server.  When I get "no such method
error" it
> > > is usually because I have specified the wrong parameters or in the
> > > wrong order.  What is the server code signature?
> > > 
> > > - Todd
> > >
> >
>


Reply via email to