Hey AdWords Team,

The software I'm working on attempts to test changes to keywords using
validateOnly before making the real operation. This way if any of the
operations fail with policy violation errors the proper exemption
requests can be supplied. I noticed that something strange was
happening and it appeared that validateOnly did not have any effect.
So I put together a simple example for you guys. The operation
attempts to remove one keyword with validate only. Then it attempts a
second remove operation without validate only. The first operation
actually removes the keyword, whilst the second one fails because the
first removed it. Perhaps I am misunderstanding the purpose of
validateOnly. I had assumed if it was used any and all operations
supplied would only be tested and not executed. I've provided below
the soap_xml.log data. If you could let me know if this is an issue on
your end that will be resolved or if I need to change what I am doing
I would be very grateful.

Thanks,

Peter

[2012-01-16 11:45:51,862::WARNING::AwApi-Python-15.1.4] StartTime:
2012-01-16 11:45:50
*** Outgoing HTTP headers
**********************************************
POST /api/adwords/cm/v201101/AdGroupCriterionService HTTP/1.0
Host:adwords.google.com
User-agent:SOAPpy 0.12.0 (pywebsvcs.sf.net),gzip
XML-parser: xml.etree.cElementTree v1.0.6
Content-type:text/xml; charset="UTF-8"
Content-length:2356
SOAPAction:"mutate"
************************************************************************
*** Outgoing SOAP
******************************************************
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
  xmlns:xsi3="http://www.w3.org/2001/XMLSchema-instance";
  >
  <SOAP-ENV:Header xmlns="https://adwords.google.com/api/adwords/cm/
v201101" xmlns:cm="https://adwords.google.com/api/adwords/cm/v201101";>
    <RequestHeader>
      <cm:developerToken>xxxxxxxxxxxxxxxxxxxxx</cm:developerToken>
      <cm:validateOnly>True</cm:validateOnly>
      <cm:userAgent>AwApi-Python-15.1.4|Test Client</cm:userAgent>
      <cm:authToken>xxxxxxxxxxxxxxxxxxxx</cm:authToken>
    </RequestHeader>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201101";
xmlns:cm="https://adwords.google.com/api/adwords/cm/v201101";>
      <operations xsi3:type="cm:AdGroupCriterionOperation">
        <cm:operator>ADD</cm:operator>
        <cm:operand xsi3:type="cm:BiddableAdGroupCriterion">
          <cm:adGroupId>2737275975</cm:adGroupId>
          <cm:criterion xsi3:type="cm:Keyword">
            <cm:id>2908392767</cm:id>
            <cm:text>storing fresh basil food</cm:text>
            <cm:matchType>BROAD</cm:matchType>
          </cm:criterion>
          <cm:userStatus>ACTIVE</cm:userStatus>
          <cm:bids xsi3:type="cm:ManualCPCAdGroupCriterionBids">
            <cm:maxCpc xsi3:type="cm:Bid">
              <cm:amount xsi3:type="cm:Money">
                <cm:microAmount>0</cm:microAmount>
              </cm:amount>
            </cm:maxCpc>
          </cm:bids>
        </cm:operand>
      </operations>
      <operations xsi3:type="cm:AdGroupCriterionOperation">
        <cm:operator>REMOVE</cm:operator>
        <cm:operand xsi3:type="cm:BiddableAdGroupCriterion">
          <cm:adGroupId>2737275975</cm:adGroupId>
          <cm:criterion xsi3:type="cm:Keyword">
            <cm:id>2908392767</cm:id>
            <cm:text>storing fresh basil</cm:text>
            <cm:matchType>BROAD</cm:matchType>
          </cm:criterion>
          <cm:userStatus>ACTIVE</cm:userStatus>
          <cm:bids xsi3:type="cm:ManualCPCAdGroupCriterionBids">
            <cm:maxCpc xsi3:type="cm:Bid">
              <cm:amount xsi3:type="cm:Money">
                <cm:microAmount>0</cm:microAmount>
              </cm:amount>
            </cm:maxCpc>
          </cm:bids>
        </cm:operand>
      </operations>
    </mutate>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
