Closed GoogleCodeExporter closed 8 years ago
Hi Davis,
It seems likely that you're getting this issue as $addXsiTypes is set to false,
in the AdsSoapClient.php:
https://code.google.com/p/google-api-adwords-php/source/browse/src/Google/Api/Ad
s/Common/Lib/AdsSoapClient.php
Could you confirm that you no longer see errors if you set $addXsiType to true.
To implement this, simply add the following line, at line 404:
$addXsiTypes = TRUE;
Cheers,
- Paul, AdWords API Team.
Original comment by api.pmat...@gmail.com
on 2 Apr 2013 at 4:37
I was seeing the same error (Unmarshalling Error: cvc-type.2).
OS: Linux
PHP 5.2.6
Library: 4.2.1
API: v201302
I can confirm that setting $addXsiType to true in AdsSoapClient fixes the
issues. Previously the xsi types were not getting added to the XML. Once they
were added, everything worked fine.
Original comment by couponch...@gmail.com
on 3 Apr 2013 at 5:25
Unfortunately, when I manually set "$addXsiTypes = TRUE;", while some of the
previous failed API calls now work, it now brings back the previous error that
was supposed to be fixed with this release:
"Unmarshalling Error: cvc-elt.4.2: Cannot resolve 'Selector' to a type
definition for element 'ns1:serviceSelector'."
For example, this error now shows up when running the GetKeywords script.
OS: Linux
PHP 5.2.6
Library: 4.2.1
API: v201302
Original comment by couponch...@gmail.com
on 3 Apr 2013 at 8:12
If I set $addXsiType to TRUE as Paul suggested, I get another error:
Fatal error: Uncaught SoapFault exception: [soap:Client] Unmarshalling Error:
cvc-elt.4.2: Cannot resolve 'Paging' to a type definition for element
'ns1:paging'.
OS: Linux (Debian)
PHP: 5.2.6-1+lenny16
libxml: 2.6.32
API: v201302
Library: 4.2.1
Original comment by davis.fr...@gmail.com
on 4 Apr 2013 at 12:31
Thanks for the additional info there Davis.
Can you tell me, what was the last working version of the API for you? And
does it still work?
Cheers,
Paul.
Original comment by api.pmat...@gmail.com
on 4 Apr 2013 at 5:12
The last working API version was v201206.
Original comment by davis.fr...@gmail.com
on 4 Apr 2013 at 5:17
[deleted comment]
aving the same issue with
PHP Version 5.2.6-1+lenny10
libxml: 2.6.32
API: v201302
adx_api_php_lib_4.2.2
v201209 was working fine
Original comment by velim...@gmail.com
on 11 Apr 2013 at 1:16
We couldn't wait any longer and upgraded our PHP to 5.3.3-7+squeeze15 and now
it is working fine.
Original comment by davis.fr...@gmail.com
on 11 Apr 2013 at 1:19
The workaround I found for this issue is this:
1. Set "$addXsiTypes = TRUE;" on AdsSoapClient.php line 404.
2. Update all of the getXsiTypeName() functions in each of the classes defined
in /Util/ReportUtils.php to return a blank string. For example, in the Paging
class definition, modify the function getXsiTypeName() to 'return "";' instead
of 'return "Paging";'. Do the same for Selector class, Predicate class, etc.
After doing this, lib version 4.2.2 works fine with PHP 5.2.6 and v201302.
Original comment by kmhogg...@gmail.com
on 11 Apr 2013 at 4:53
Thanks, this worked
Original comment by velim...@gmail.com
on 12 Apr 2013 at 10:55
I ran into the same exact issue with lib version 4.4.0. The solution
presented in comment #10, editing the ReportUtils.php module to change all the
getXsiTypeName() calls to return empty strings worked for me, even though it
meant changing the library, something I really hate to do. (But was necessary
to get us updated so we were running again.)
PHP Version 5.2.4-2ubuntu5.17
libxml version: 2.6.31
API: v201306
adwords_api_php_4.4.0
We were upgrading from API v201209 using lib 3.2.1, which worked fine.
Original comment by steve...@gmail.com
on 23 Jul 2013 at 2:07
We'll look into making this value configurable from the settings.ini
Regards,
- Paul, AdWords API Team.
Original comment by api.pmat...@gmail.com
on 26 Sep 2013 at 5:21
We have moved to GitHub, please continue discussion here:
https://github.com/googleads/googleads-php-lib/issues/3
Original comment by vt...@google.com
on 14 Jan 2014 at 5:20
Original issue reported on code.google.com by
davis.fr...@gmail.com
on 2 Apr 2013 at 3:34