views:

154

answers:

3

Hello,

PHP Version: 5.3.3

I'm using the SOAP extension to pull data from a web api. Below you can see my connection details. When it gets to line 3 I get an error:

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://www.global1.autotask.net/atservices/1.2/atws.wsdl' : failed to load external entity "https://www.global1.autotask.net/atservices/1.2/atws.wsdl" in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ATAPI\index.php:5 Stack trace: #0 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ATAPI\index.php(5): SoapClient->SoapClient('https://www.glo...', Array) #1 {main} thrown in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ATAPI\index.php on line 5

Here are my connection details:

$wsdl = 'https://www.global1.autotask.net/atservices/1.2/atws.wsdl';
$loginarray = array('login' => "[email protected]", 'password' => "******", 'uri'=>"http://autotask.net/ATWS/v1_2/", 'location'=>"https://global1.autotask.net/atservices/1.2/atws.asmx");
$client = new SoapClient($wsdl, $loginarray);

I've googled and see that it's possibly a bug with the soap extension?

I've uncommented:

extension=php_soap.dll

In the php.ini file. and I've also made sure my allow url fopen is set to on:

allow_url_fopen = On

Anyone got an idea how I get get round this problem? Maybe I've forgotten to do something?

Thanks,

Billy

A: 

1) It works fine for me. I can load that and even do not need the password. Well, the problem occurs in some PHP/Soapclient versions. I advise you to upgrade the PHP to the latest version.

2) If it still does not work for you, try NuSoap. It's pretty awesome too.

shamittomar
I'm on version 5.3.3 already
iamjonesy
A: 

Why do you believe there is a file with a .wsdl extension sitting around somewhere? To get the WSDL out of an ASMX web service, append "?wsdl" to the end of the service, e.g., https://global1.autotask.net/atservices/1.2/atws.asmx?wsdl.

John Saunders
+1  A: 

Hi Billy,

First, I'd recommend you post a question on the Autotask CommunITy website (community.autotask.com) since there are a lot of resources there who are very familiar with Autotask-specific things.

The URL you are using isn't correct for WebServices access. If you use https://webservicesg1.autotask.net/atservices/1.2/atws.wsdl does it work?

Travis

Travis Austin