Hi,
One problem I can see immediately is that the OperationStream's
scopingEntityId field should be set to the complex type EntityId, and
you are setting it to a number. For example:
$stream->scopingEntityId = new EntityId('CAMPAIGN_ID', 42);
More information is available here:
http://code.google.com/apis/adwords/v2009/docs/reference/BulkMutateJobService.EntityId.html
Best,
- Eric Koleda, AdWords API Team
On Nov 19, 7:52 pm, "Stan (Begun)" <[email protected]> wrote:
> Hi,
> I'm trying to work with BulkMutateJobService from PHP. And received a
> error message:
>
> [Nov 20 2009 03:45:41.000000 - INFO] [email protected]
> [email protected] service=BulkMutateJobService
> method=mutate operators={ADD: 2} responseTime= requestId= operations=
> units= server=adwords-sandbox.google.com isFault=true
> faultMessage=null while invoking public abstract
> com.google.ads.api.services.job.bulkmutate.v200909.jaxbgen.BulkMutateJob
> com.google.ads.api.services.job.bulkmutate.v200909.jaxbgen.BulkMutateJobSer
> viceInterface.mutate
> (com.google.ads.api.services.job.bulkmutate.v200909.jaxbgen.JobOperation)
> throws
> com.google.ads.api.services.job.bulkmutate.v200909.jaxbgen.ApiException_Exc
> eption
> with params
> [com.google.ads.api.services.job.bulkmutate.v200909.jaxbgen.joboperat...@14
> 8feff].
>
> My code:
>
> $user = new AdWordsUser();
> $user->LogDefaults();
> $campaignService = $user->GetBulkMutateJobService();
>
> $campaign = new Campaign();
> $campaign->name = 'Campaign #' . time();
> $campaign->status = 'ACTIVE';
> $campaign->biddingStrategy = new ManualCPC();
> $campaign->budget = new Budget('DAILY', new Money(50000000),
> 'STANDARD');
>
> $campaignOperation = new CampaignOperation;
> $campaignOperation->operator = 'ADD';
> $campaignOperation->operand = $campaign;
>
> $stream = new OperationStream();
> $stream->operations = array($campaignOperation);
> $stream->scopingEntityId = 42;
>
> $request = new BulkMutateRequest();
> $request->operationStreams = array($stream);
> $request->partIndex = 0;
>
> $job = new BulkMutateJob();
> $job->request = $request;
> $job->numRequestParts = 1;
>
> $job2 = $campaignService->mutate(new JobOperation($job, 'ADD'));
>
> var_dump($job2);
>
> What am I doing wrong?
>
> ---
--
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=.