************************************************************************
*** Incoming HTTP headers
**********************************************
HTTP/1.? 200 OK
Content-Type: text/xml; charset=UTF-8
Date: Mon, 16 Jan 2012 02:46:02 GMT
Expires: Mon, 16 Jan 2012 02:46:02 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
************************************************************************
*** Incoming SOAP
******************************************************
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
  <soap:Header>
    <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/
v201101">
      <requestId>0004b69c3716f3580a42534200003e73</requestId>
      <operations>2</operations>
      <responseTime>378</responseTime>
      <units>16</units>
    </ResponseHeader>
  </soap:Header>
  <soap:Body>
    <mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/
v201101">
      <rval>
        <ListReturnValue.Type>AdGroupCriterionReturnValue</
ListReturnValue.Type>
        <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:type="BiddableAdGroupCriterion">
          <adGroupId>2737275975</adGroupId>
          <criterion xsi:type="Keyword">
            <id>31158801615</id>
            <Criterion.Type>Keyword</Criterion.Type>
            <text>storing fresh basil food</text>
            <matchType>BROAD</matchType>
          </criterion>
          <AdGroupCriterion.Type>BiddableAdGroupCriterion</
AdGroupCriterion.Type>
          <userStatus>ACTIVE</userStatus>
          <systemServingStatus>RARELY_SERVED</systemServingStatus>
          <approvalStatus>PENDING_REVIEW</approvalStatus>
          <bids xsi:type="ManualCPCAdGroupCriterionBids">
            <AdGroupCriterionBids.Type>ManualCPCAdGroupCriterionBids</
AdGroupCriterionBids.Type>
            <maxCpc>
              <amount>
                <ComparableValue.Type>Money</ComparableValue.Type>
                <microAmount>1000000</microAmount>
              </amount>
            </maxCpc>
            <bidSource>ADGROUP</bidSource>
          </bids>
          <firstPageCpc>
            <amount>
              <ComparableValue.Type>Money</ComparableValue.Type>
              <microAmount>450000</microAmount>
            </amount>
          </firstPageCpc>
          <qualityInfo>
            <qualityScore>4</qualityScore>
          </qualityInfo>
        </value>
        <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:type="BiddableAdGroupCriterion">
          <adGroupId>2737275975</adGroupId>
          <criterion xsi:type="Keyword">
            <id>2908392767</id>
            <Criterion.Type>Keyword</Criterion.Type>
            <text>storing fresh basil</text>
            <matchType>BROAD</matchType>
          </criterion>
          <AdGroupCriterion.Type>BiddableAdGroupCriterion</
AdGroupCriterion.Type>
        </value>
      </rval>
    </mutateResponse>
  </soap:Body>
</soap:Envelope>
************************************************************************
EndTime: 2012-01-16 11:45:51
[2012-01-16 11:49:05,164::WARNING::AwApi-Python-15.1.4] StartTime:
2012-01-16 11:49:04
*** Outgoing HTTP headers
**********************************************
POST /api/adwords/cm/v201101/AdGroupCriterionService HTTP/1.0
Host:adwords.google.com
User-agent:SOAPpy 0.12.0 (pywebsvcs.sf.net),gzip
XML-parser: xml.etree.cElementTree v1.0.6
Content-type:text/xml; charset="UTF-8"
Content-length:2295
SOAPAction:"mutate"
************************************************************************
*** Outgoing SOAP
******************************************************
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
  xmlns:xsi3="http://www.w3.org/2001/XMLSchema-instance";
  >
  <SOAP-ENV:Header xmlns="https://adwords.google.com/api/adwords/cm/
