Hello list,

 

I have a problem when I mapping a php class and as3 class (using flex 4).

 

In the server I have this code:

 

GatewayController.php

 

class GatewayController extends Zend_Controller_Action

{

 

    public function init()

    {

        /* Initialize action controller here */

      $this->getHelper('ViewRenderer')->setNoRender();

      

      $this->server = new Zend_Amf_Server();

      

      $this->server->addDirectory( APPLICATION_PATH . '/services/' );

      $this->server->setClassMap('ErrorDTO', 'ErrorDTO');

      $this->server->setProduction(false);

    }

 

    public function indexAction()

    {

        // action body

        echo ($this->server->handle());

    }

 

 

}

 

ErrorDTO.php

 

class ErrorDTO {

      public $_explicitType = 'com.javiertrejo.dtos.ErrorDTO';

      

      public $type;

      public $message;

}

 

User.php

 

(.)

include_once(APPLICATION_PATH . '/dtos/UserDTO.php');

                        

$return = new UserDTO();

                        

$return->fullname = $user->getFullname();

      $return->username = $user->getUsername();

      $return->password = $user->getPassword();

      $return->profile  = $user->getProfile();

                        

(.)

 

In the client (Flex project):

 

ErrorDTO.as

package com.javiertrejo.dtos

{

      [Bindable]

      [RemoteClass(alias="ErrorDTO")]

      public class ErrorDTO

      {

            public var type:String;

            public var message:String;

      }

}

 

The problem is when I debug the app the resultEvent always return a
ObjectProxy. Can help me??

 

Thanks

 

 

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to