Ah -duh! - don't know why I didn't try that... Thanks, Michael! On Friday, May 8, 2015 at 12:02:55 PM UTC-5, Michael Cloonan (AdWords API Team) wrote: > > Hello, > > I believe that you need a UrlList with no URLs, rather than setting to > null directly. > > Try changing this line: > bagc.setFinalMobileUrls(null); > > To this: > bagc.setFinalMobileUrls(new UrlList(new String[])); > > If this still fails, let me know and I can look into it further. > > Regards, > Mike, AdWords API Team > > On Thursday, May 7, 2015 at 8:08:07 PM UTC-4, mm wrote: >> >> Hey guys - >> I'm trying to set a tracking template and finalURL on a keyword. I am >> explicitly setting the finalMobileUrls to null, yet when I attempt the >> update, I get the UrlError.MISSING_PROTOCOL for the non-existent mobile >> url. This is using the v201502 java client (googleads-java-lib-v1.38.0, >> specifically). >> >> The code: >> >> Criterion keyword = new Criterion(); >> keyword.setId( Long.parseLong( k.getId().getKeywordId() ) ); >> >> BiddableAdGroupCriterion bagc = new >> BiddableAdGroupCriterion(); >> bagc.setAdGroupId( Long.parseLong( k.getId().getAdGroupId()) >> ); >> bagc.setCriterion( keyword ); >> //If there used to be a destURL value, an empty string tells >> adwords to get rid of it >> bagc.setDestinationUrl(""); >> >> bagc.setTrackingUrlTemplate(k.getTrackingTemplate()==null?"":k.getTrackingTemplate()); >> if (k.getFinalURL()==null) { >> bagc.setFinalUrls(null); >> } else { >> bagc.setFinalUrls(new UrlList(new >> String[]{k.getFinalURL()})); >> } >> if (k.getFinalMobileURL()==null) { >> bagc.setFinalMobileUrls(null); >> } else { >> bagc.setFinalMobileUrls(new UrlList(new >> String[]{k.getFinalMobileURL()})); >> } >> >> And the resulting soap request: >> >> <soapenv:Body> >> <mutate xmlns="https://adwords.google.com/api/adwords/cm/v201502"> >> <operations> >> <operator>SET</operator> >> <operand xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201502" >> xsi:type="ns2:BiddableAdGroupCriterion"> >> <adGroupId>21999324732</adGroupId> >> <criterion> >> <id>142938960012</id> >> </criterion> >> <destinationUrl/> >> <finalUrls> >> <urls> >> http://www.myhotel.com/chicago/promoCode={_promoCode}?kwid={_kwid}</urls> >> </finalUrls> >> <finalMobileUrls> >> <urls/> >> </finalMobileUrls> >> <trackingUrlTemplate> >> http://tracking.deepsearch.adlucent.com/adlucent/Redirector?kwid={_kwid}&adid={creative}&device={device}&retailer=delventosdoodles&url={lpurl} >> </trackingUrlTemplate> >> <urlCustomParameters> >> <parameters> >> <key>kwid</key> >> <value>217ad6637be843f3810916685e2e82c7</value> >> </parameters> >> <parameters> >> <key>promoCode</key> >> <value>chi55893</value> >> </parameters> >> <parameters> >> <key>season</key> >> <value>Fall_getaway</value> >> </parameters> >> </urlCustomParameters> >> </operand> >> </operations> >> </mutate> >> </soapenv:Body> >> >> And the response: >> <soap:Header> >> <ResponseHeader xmlns=" >> https://adwords.google.com/api/adwords/cm/v201502"> >> <requestId>000515869d2114280ab612c5320067a4</requestId> >> <serviceName>AdGroupCriterionService</serviceName> >> <methodName>mutate</methodName> >> <operations>1</operations> >> <responseTime>101</responseTime> >> </ResponseHeader> >> </soap:Header> >> <soap:Body> >> <mutateResponse xmlns=" >> https://adwords.google.com/api/adwords/cm/v201502"> >> <rval> >> >> <ListReturnValue.Type>AdGroupCriterionReturnValue</ListReturnValue.Type> >> <value> >> >> <AdGroupCriterion.Type>AdGroupCriterion</AdGroupCriterion.Type> >> </value> >> <partialFailureErrors xmlns:xsi=" >> http://www.w3.org/2001/XMLSchema-instance" xsi:type="UrlError"> >> >> <fieldPath>operations[0].operand.finalMobileUrls.urls[0]</fieldPath> >> <trigger/> >> <errorString>UrlError.MISSING_PROTOCOL</errorString> >> <ApiError.Type>UrlError</ApiError.Type> >> <reason>MISSING_PROTOCOL</reason> >> </partialFailureErrors> >> </rval> >> </mutateResponse> >> </soap:Body> >> >> Is there some other way I should be indicating that there are no >> finalMobileUrls? >> >> Thanks - >> mm >> >
-- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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. Visit this group at http://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/d57260cd-82d0-4b55-a0ac-82e252147ff1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.