The field is read-only, so I would expect that it would be set after
calling addCriterion(), but it is not set (using the v5 sandbox).
Is this expected? Or should this value be set?
I don't quite understand what you mean by saying the "field is
read-only" and saying that it's "not set". What is the actual XML
that you're sending and getting back for this keyword?
Rich.
--
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Internet Marketing and AdWords courses - http://merjis.com/courses - NEW!
Merjis blog - http://blog.merjis.com - NEW!
For this WSDL entry (e.g., TrafficEstimatorService.KeywordRequest):
<element name="id" minOccurs="0" maxOccurs="1" type="long" />
I get
private long idField;
private bool idFieldSpecified;
But for this WSDL entry (e.g., CriterionService.Keyword):
<element name="minCpc" nillable="true" minOccurs="0" type="xsd:long"
/>
I get
private System.Nullable<long> minCpcField;
private bool minCpcFieldSpecified;
In the first case, I need to respect and set the idFieldSpecified field
when setting idField, otherwise the soap request does not render out
the corresponding idField.
In the second case, I was expecting similar behavior, so I was looking
to the minCpcFieldSpecified field to see if it was true. In this case,
the minCpcFieldSpecified value was false, even though the minCpcField
was non-null and contained a value (and I was just inspecting the
*Specified field to see if there was a value).
So....
.Net is very specific and literal in generating proxies over WSDL,
leading to some odd client experiences, and Google uses a slightly
different WSDL construct for something that users (at least I) expect
to operate the same (here, an optional long field).
Perhaps nothing to be done here, but it did trip me up for a bit.