Hi everyone, i really need some help figuring out why i am getting an error with my app. i am trying to rebuild the Login weborb sample, but this time using AMFPHP. all the logic for the remote object has been set up for working with AMFPHP. But when i try to log in, i get this error
Argument 1 passed to LoginService::getUser() must be an instance of LoginVO, array givenits driving me nuts, because a LoginVO type is what is sent to the _loginService remoteobject when the getUser is called
public function getUser( vo : LoginVO ):void
{
_loginService.getUser( vo ); <-- HERE
CursorManager.setBusyCursor();
}
but i still get the above error
i am also suspecting that my php VO and my actionscript VO paths dont match. cant this really be a problem?
my login service has a source of
_loginService.source = "BuiPower.LoginService";
within my Services folder, i have the BuiPower folder then the LoginService.php file. it looks like this (i have removed code so this post isnt too chunky)
<?php
class LoginService
{
public function __construct()
{
//code to connect to db etc
}
function getUser(LoginVO $loginVO)
{
include_once("../vo/net/scriptoninteractive/flex/weborb/buipower/model/vo/LoginVO.php");
....(more code to authenticate credentials)
}
}
?>
finally my actionscript VO and php VO look like this
package net.scriptoninteractive.flex.weborb.buipower.model.vo
{
[RemoteClass(alias="BuiPower.LoginVO")] <--notice as VO path isnt same as php
[Bindable]
public class LoginVO
{
public var username: String;
public var password: String;
public var loginDate: Date;
}
}
and the php VO which is located in the services folder as
vo/net/scriptoninteractive/flex/weborb/buipower/model/vo/LoginVO.php is
<?php
class LoginVO
{
var $username;
var $password;
var $loginDate;
//explicit actionscript package
var $_explicitType = "net.scriptoninteractive.flex.weborb.buipower.model.vo.LoginVO";
}
?>
does anyone have any idea...or can share how they have done it with AMFPHP. thanks a bunch!
Sincerely,
Kofi Addaquay