Is it possible to implement your app's ServiceLocator in ActionScript?
I strongly prefer making WebService calls in AS so I would rather do
it this way. If this is not possible, I am hoping someone can explain
how a complex call would be made. I am not currently using a Delegate
(isn't Delegate.create not necessary in AS3?), so here is the code in
my Command class.

var service:AbstractService =
ServiceLocator.getInstance().getService("industryService");
service.GetDataByGrouping();

The problem is that neither the onResult nor onFault handlers are firing.

Here is the service as defined in my Services.mxml file:

<mx:WebService id="industryService" 
                wsdl="myWSDL" 
                showBusyCursor="true"
                useProxy="false"
                result="event.token.resultHandler(event)" 
                fault="event.token.faultHandler(event)">
                
                <mx:operation name="GetDataByGrouping" resultFormat="object">
                <mx:request>
                        <GroupingRequests>
                                <GroupName>
                                        RPRToolStaticData
                                </GroupName>
                        </GroupingRequests>
                </mx:request>
            </mx:operation>
        </mx:WebService>

The equivalent in AS, if you're interested is:

var ws:WebService = new WebService();
                                ws.loadWSDL([EMAIL PROTECTED] + "?WSDL"); 
ws.useProxy = false;
ws.addEventListener("result", onIndustryAndSizeIdsLoaded);
ws.addEventListener("fault", onIndustryAndSizeIdsFault);
                                
var op:AbstractOperation;
op = ws['GetDataByGrouping'];
                                
var args:Object = new Object;
args.groupingRequests = new Array();
args.groupingRequests.push({GroupName: "RPRToolStaticData"});
                                
op.arguments = args;
op.send();

Thanks in advance,
Ben






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to