# Web Service Connector Not Working inside of loaded SWF

**URL:** <https://forum.kirupa.com/t/web-service-connector-not-working-inside-of-loaded-swf/201564>\
**Category:** flash\
**Created:** [September 22, 2006, 2:29pm UTC](https://forum.kirupa.com/t/web-service-connector-not-working-inside-of-loaded-swf/201564 "2006-09-22T14:29:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![schmichael](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@schmichael](https://forum.kirupa.com/u/schmichael)\
**Post date:** [September 22, 2006, 2:29pm UTC](https://forum.kirupa.com/t/web-service-connector-not-working-inside-of-loaded-swf/201564/1 "2006-09-22T14:29:12Z")

</div>

Hi there, thanks for checking this I cant figure out what the problem is:

I am trying to call a web service using the web service connector class with an instance of the component on the stage. This works fine. The problem is when I load the SWF into another movie and then trigger the function that triggers the web service it doesn;t seem to trigger. I can see that the function is being called from my trace statement but the web service wont work. The only difference is that i am loading the SWF into another SWF. All SWFs are published at version 6. Here’s my code:  
[AS]  
import mx.data.components.WebServiceConnector;  
var webServiceURL:String = “[http://www.myURL.asmx?WSDL](http://www.myURL.asmx?WSDL)”;

function payPrize(param:Number) {  
trace(“PAY PRIZE CALLED IN MODULE:”);  
wsPayPrize.params = [param];  
wsPayPrize.trigger();  
}  
var res:Function = function (evt:Object) {  
trace(“RESULT!!!:”+evt.target.results);  
};  
var wsPayPrize:WebServiceConnector = new WebServiceConnector();  
wsPayPrize.addEventListener(“result”, res);  
wsPayPrize.WSDLURL = webServiceURL;  
wsPayPrize.operation = “PayPrize”;  
payPrize();  
[/AS]  
If anyone has any ideas of what the problem is I would be forever grateful!  
Thanks,  
Schm
