# Webservices -- Calling a WSDL document in a protected directory

**URL:** https://forum.kirupa.com/t/webservices-calling-a-wsdl-document-in-a-protected-directory/90058
**Category:** flash
**Created:** [May 13, 2005, 11:20pm UTC](https://forum.kirupa.com/t/webservices-calling-a-wsdl-document-in-a-protected-directory/90058 "2005-05-13T23:20:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![shuga](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@shuga](https://forum.kirupa.com/u/shuga)
#### Post date: [May 13, 2005, 11:20pm UTC](https://forum.kirupa.com/t/webservices-calling-a-wsdl-document-in-a-protected-directory/90058/1 "2005-05-13T23:20:02Z")

</div>

Hello all,

I am trying to call an external PHP script file (it’s a SOAP server script) file from within Flash. Now, the directory the php script is in is password-protected, so my call to the webservice function is like so:

// Initialize the WebService Class here  
wsdl = new mx.services.WebService(“[http://username:password@www.test.com/soap/server.php?wsdl](http://username:password@www.test.com/soap/server.php?wsdl)”);

I get an error saying “Error Opening URL blah blah”

Now, I tried taking the username/password off of the directory and made my call like so:

// Initialize the WebService Class here  
wsdl = new mx.services.WebService(“[http://www.test.com/soap/server.php?wsdl](http://www.test.com/soap/server.php?wsdl)”);

And it works fine, no errors.

What could I be doing wrong?

PS – I know the username/password I am using are correct, so that’s not the issue 😉

Thanks!
