Expand my Community achievements bar.

webservice question

Avatar

Level 1
I am working at building a login function which will take the
username and password entered in a form, submit those to a
webservice for verification, if verified it will push back the
employeeKey which will then be used to query another webservice for
permission and role information.



the first part is working as expected and i am receiving the
result object, the problem I seem to be having is for the life of
me I have not been able to strip out 'employee_key' value from the
object to send back to the server.



when i look at the object via mx.utils.ObjectUtil.toString i
get:

(events::DataManagerResultEvent)#0

bubbles = false

cancelable = false

currentTarget = (managers::DataManager)#1

eventPhase = 2

result = (Array)#2

[0] (Object)#3

EMPLOYEE_KEY = 531

target = (managers::DataManager)#1

type = "getEmployeeKeyResult"





below is my code:



private function login():void{

var AccountName:String=txtAccountName.text;

var dm:DataManager = DataManager.getDataManager("
http://localhost/employee/com/employees.cfc?wsdl");

dm.addEventListener("getEmployeeKeyResult", logInResult);

dm.makeRemoteCall("getEmployeeKeyFromAccountName",
"getEmployeeKeyResult", {AccountName:AccountName});

}



private function
logInResult(event:DataManagerResultEvent):void{

Alert.show(mx.utils.ObjectUtil.toString(event));



var dm2:DataManager = DataManager.getDataManager("
http://localhost/employee/com/mapassignedroles.cfc?wsdl");

dm2.addEventListener("setUserPermissions",
setUserPermissions);

dm2.makeRemoteCall("getUserRoleMappings",
"setUserPermissions", event.result );

}



any help would be greatly appreciated
Text
1 Reply