Hi, The soap validation is very literal. If in the selector you first specify the dateRange followed by fields, it checks the XSD and see that dateRange is valid as a first element. It then sees fields, but according to the XSD, either paging or ordering must come next, so it throws that error message. You need to make sure you provide the fields in the correct error, but you can omit fields you don't need (as long as the fields you do include are in the right order). Our client libraries should handle this reordering for you - if you are using a client library (the code looks like it might be Ruby?), please file an issue on the client library's issue tracker so we can fix this.
- Kevin Winter AdWords API Team On Wednesday, March 7, 2012 12:34:24 AM UTC-5, TAZZY wrote: > > report_definition = { > :selector => { > :date_range => { > :min => start_date, > :max => end_date > }, > :fields => ['CustomerDescriptiveName', 'ExternalCustomerId', > 'Impressions', 'Clicks', 'Conversions', 'Date', 'ConversionRate', 'Cost', > 'CostPerConversion'] > }, > :report_name => report_name, > :report_type => 'ACCOUNT_PERFORMANCE_REPORT', > :download_format => 'XML', > :date_range_type => 'CUSTOM_DATE' > } > > if fields on report_definition is out of order, then how its working for > rest of clients in mcc. Any of the report fails randomly. now the error has > changed to > Report failed for customer ID ********** with code 400 after 1 > retries.Message : Report download error occured: cvc-complex-type.2.4.a: > Invalid content was found starting with element 'fields'. One of '{" > https://adwords.google.com/api/adwords/cm/v201109":ordering, " > https://adwords.google.com/api/adwords/cm/v201109":paging}' is expected. > Why do i include such fields like ordering, paging, includezeroimpressions > when i actually don't need thenm > > On Tuesday, 6 March 2012 20:38:22 UTC+5:30, Kevin Winter wrote: >> >> Hi, >> You'd need to post your ReportDefinition XML for me to be sure, but it >> sounds like you might be providing the ReportDefinition elements out of >> order. The XML validator is very strict and requires the elements to be >> provided in the order they are defined (see our XSD, published here: >> https://adwords.google.com/api/adwords/reportdownload/v201109/reportDefinition.xsd). >> >> You need to provide your selector as the first element according to the >> XSD. >> >> - Kevin Winter >> AdWords API Team >> >> On Tuesday, March 6, 2012 2:23:35 AM UTC-5, TAZZY wrote: >>> >>> Hey Kevin, >>> m downloading parallel reports for multiple clients in my mcc account. >>> Some reports failing randomly giving 400 error with a message [Report >>> failed for customer ID 5348364015 with code 400 after 1 retries.Message : >>> Report download error occured: cvc-complex-type.2.4.a: Invalid content was >>> found starting with element 'selector'. One of '{" >>> https://adwords.google.com/api/adwords/cm/v201109":creationTime, " >>> https://adwords.google.com/api/adwords/cm/v201109":includeZeroImpressions}' >>> is expected.] >>> >>> in my report_definition, i didn't mention any of creation_time or >>> :includeZeroImpressions. >>> What could be the reason? other reports are working fine with the same >>> report_definition. Why the failing report have this problem? >>> >> -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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