Uncaught SoapFault exception: HTTP Unsupported Media Type in AdsSoapClient.php

375 views
Skip to first unread message

geob...@gmail.com

unread,
Jan 20, 2017, 4:49:57 AM1/20/17
to google-doubleclick...@googlegroups.com
Hi guys,
I'm having an issue with AdsSoapClient.php.


I try to get line items, like it's written in the GetAllLineItems.php using the latest API version. The same happens with other examples. I have this php file in the public_html folder.

Could you please tell me what is incorrect? I'm following the ReadMe, but still have problems with it. The network code is 22133002.

Thank you!
lineitems.php
soap.log

Vincent Tsao

unread,
Jan 20, 2017, 12:28:58 PM1/20/17
to Google's DoubleClick for Publishers API Forum
Hello:

In the future please don't attach your INI file - it contained your client ID and secret (I've removed the file from your post). Please delete that client ID and secret in the Google Developer Console for security reasons and generate a new one.

As for your issue, PHP's SOAP gzip compression levels are positive (1 through 9). A value of -1 isn't valid and is causing this issue.

Thanks,
Vincent Tsao, DFP API Team

geob...@gmail.com

unread,
Jan 20, 2017, 4:22:47 PM1/20/17
to Google's DoubleClick for Publishers API Forum
Hi Vincent,

Thank you so much for replying and for your suggestion, did not know about that.
I changed the compression level, unfortunately, it shows the same error. 

Thank you

geob...@gmail.com

unread,
Jan 21, 2017, 7:35:18 PM1/21/17
to Google's DoubleClick for Publishers API Forum

Hi,

After that, I filled optional proxy settings in adsapi_ini.php, the previous error disappeared, but now I'm getting this error.


Now soap.log file does not update on errors.Could you tell me, why this happens? 


Thank you


Chris Seeley

unread,
Jan 23, 2017, 10:03:57 AM1/23/17
to Google's DoubleClick for Publishers API Forum
Is this error intermittent, or consistent? Are you able to access the WSDL from this machine via a browser or cURL?

Thanks,
Chris Seeley, DFP API Team

geob...@gmail.com

unread,
Jan 23, 2017, 11:15:21 AM1/23/17
to Google's DoubleClick for Publishers API Forum
Hi Chris, Thanks for replying.

This error is consistent, Yes, I'm able to access WSDL from php file from both browser and console. But when I run php files in the console it shows an error:- Soap-Erro: Parsing WSDL: Couldn't load from 'https://ads.google.com/apis..../CreativeService?wsdl' : failed to load external entity 'https://ads.google.com/apis..../CreativeService?wsdl.

Chris Seeley

unread,
Jan 26, 2017, 11:39:09 PM1/26/17
to Google's DoubleClick for Publishers API Forum
Since you started another thread on this, I replied there. We can continue troubleshooting on that thread instead.
Reply all
Reply to author
Forward
0 new messages