Remove or change the Content-Encoding of a SOAP request

1,213 views
Skip to first unread message

Alan Coleman

unread,
Jun 25, 2013, 5:39:03 PM6/25/13
to adwor...@googlegroups.com

The code below is a log of a SOAP request that forms part of my Google AdWords App. I'd like to be able to change or remove the Content-Encoding of the request as I think this may be be causing an error. It can be seen below on line 5.

Any ideas would be appreciated.

PHP Error:

Notice: Failed to load response into DOM: DOMDocument::loadXML(): 

SOAP Request:

Host: adwords.google.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.4.3, gzip
Accept-Encoding: gzip, deflate
Content-Encoding: deflate
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 780
SOAP Error:
HTTP/1.1 415 Unsupported Media Type Content-Type: text/html; charset=UTF-8
Content-Encoding: gzip
Date: Tue, 25 Jun 2013 20:45:10 GMT
Expires: Tue, 25 Jun 2013 20:45:10 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Content-Length: 131
Server: GSE

Alan Coleman

unread,
Jun 26, 2013, 5:27:56 PM6/26/13
to adwor...@googlegroups.com
I set the COMPRESSION Setting to 0 in the settings.ini 

This was necessary to disable SOAP Content-Encoding when using AdWords PHP Library adwords_api_php_4.2.5

Content-Encoding: deflate

[SOAP]
; Enable/disable gzip compression on SOAP requests and responses.
COMPRESSION = 0

Alan Coleman

unread,
Jun 26, 2013, 5:28:13 PM6/26/13
to adwor...@googlegroups.com

Paul Matthews (AdWords API Team)

unread,
Jul 2, 2013, 9:30:17 AM7/2/13
to adwor...@googlegroups.com
Hi Alan,

Can you confirm that this fixed the problem?

You mention the google-api-adwords-php version 4.2.5, does this mean that you weren't having this issue on library versions prior to 4.2.5? Have you recently upgraded your mod_deflate or any packages that might be linked to it? Do you run these requests through a http proxy at all? Finally, can you list some basic system information such as operating system and version, php and apache version.

Regards,

- Paul, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages