SOAP-ERROR: Parsing WSDL: Couldn't load from

20,505 views
Skip to first unread message

Moustik

unread,
Jul 6, 2012, 6:05:44 AM7/6/12
to google-doubleclick...@googlegroups.com
Hi,

I'm having some problems while using DFP API PHP.

Here is my code :
error_reporting(E_STRICT | E_ALL) ;

// You can set the include path to src directory or reference
// DfpUser.php directly via require_once.
// $path = '/path/to/dfp_api_php_lib/src';
$path = dirname(__FILE__) . '/../lib/dfp_api_php_lib_2.12.1/src';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);

require_once 'Google/Api/Ads/Dfp/Lib/DfpUser.php';
require_once 'Google/Api/Ads/Dfp/Util/DateTimeUtils.php';

try {
  // Get DfpUser from credentials in "../auth.ini"
  // relative to the DfpUser.php file's directory.
  echo "Création de l'utilisateur";
  $user = new DfpUser();
  
  // Log SOAP XML request and response.
  $user->LogDefaults();

  // Get the ForecastService.
  $forecastService = $user->GetService('ForecastService', 'v201204');
  die();
} catch (Exception $e) {
  print $e->getMessage() . "\n";
}

And i got this message : 
PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://www.google.com/apis/ads/publisher/v201204/ForecastService?wsdl' : failed to load external entity "https://www.google.com/apis/ads/publisher/v201204/ForecastService?wsdl"
 in D:\workspace_tbs\lib\dfp_api_php_lib_2.12.1\src\Google\Api\Ads\Common\Lib\AdsSoapClient.php on line 163

I can see the ForecastService?wsdl directly in my browser. Is there something wrong in my configuration files? :(

DFP Advisor

unread,
Jul 10, 2012, 12:17:23 AM7/10/12
to google-doubleclick...@googlegroups.com
Hi Moustik,

If you are still seeing this issue, please check that if you have a proxy configuration, you may need to add that to the settings.ini file.

If you do not have a proxy, it may be due to a firewall issue with your PHP binary.

Please let us know if either suggestions help and we can help further diagnose the problem.

Thanks,
Adam Rogal, DFP API Team

Moustik

unread,
Jul 26, 2012, 12:26:06 PM7/26/12
to google-doubleclick...@googlegroups.com
Hi, thank you for your answer.

I did a test with my network support, in order to see if we can catch an error in the firewall interface while i call my test, and it seems that there is no issues (according to the firewall).
We don't use proxy, so i'm still having this problem.

Do you have some other options to solve this problem?

Thank you again.

Adam Rogal (DFP API Team)

unread,
Jul 30, 2012, 7:53:30 PM7/30/12
to google-doubleclick...@googlegroups.com
Hi Moustik,

You may want to diagnose if it's an incompatibility from within PHP or of it's a connection issue.

First, can you try fetching the WSDL by it's URL through PHP in the same environment you would use our API. Doing a page like:

<?php
$wsdl = file_get_contents('https://www.google.com/apis/ads/publisher/v201204/ForecastService?wsdl');
echo $wsdl;

should work. If it doesn't, then it appears it's a connection issue and something that you may need to diagnose on your side. 

Something that I found also is you might need openssl extension installed in your PHP instance:


You may want to look into this as well.

Thanks,
Adam Rogal, DFP API Team

Per York

unread,
Mar 26, 2013, 4:31:15 AM3/26/13
to google-doubleclick...@googlegroups.com
If you want to use that on localhost, then use WAMP.
Then click on tray icon>PHP Services> and there enable the followings:
SOAP,
php_openssl,
openssl,
curl;




michel kollenhoven

unread,
Jun 28, 2013, 5:03:17 AM6/28/13
to google-doubleclick...@googlegroups.com

try to delete the wsdl cache this worked for me(its /tmp/wsdl* or %tmp% (i guess linux here check soap.wsdl_cache_dir  in php.ini of php_info())
Op vrijdag 6 juli 2012 12:05:44 UTC+2 schreef Moustik het volgende:
Reply all
Reply to author
Forward
0 new messages