Hi,
We have a SOAP request for campaign criterion.
We reuest with a page size of 5000, the response comes back with 45
criterion, but says there are 47 in total.
So our paging logic then makes a second request for 5000 items with a
startIndex of 45. The response comes back with 0 records, but still
says the total is 47.
This looks like a bug to us, the API is mis-reporting the total
records. Or is there an explaination for this?

Request 1
------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
<SOAP-ENV:Header>
<RequestHeader xmlns="https://adwords.google.com/api/adwords/cm/
v201109">
<authToken xsi:type="xsd:string">XXX</authToken>
<userAgent xsi:type="xsd:string">XXX</userAgent>
<developerToken xsi:type="xsd:string">XXX</developerToken>
</RequestHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<get xmlns="https://adwords.google.com/api/adwords/cm/v201109";>
<serviceSelector>
<fields>CampaignId</fields>
<fields>Id</fields>
<fields>KeywordText</fields>
<fields>KeywordMatchType</fields>
<predicates>
<field>CampaignId</field>
<operator>IN</operator>
<values>60237040</values>
</predicates>
<paging>
<startIndex>0</startIndex>
<numberResults>5000</numberResults>
</paging>
</serviceSelector>
</get>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response 1
------------------------------------------------
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
<soap:Header>
<ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/
v201109">
<requestId>0004b8f5b23ac1800a345b3200003914</requestId>
<serviceName>CampaignCriterionService</serviceName>
<methodName>get</methodName>
<operations>45</operations>
<responseTime>194</responseTime>
<units>45</units>
</ResponseHeader>
</soap:Header>
<soap:Body>
<getResponse xmlns="https://adwords.google.com/api/adwords/cm/
v201109">
<rval>
<totalNumEntries>47</totalNumEntries>
<Page.Type>CampaignCriterionPage</Page.Type>
<entries>
....
(45 <entries>)
....
</entries>
</rval>
</getResponse>
</soap:Body>
</soap:Envelope>

Request 2
------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
<SOAP-ENV:Header>
<RequestHeader xmlns="https://adwords.google.com/api/adwords/cm/
v201109">
<authToken xsi:type="xsd:string">XXX</authToken>
<userAgent xsi:type="xsd:string">XXX</userAgent>
<developerToken xsi:type="xsd:string">XXX</developerToken>
</RequestHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<get xmlns="https://adwords.google.com/api/adwords/cm/v201109";>
<serviceSelector>
<fields>CampaignId</fields>
<fields>Id</fields>
<fields>KeywordText</fields>
<fields>KeywordMatchType</fields>
<predicates>
<field>CampaignId</field>
<operator>IN</operator>
<values>60237040</values>
</predicates>
<paging>
<startIndex>45</startIndex>
<numberResults>5000</numberResults>
</paging>
</serviceSelector>
</get>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Response 2
------------------------------------------------
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
<soap:Header>
<ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/
v201109">
<requestId>0004b8f5b23f2e500a3442f100000cc4</requestId>
<serviceName>CampaignCriterionService</serviceName>
<methodName>get</methodName>
<operations>1</operations>
<responseTime>129</responseTime>
<units>1</units>
</ResponseHeader>
</soap:Header>
<soap:Body>
<getResponse xmlns="https://adwords.google.com/api/adwords/cm/
v201109">
<rval>
<totalNumEntries>47</totalNumEntries>
<Page.Type>CampaignCriterionPage</Page.Type>
</rval>
</getResponse>
</soap:Body>
</soap:Envelope>

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

Reply via email to