Results 1 to 4 of 4

Thread: ZendAMF Integration

  1. #1
    Join Date
    Aug 2009
    Posts
    4

    Default ZendAMF Integration

    Hi,
    i'm a newbie about spring actionscript and i would like to build an application with this framework, Cairngorm and ZendAMF too...
    I would like to define an object in my spring-services.xml (a piece of application-context.xml) that matches this mxml definition:

    <mx:RemoteObject
    id="LoginService"
    source="LoginService"
    destination="zend"
    showBusyCursor="true">
    <mx:method name="login"/>
    </mx:RemoteObject>

    I actually do this:

    <object id="serviceLocator" class="org.springextensions.actionscript.cairngorm .business.CairngormServiceLocator" factory-method="getInstance">

    <property name="loginService">
    <ref>loginService</ref>
    </property>
    </object>

    <object id="loginService" class="mx.rpc.remoting.mxml.RemoteObject">
    <property name="destination" value="zend" />
    <property name="source" value="LoginService" />
    <property name="showBusyCursor" value="true" />
    </object>

    ...but Zend Server sends back an exception:

    [RPC Fault faultString="Method "null" does not exist" faultCode="0" faultDetail="#0 C:\Programmi\Apache Software Foundation\Apache2.2\frameworks\zendframework\libr ary\Zend\Amf\Server.php(554): Zend_Amf_Server->_dispatch('null', Array)

    i think that's because i forgot to define the <mx:method name="login"/> that tells the Zend Server which method to call on the server side...
    but i don't know how i can define it in the xml...
    i beg your pardon, i'm only a newbie ;-)

    Thanx in advance...
    Reply With Quote

  2. #2
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    407

    Default try this...

    Hey Paul,

    I see you're using the Cairngorm extensions, did you go through the documentation?

    http://www.springactionscript.org/do...html#cairngorm

    This shows you step by step how to set things up, regardless of what server-side technology you're using.

    If things are still unclear, then please feel free to ask,

    cheers,

    Roland

  3. #3
    Join Date
    Aug 2009
    Posts
    4

    Default ZendAMF Integration

    Hi Shooter,
    thanx in advance for your reply...
    I've already followed step by step the documentation example, but it doesn't describe how i can define the <mx:method> tag that the ZendAMF Server needs to call the remote method... i think that's for this i get the exception

    [RPC Fault faultString="Method "null" does not exist" faultCode="0" faultDetail="#0 C:\Programmi\Apache Software Foundation\Apache2.2\frameworks\zendframework\libr ary\Zend\Amf\Server.php(554): Zend_Amf_Server->_dispatch('null', Array)

    I searched the web but i found nothing about this... can you help me?

  4. #4
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    407

    Default not a spring as issue?

    Hey Paul,

    but I'm afraid that's not how Cairngorm deals with remoteobjects, the remoteobject is only configured for a specific server endpoint/source/destination, the method is defined in your business delegate.
    So in a Caingorm situation you don't need to define the method in your MXML, nor in your SpringAS config.

    If you insist on configuring a remoteobject directly with a method, I suspect you need to add it to its operations collection.
    Something like:
    Code:
    <object id="loginService" class="mx.rpc.remoting.mxml.RemoteObject">
    <property name="destination" value="zend" />
    <property name="source" value="LoginService" />
    <property name="showBusyCursor" value="true" />
    <property name="operations">
    <value>
    <array>
    <value><object class="mx.rpc.remoting.Operation"/>...further config comes here</value>
    <array>
    </value>
    </property>
    </object>
    This is not really a SpringAS issue however, just a matter of figuring out how the RemoteObject works internally.
    Right now I'm afraid I don't have time to look into this, so for now you're on your own
    Maybe someone else on the forum here can offer some insight?

    cheers,

    Roland

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •