Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unmarshalling Error: cvc-type.2 #26

Closed
ghost opened this issue Mar 26, 2014 · 3 comments
Closed

Unmarshalling Error: cvc-type.2 #26

ghost opened this issue Mar 26, 2014 · 3 comments
Assignees

Comments

@ghost
Copy link

ghost commented Mar 26, 2014

lib: v201402
PHP: 5.4.7

Error "Unmarshalling Error: cvc-type.2: The type definition cannot be abstract for element ns1:settings" is shown based on the following code:

$adGroup = new AdGroup();
$adGroup->campaignId = SOME_ID;
$adGroup->name = SOME_NAME;
$adGroup->status = 'ENABLED';

        $bid = new CpcBid();
        $bid->bid = new Money(1000000);
        $biddingStrategyConfiguration = new BiddingStrategyConfiguration();
        $biddingStrategyConfiguration->bids[] = $bid;
        $adGroup->biddingStrategyConfiguration = $biddingStrategyConfiguration;

          $targetingSetting = new TargetingSetting();
          $targetingSetting->details[] =
          new TargetingSettingDetail('PLACEMENT', TRUE);
          $targetingSetting->details[] =
          new TargetingSettingDetail('VERTICAL', FALSE);
          $adGroup->settings[] = $targetingSetting;

        $operation = new AdGroupOperation();
        $operation->operand = $adGroup;
        $operation->operator = 'ADD';
        $operations[] = $operation;

        $adGroupMutateResult = $adGroupService->mutate($operations);

Campaign exists and is available. This error pops up when trying to add AdGroup to campaign.

Also: setting $addXsiTypes = TRUE; in AdsSoapClient.php results in a different error message:

Unmarshalling Error: cvc-elt.4.2: Cannot resolve 'ns1:CampaignOperation' to a type definition for element 'ns1:operations'.

Any advice?

@saturnism saturnism added the bug label Mar 26, 2014
@saturnism saturnism self-assigned this Mar 26, 2014
@saturnism
Copy link
Contributor

I'll take a look at this. thanks for letting us know.

@ghost
Copy link
Author

ghost commented Mar 27, 2014

Thanks, please let me know if you need further info.

@vtsao vtsao added the duplicate label Apr 8, 2014
@vtsao
Copy link
Contributor

vtsao commented Apr 8, 2014

See #3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants