# as3 CS4 web service

**URL:** <https://forum.kirupa.com/t/as3-cs4-web-service/301310>\
**Category:** flash\
**Created:** [December 7, 2009, 1:38pm UTC](https://forum.kirupa.com/t/as3-cs4-web-service/301310 "2009-12-07T13:38:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mca102](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@mca102](https://forum.kirupa.com/u/mca102)\
**Post date:** [December 7, 2009, 1:38pm UTC](https://forum.kirupa.com/t/as3-cs4-web-service/301310/1 "2009-12-07T13:38:07Z")

</div>

Welcome,  
I have a problem with using the webservice component from flex 3 in flash cs4.  
I am making the same thing what is in this adobe tutorial:  
[http://www.webkitchen.be/2009/03/02/…-cs4-projects/](http://www.webkitchen.be/2009/03/02/video-tutorial-use-the-flex-webservice-component-in-flash-cs4-projects/)

```auto

public function Main() 
        {
            _WS = new WebService();

            _st = new String("http://www.webservicex.net/country.asmx?WSDL");
            
            _WS.addEventListener("load", wsLoaded);
         
        }
        
        private function Klik(e:MouseEvent):void 
        {
            _WS.loadWSDL(_st);
        }
        
        public function wsLoaded(e:LoadEvent):void 
        {
            
            _myOperation = Operation(_WS.getOperation("GetCountries"));
            _myOperation.addEventListener("fault", wsError, false, 0, true);
            _myOperation.addEventListener("result", wsResult, false, 0, true);
            _myOperation.send(); 
            
        }
        
        public function wsResult(e:ResultEvent):void 
        {
            var xml:XML = new XML(e.result);
        }
        
        public function wsError(e:FaultEvent):void 
        {
            trace(e.fault);
        }

```

And I’m getting tis Error:  
Error opening URL ‘[http://www.webservicex.net/country.asmx?WSDL](http://www.webservicex.net/country.asmx?WSDL)’

If i open my swf in browser everything is fine.  
Is ther something that can block the communication ?  
Thanks.
