spotonlive / laravel-google-ads

Google Ads API for Laravel
MIT License
64 stars 58 forks source link

[SoapFault] Unmarshalling Error: cvc-elt.4.3: Type 'ns1:AdGroupLabelOperation' is not validly derived from the type definition, 'AdGroupOperation', of element 'ns1:operations' #21

Closed svendebie closed 7 years ago

svendebie commented 7 years ago

I get keeping the following message: [SoapFault] Unmarshalling Error: cvc-elt.4.3: Type 'ns1:AdGroupLabelOperation' is not validly derived from the type definition, 'AdGroupOperation', of element 'ns1:operations'

But I can't find what I'm doing wrong with the AdGroupLabelOperations. I get the same when I want to use CampaignLabelOperation. Same message... I can get, update, remove campaigns, ad groups, ads and keywords without any problems. But add labels to campaigns, ad groups, ads en keywords aren't working.

It's not the best code, but it does the job for now.

This is my code: `<?php

namespace App\Console\Commands;

use Illuminate\Console\Command; use League\Csv\Reader; use Illuminate\Support\Facades\Log;

use App\Adwords\Product; use App\Adwords\Ad; use App\Adwords\AdKeyword;

use Google\AdsApi\AdWords\AdWordsSessionBuilder; use Google\AdsApi\Common\OAuth2TokenBuilder; use Google\AdsApi\AdWords\AdWordsServices; use Google\AdsApi\AdWords\v201609\cm\ApiException;

use Google\AdsApi\AdWords\v201609\cm\Predicate; use Google\AdsApi\AdWords\v201609\cm\PredicateOperator; use Google\AdsApi\AdWords\v201609\cm\Selector; use Google\AdsApi\AdWords\v201609\cm\Operator; use Google\AdsApi\AdWords\v201609\cm\Paging; use Google\AdsApi\AdWords\v201609\cm\SortOrder; use Google\AdsApi\AdWords\v201609\cm\OrderBy;

use Google\AdsApi\AdWords\v201609\cm\Campaign; use Google\AdsApi\AdWords\v201609\cm\CampaignService; use Google\AdsApi\AdWords\v201609\cm\CampaignOperation; use Google\AdsApi\AdWords\v201609\cm\CampaignStatus;

use Google\AdsApi\AdWords\v201609\cm\AdGroupCriterionService; use Google\AdsApi\AdWords\v201609\cm\AdGroupAdStatus; use Google\AdsApi\AdWords\v201609\cm\AdGroupCriterionOperation; use Google\AdsApi\AdWords\v201609\cm\AdGroupCriterion; use Google\AdsApi\AdWords\v201609\cm\Criterion;

use Google\AdsApi\AdWords\v201609\cm\AdGroup; use Google\AdsApi\AdWords\v201609\cm\AdGroupAd; use Google\AdsApi\AdWords\v201609\cm\AdGroupService; use Google\AdsApi\AdWords\v201609\cm\AdGroupAdService; use Google\AdsApi\AdWords\v201609\cm\AdGroupStatus; use Google\AdsApi\AdWords\v201609\cm\AdGroupOperation; use Google\AdsApi\AdWords\v201609\cm\CpcBid; use Google\AdsApi\AdWords\v201609\cm\Money; use Google\AdsApi\AdWords\v201609\cm\AdGroupAdOperation; use Google\AdsApi\AdWords\v201609\cm\KeywordMatchType;

use Google\AdsApi\AdWords\v201609\cm\AdvertisingChannelType; use Google\AdsApi\AdWords\v201609\cm\BiddingStrategyConfiguration; use Google\AdsApi\AdWords\v201609\cm\BiddingStrategyType;

use Google\AdsApi\AdWords\v201609\cm\Budget; use Google\AdsApi\AdWords\v201609\cm\BudgetBudgetDeliveryMethod; use Google\AdsApi\AdWords\v201609\cm\BudgetOperation; use Google\AdsApi\AdWords\v201609\cm\BudgetService;

use Google\AdsApi\AdWords\v201609\cm\LabelService; use Google\AdsApi\AdWords\v201609\cm\Label; use Google\AdsApi\AdWords\v201609\cm\CampaignLabel; use Google\AdsApi\AdWords\v201609\cm\CampaignLabelOperation; use Google\AdsApi\AdWords\v201609\cm\AdGroupLabel; use Google\AdsApi\AdWords\v201609\cm\AdGroupLabelOperation; use Google\AdsApi\AdWords\v201609\cm\AdGroupAdLabel; use Google\AdsApi\AdWords\v201609\cm\AdGroupAdLabelOperation;

class BlauwproUpdateAdwords extends Command { /**

image

nikolajlovenhardt commented 7 years ago

Hi @svendebie

This question is not releated to this package. You'll have to ask in the official google-ads library instead. Here you go https://github.com/googleads/googleads-php-lib/issues