mx:WebService is defined in the RPC.SWC manifest as
mx.rpc.soap.mxml.WebService, which implements IMXMLObject
 
mx.rpc.soap.mxml.WebService has a default property which is a map of
mx:rpx.soap.mxml.Operation objects
 
IMXMLObjects have an initialized() method

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Tuesday, August 05, 2008 8:06 PM
To: [email protected]
Subject: [flexcoders] <mx:WebService> compilation - what's the secret
sauce?



A few questions - 

How does the compiler make the leap from this:

    <mx:WebService id="service">
        <mx:operation name="VehicleOutOfRepair"/>
    </mx:WebService>

to this:

private function _main_WebService1_i() : mx.rpc.soap.mxml.WebService
{
    var temp : mx.rpc.soap.mxml.WebService = new
mx.rpc.soap.mxml.WebService();
    service = temp;
    temp.operations = {VehicleOutOfRepair: _main_Operation1_c()};
    temp.initialized(this, "service")
    return temp;
}

private function _main_Operation1_c() : mx.rpc.soap.mxml.Operation
{
    var temp : mx.rpc.soap.mxml.Operation = new
mx.rpc.soap.mxml.Operation();
    temp.name = "VehicleOutOfRepair";
    return temp;
}

?? How does it know do create a mx.rpc.soap.mxml.Operation from
<mx:operation> which doesn't seem to be defined? How does it know to
collect these into a dynamic object and call it operations? I can't find
any appropriate metadata or anything to make this leap?

Anybody who can clear this up would definitely be appreciated!

-Josh

-- 
"Therefore, send not to know For whom the bell tolls. It tolls for
thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 


 

Reply via email to