Hi,

Sorry for our delay responding you here, are you still experiencing this 
issue? if yes, can you give me a fresh requestId of the issue, I'd be glad 
to investigate.

To answer your questions:
You don't seem to be doing anything wrong, in fact this type of error is 
likely an issue we need look at in our side.
You should be using the test account credentials and not the MCC, as I 
believe you are doing correctly.

Best,

- David Torres - AdWords API Team

On Friday, January 25, 2013 11:57:03 AM UTC-5, Timo Aarnio wrote:
>
> Hi
>
> I'm currently trying to add campaigns for the test account. But when I run 
> the script, it throws "Fault occurred while processing." error.
>
> The error seems to happen when the script tries to mutate budget: [Jan 25 
> 2013 18:03:48.000000 - ERROR] email=testemail effectiveUser=123456789 
> service=BudgetService method=mutate operators={ADD: 1} responseTime=156 
> requestId=0004d41f126d8a300ae53fcd00006bc0 operations=0 units=0 server=
> adwords.google.com isFault=true faultMessage=Fault occurred while 
> processing.
>
> When digging into the soap_xml.log it seems to throw a 500 Internal Server 
> Error
>
> [Jan 25 2013 18:26:21.000000 - ERROR] POST 
> /api/adwords/cm/v201209/BudgetService HTTP/1.1
>
> Host: adwords.google.com
>
> Connection: Keep-Alive
>
> User-Agent: PHP-SOAP/5.3.15, gzip
>
> Accept-Encoding: gzip, deflate
>
> Content-Encoding: gzip
>
> Content-Type: text/xml; charset=utf-8
>
> SOAPAction: ""
>
> Content-Length: 623
>
> <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="
> http://schemas.xmlsoap.org/soap/envelope/"; xmlns:ns1="
> https://adwords.google.com/api/adwords/cm/v201209";>
>   <SOAP-ENV:Header>
>     <ns1:RequestHeader>
>       <ns1:authToken>*****</ns1:authToken>
>       <ns1:clientCustomerId>123456789</ns1:clientCustomerId>
>       <ns1:developerToken>1563418token</ns1:developerToken>
>       <ns1:userAgent>ZoinedTool (AwApi/3.1.1, php/5.3.15)</ns1:userAgent>
>     </ns1:RequestHeader>
>   </SOAP-ENV:Header>
>   <SOAP-ENV:Body>
>     <ns1:mutate>
>       <ns1:operations>
>         <ns1:operator>ADD</ns1:operator>
>         <ns1:operand>
>           <ns1:name>TestCampaign #5102b22d772b2</ns1:name>
>           <ns1:period>DAILY</ns1:period>
>           <ns1:amount>
>             <ns1:microAmount>50000000</ns1:microAmount>
>           </ns1:amount>
>           <ns1:deliveryMethod>STANDARD</ns1:deliveryMethod>
>         </ns1:operand>
>       </ns1:operations>
>     </ns1:mutate>
>   </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
> HTTP/1.1 500 Internal Server Error
>
> Content-Type: text/xml; charset=UTF-8
>
> Content-Encoding: gzip
>
> Date: Fri, 25 Jan 2013 16:26:18 GMT
>
> Expires: Fri, 25 Jan 2013 16:26:18 GMT
>
> Cache-Control: private, max-age=0
>
> X-Content-Type-Options: nosniff
>
> X-Frame-Options: SAMEORIGIN
>
> X-XSS-Protection: 1; mode=block
>
> Content-Length: 312
>
> Server: GSE
>
> <?xml version="1.0"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>   <soap:Header>
>     <ResponseHeader xmlns="
> https://adwords.google.com/api/adwords/cm/v201209";>
>       <requestId>0004d41f6311eb200ae5442400006b17</requestId>
>       <serviceName>BudgetService</serviceName>
>       <methodName>mutate</methodName>
>       <operations>0</operations>
>       <responseTime>108</responseTime>
>       <units>0</units>
>     </ResponseHeader>
>   </soap:Header>
>   <soap:Body>
>     <soap:Fault>
>       <faultcode>soap:Server</faultcode>
>       <faultstring>Fault occurred while processing.</faultstring>
>     </soap:Fault>
>   </soap:Body>
> </soap:Envelope>
>
>
>
> The code is practically the same as in the example, I only modified it so 
> it actually runs:
>
> <?php
>
>
> require_once 
> ('adwords_api/src/Google/Api/Ads/AdWords/Lib/AdWordsUser.php');
>
>
> function AddCampaign($user) {
>
>       // Get the BudgetService, which loads the required classes.
>   $budgetService = $user->GetService('BudgetService', 'v201209');
>
>   // Create the shared budget (required).
>   $budget = new Budget();
>   $budget->name = 'TestCampaign #' . uniqid();
>   $budget->period = 'DAILY';
>   $budget->amount = new Money(50000000);
>   $budget->deliveryMethod = 'STANDARD';
>
>   $operations = array();
>
>   // Create operation.
>   $operation = new BudgetOperation();
>   $operation->operand = $budget;
>   $operation->operator = 'ADD';
>   $operations[] = $operation;
>
>    // Make the mutate request.
>   $result = $budgetService->mutate($operations);
>
>   $budget = $result->value[0];
>
>   // Get the CampaignService, which loads the required classes.
>   $campaignService = $user->GetService('CampaignService', 'v201209');
>
>   $numCampaigns = 3;
>   $operations = array();
>   for ($i = 0; $i < $numCampaigns; $i++) {
>     // Create campaign.
>     $campaign = new Campaign();
>     $campaign->name = 'TestCampaign #' . uniqid();
>
>     // Set shared budget (required).
>     $campaign->budget = new Budget();
>     $campaign->budget->budgetId = $budget->budgetId;
>
>     // Set bidding strategy (required).
>     $biddingStrategy = new ManualCPC();
>     $biddingStrategy->enhancedCpcEnabled = TRUE;
>     $campaign->biddingStrategy = $biddingStrategy;
>
>     // Set keyword matching setting (required).
>     $keywordMatchSetting = new KeywordMatchSetting();
>     $keywordMatchSetting->optIn = TRUE;
>     $campaign->settings[] = $keywordMatchSetting;
>
>     // Set network targeting (recommended).
>     $networkSetting = new NetworkSetting();
>     $networkSetting->targetGoogleSearch = TRUE;
>     $networkSetting->targetSearchNetwork = TRUE;
>     $networkSetting->targetContentNetwork = TRUE;
>     $campaign->networkSetting = $networkSetting;
>
>     // Set additional settings (optional).
>     $campaign->status = 'ACTIVE';
>     $campaign->startDate = date('Ymd', strtotime('+1 day'));
>     $campaign->endDate = date('Ymd', strtotime('+1 month'));
>     $campaign->adServingOptimizationStatus = 'ROTATE';
>
>     // Set frequency cap (optional).
>     $frequencyCap = new FrequencyCap();
>     $frequencyCap->impressions = 5;
>     $frequencyCap->timeUnit = 'DAY';
>     $frequencyCap->level = 'ADGROUP';
>     $campaign->frequencyCap = $frequencyCap;
>
>     // Display network targeting settings (optional).
>     // It can only be enabled, shown only for demonstration purposes.
>     // If not set this setting is enabled by default on ADD operations.
>     $targetRestrictSetting = new TargetRestrictSetting();
>     $targetRestrictSetting->useAdGroup = TRUE;
>     $campaign->settings[] = $targetRestrictSetting;
>
>     // Set advanced location targeting settings (optional).
>     $geoTargetTypeSetting = new GeoTargetTypeSetting();
>     $geoTargetTypeSetting->positiveGeoTargetType = 'DONT_CARE';
>     $geoTargetTypeSetting->negativeGeoTargetType = 'DONT_CARE';
>     $campaign->settings[] = $geoTargetTypeSetting;
>
>     // Create operation.
>     $operation = new CampaignOperation();
>     $operation->operand = $campaign;
>     $operation->operator = 'ADD';
>     $operations[] = $operation;
>   }
>
>   // Make the mutate request.
>   $result = $campaignService->mutate($operations);
>
>   // Display results.
>   foreach ($result->value as $campaign) {
>     printf("Campaign with name '%s' and id '%s' was added.\n", 
> $campaign->name,
>         $campaign->id);
>   }
> }
>
> try {
>
>     
>     $email = "testemail";
>     $password = "testpassword";
>     $developerToken = "1234654token";
>     $userAgent = "Toolname";
>     $clientId = "123456789";
>
>     //Create User
>     $user = new AdWordsUser(NULL, $email, $password, $developerToken,
>                     $auth, $userAgent, $clientId);
>     $user->LogAll();
>
>     // Run the function
>     AddCampaign($user);
>
> } catch (Exception $e) {
>     printf("An error has occurred: %s\n", $e->getMessage());
> }
> ?>
>
> I've done a getCampaign script with the same try catch and general 
> structure, which returns "no campaigns" as it's supposed to. But now when I 
> try to add something in, it throws these errors.
>
> So yeah, am I doing something awfully wrong here?
> And what should I put in the email and password for this action? I 
> currently have the info of the test account in there, should they be the 
> MCC account's info?
>
> Thanks in advance.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to