Is your result handler getting called?  If so, then the result data is
available using event.result;  //don't use lastResult  

 

Exactly how you handle the data depends on what the server returns and
what you resultFormat is.  You should be setting it to "e4x"

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of philza1985
Sent: Wednesday, September 05, 2007 1:19 AM
To: [email protected]
Subject: [flexcoders] extracting xml from httpservice via delegate

 

Hi, 

I was following this tutorial to get a delegate to access a HTTPservice.

http://nwebb.co.uk/blog/?p=118 <http://nwebb.co.uk/blog/?p=118> 

the problem is after I call it how do I extract the result if the
service returns an xml file.

this is the example I followed

-----------------------------

public class SomeDelegate
{
public function doSomething(){
var token:AsyncToken = this.service.send( {//send in stuff} );
var responder:mx.rpc.Responder = new mx.rpc.Responder(
loginResult, loginFault );
token.addResponder(responder); 
}

public function loginResult(obj:Object):void{ //do something if
server request is successful }
public function loginFault(obj:Object):void{ //do something if
server request fails }
}
-----------------------------

how do I pull a specific section out of the xml file it returns in the
loginResult area?

eg. obj.lastResult.image.image_filename; ???

and what is the result called in the command?

thanks.

 

Reply via email to