Hello all

I am trying to map value objects on php side and flex side. I am using
Zend_AMF as the AMF server. The mapping from flex to php is working fine,
but the reverse is not working.

Here is what I have done.

Here are my project setups for flex and zend.

http://n4.nabble.com/file/n963372/project%2Bstructure.jpg 

http://n4.nabble.com/file/n963372/php%2Bproject.jpg 

I am setting the zend_amf server in a controller. Could this be a reason?

The code is as follows:
<?php
//AmfHandlerController.php
class AmfHandlerController extends Zend_Controller_Action
{
   public function amfAction {
      $this->_helper->layout->disableLayout();
      $server->addDirectory( APPLICATION_PATH . '/services/' );
      $server->addDirectory( APPLICATION_PATH . '/vo/' );
      echo $server->handle();
   }
}

So in my flex, I set the end point like this -
http://localhost/amfhandler/amf

Now my flex vo is like this....
package com.mycompany.products.vo
{
   [RemoteClass(alias="UserVO")]
   [Bindable]
   public class UserVO {
      public var username:String;
      public var password:String;
   }
}

Here is my VO in php...

class UserVO
{
   var $_explicitType = "com.mycompany.products.vo.UserVO";
   var $username = "";
   var $password = "";
}

In flex, this is the code snippet I am using

public function resultHandler( event:ResultEvent ):void {
   var user:UserVO = event.result as UserVO;
   Alert.show( user.username ); // This displays an error
}

What am I doing wrong? Can somebody please help me out?

Thanks and Regards
ShiVik


-- 
View this message in context: 
http://n4.nabble.com/VO-Mapping-not-working-from-PHP-to-AS-tp963372p963372.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to