Hi Matt,
Thank you for contacting support. However, your question appears to be more
related to the Java client library. You may reach out to the client library
owners directly via this link
<https://github.com/googleads/googleads-java-lib/issues> for further
assistance.
Best regards,
Peter
Google Ads API Team
On 05/11/19 10:01:44 [email protected] wrote:
Hello,
I am trying to create a Selector like so:
String[] adGroupIds = {"123", "234"};
SelectorBuilder builder = new SelectorBuilder();
Selector selector = builder
.fields(AdGroupField.values())
.in(AdGroupField.Id, adGroupIds)
.offset(offset)
.limit(pageSize)
.build();
However when I pass the Selector to the AdGroupServiceInterface I get an
INVALID_PREDICATE_VALUE and the resulting SOAP request seems to be
malformed:
<predicates>
<field>Id</field>
<operator>IN</operator>
<values>123,234</values>
</predicates>
Furthermore, if I change the .in() method to use a varargs instead
everything works as expected:
SelectorBuilder builder = new SelectorBuilder();
Selector selector = builder
.fields(AdGroupField.values())
.in(AdGroupField.Id, "123", "234")
.offset(offset)
.limit(pageSize)
.build();
and I get the proper SOAP request:
<predicates>
<field>Id</field>
<operator>IN</operator>
<values>123</values>
<values>234</values>
</predicates>
I was under the assumption that Java treated varargs the exact same as
arrays but something seems to be different here.
Any help would be greatly appreciated.
Thanks!
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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
---
You received this message because you are subscribed to the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/632e47ab-7a2d-4ce2-81af-65c98d4efc59%40googlegroups.com
<https://groups.google.com/d/msgid/adwords-api/632e47ab-7a2d-4ce2-81af-65c98d4efc59%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/18ia110000000000090ckm000o2aiew6cmjee9o6so30c1g68r34dpn%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.