v201101" xmlns:cm="https://adwords.google.com/api/adwords/cm/v201101";>
    <RequestHeader>
      <cm:developerToken>xxxxxxxxxxxxxxxxxxxx</cm:developerToken>
      <cm:userAgent>AwApi-Python-15.1.4|Test Client</cm:userAgent>
      <cm:authToken>xxxxxxxxxxxxxxxxxxxx</cm:authToken>
    </RequestHeader>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201101";
xmlns:cm="https://adwords.google.com/api/adwords/cm/v201101";>
      <operations xsi3:type="cm:AdGroupCriterionOperation">
        <cm:operator>ADD</cm:operator>
        <cm:operand xsi3:type="cm:BiddableAdGroupCriterion">
          <cm:adGroupId>2737275975</cm:adGroupId>
          <cm:criterion xsi3:type="cm:Keyword">
            <cm:id>2908392767</cm:id>
            <cm:text>storing fresh basil food</cm:text>
            <cm:matchType>BROAD</cm:matchType>
          </cm:criterion>
          <cm:userStatus>ACTIVE</cm:userStatus>
          <cm:bids xsi3:type="cm:ManualCPCAdGroupCriterionBids">
            <cm:maxCpc xsi3:type="cm:Bid">
              <cm:amount xsi3:type="cm:Money">
                <cm:microAmount>0</cm:microAmount>
              </cm:amount>
            </cm:maxCpc>
          </cm:bids>
        </cm:operand>
      </operations>
      <operations xsi3:type="cm:AdGroupCriterionOperation">
        <cm:operator>REMOVE</cm:operator>
        <cm:operand xsi3:type="cm:BiddableAdGroupCriterion">
          <cm:adGroupId>2737275975</cm:adGroupId>
          <cm:criterion xsi3:type="cm:Keyword">
            <cm:id>2908392767</cm:id>
            <cm:text>storing fresh basil</cm:text>
            <cm:matchType>BROAD</cm:matchType>
          </cm:criterion>
          <cm:userStatus>ACTIVE</cm:userStatus>
          <cm:bids xsi3:type="cm:ManualCPCAdGroupCriterionBids">
            <cm:maxCpc xsi3:type="cm:Bid">
              <cm:amount xsi3:type="cm:Money">
                <cm:microAmount>0</cm:microAmount>
              </cm:amount>
            </cm:maxCpc>
          </cm:bids>
        </cm:operand>
      </operations>
    </mutate>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
************************************************************************
*** Incoming HTTP headers
**********************************************
HTTP/1.? 500 Internal Server Error
Content-Type: text/xml; charset=UTF-8
Date: Mon, 16 Jan 2012 02:49:16 GMT
Expires: Mon, 16 Jan 2012 02:49:16 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
************************************************************************
*** Incoming SOAP
******************************************************
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
  <soap:Header>
    <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/
v201101">
      <requestId>0004b69c42a0bb500a42488700006fee</requestId>
      <operations>1</operations>
      <responseTime>347</responseTime>
      <units>1</units>
    </ResponseHeader>
  </soap:Header>
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>[EntityNotFound.INVALID_ID @
operations[1].operand.criterion.id; trigger:'2908392767']</
faultstring>
      <detail>
        <ApiExceptionFault xmlns="https://adwords.google.com/api/
adwords/cm/v201101">
          <message>[EntityNotFound.INVALID_ID @
operations[1].operand.criterion.id; trigger:'2908392767']</message>
          <ApplicationException.Type>ApiException</
ApplicationException.Type>
          <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" xsi:type="EntityNotFound">
            <fieldPath>operations[1].operand.criterion.id</fieldPath>
            <trigger>2908392767</trigger>
            <errorString>EntityNotFound.INVALID_ID</errorString>
            <ApiError.Type>EntityNotFound</ApiError.Type>
            <reason>INVALID_ID</reason>
          </errors>
        </ApiExceptionFault>
      </detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>
************************************************************************
EndTime: 2012-01-16 11:49:05

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [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=en

Reply via email to