Hello,

I apologize for the long delay in response. You should define your 
xmlns:ns0 on the soap:Envelope element, not on the RequestHeader. Note that 
the ns0:operator isn't within the RequestHeader, so that definition would 
be lost by the time you get to that part of the XML. Moving it up a level 
will ensure the definition is still found.

Regards,
Mike, AdWords API Team

On Friday, December 18, 2015 at 7:38:24 PM UTC-5, ra...@woopra.com wrote:
>
> Giving this a try.  Still working on it but the first attempts have given 
> me Unmarshalling errors i think due to "prefix unbound" right at the end of 
> <ns0:operator>:
>  
> <soap:Envelope 
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Unmarshalling
>  
> Error: ParseError at [row,col]:[1,761]\nMessage: 
> http://www.w3.org/TR/1999/REC-xml-names-19990114#ElementPrefixUnbound?ns0&amp;ns0:operator
>  
> </faultstring></soap:Fault></soap:Body></soap:Envelope>
>
> This is my first time interacting with soap api so Im not sure if this 
> could be related to my envelope being off or what.  Trying more things now. 
>  
>
> Oh here's the whole request btw in case you can spot something faster: 
>
> Ok something is wrong because my xml formatter throws the same error so 
> here it is raw:
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";  xmlns:tns="
> https://adwords.google.com/api/adwords/rm/v201509"; xmlns:jaxb="
> http://java.sun.com/xml/ns/jaxb"; xmlns:cm="
> https://adwords.google.com/api/adwords/cm/v201509";
> ><soap:Header><ns0:RequestHeader xmlns:ns0="
> https://adwords.google.com/api/adwords/rm/v201509"; xmlns="
> https://adwords.google.com/api/adwords/rm/v201509";><ns0:userAgent>
> Woopra:AppConnect:getTrackers</ns0:userAgent><ns0:developerToken>XXXXX
> </ns0:developerToken><ns0:clientCustomerId>4579826953
> </ns0:clientCustomerId></ns0:RequestHeader></soap:Header><soap:Body><mutate 
> xmlns="https://adwords.google.com/api/adwords/rm/v201509";
> ><operations><ns0:operator>ADD</ns0:operator><operand xsi:type=
> "ExpressionRuleUserList"><name>Woopra_test_label_Id</name><description>This 
> User List has been created to mirror the woopra label.
> </description><integrationCode>test_label_Id
> </integrationCode><rule><groups><items><StringRuleItem><key><name>
> Woopra_test_label_Id</name></key><op>EQUALS</op><value>true
> </value></StringRuleItem></items></groups></rule></operand></operations></mutate></soap:Body></soap:Envelope>
>
>
>
>
>
> On Thursday, December 17, 2015 at 3:01:08 PM UTC-8, ra...@woopra.com 
> wrote:
>>
>> Hi Mike--
>>
>> I got my client to build a request that looks just like yours, but now 
>> i'm getting the error about being unable to construct a ruleItem because it 
>> is abstract:
>>
>> Cannot construct an instance of com.google.ads.api.services.datax.
>> userlists.rule.RuleItem because it is abstract.  You are probably 
>> missing an @Uses annotation while invoking public abstract com.google.ads
>> .api.services.datax.userlists.UserListReturnValue com.google.ads.api.
>> services.datax.adwordsuserlist.AdwordsUserListService.mutate(java.util.
>> List) throws com.google.ads.api.services.common.error.ApiException with 
>> params [[com.google.ads.api.services.datax.adwordsuserlist.v201509.
>> jaxbgen.UserListOperation@47c87410]].
>>
>> I've seen your answers to a couple other posts about similar statements, 
>> but the format of the xml requests in the answers in those threads are 
>> different enough that I can't adapt them to my own.  Here is the body of my 
>> request fixed to look like yours:
>>
>>
>>   <soap:Body>
>>       <mutate xmlns="https://adwords.google.com/api/adwords/rm/v201509";>
>>          <operations>
>>             <operator>ADD</operator>
>>             <operand xsi:type="ExpressionRuleUserList">
>>                <name>Woopra_test_label_Id</name>
>>                <integrationCode>test_label_Id</integrationCode>
>>                <rule>
>>                   <groups>
>>                      <items xsi:type="StringRuleItem">
>>                         <key>
>>                            <name>Woopra_test_label_Id</name>
>>                         </key>
>>                         <op>EQUALS</op>
>>                         <value>true</value>
>>                      </items>
>>                   </groups>
>>                </rule>
>>             </operand>
>>          </operations>
>>       </mutate>
>>    </soap:Body>
>>
>>
>>
>> thanks
>> --Ralph
>>
>>
>> On Wednesday, December 16, 2015 at 7:01:17 AM UTC-8, Michael Cloonan 
>> (AdWords API Team) wrote:
>>>
>>> Hello,
>>>
>>> Rather than have a tag <ExpressionRuleUserList>, you should have 
>>> <operand xsi:type="ExpressionRuleUserList">. The fields for the 
>>> ExpressionRuleUserList go directly within the operand. Similarly, instead 
>>> of <StringRuleItem>, you should have <items xsi:type="StringRuleItem">, and 
>>> then the StringRuleItem attributes go directly within the <items> tag. Just 
>>> to make it cleaner, you should also remove the <id> altogether, rather than 
>>> specifying it as nil.
>>>
>>> I am confused about why you're getting an error pointing to the 
>>> operator, but hopefully cleaning up the operand to have the correct format 
>>> by following the instructions above will fix it anyway.
>>>
>>> Just to be clear, the SOAP body you posted most recently, with 
>>> corrections, should look like this:
>>>
>>>  <soap:Body>
>>>       <mutate xmlns="https://adwords.google.com/api/adwords/rm/v201509";>
>>>          <operations>
>>>             <operator>ADD</operator>
>>>             <operand xsi:type="ExpressionRuleUserList">
>>>                <name>Woopra Label: test-label-Id</name>
>>>                <integrationCode>test-label-Id</integrationCode>
>>>                <rule>
>>>                   <groups>
>>>                      <items xsi:type="StringRuleItem">
>>>                         <key>Woopra_Label-test-label-Id</key>
>>>                         <op>EQUALS</op>
>>>                         <value>true</value>
>>>                      </items>
>>>                   </groups>
>>>                </rule>
>>>             </operand>
>>>          </operations>
>>>       </mutate>
>>>    </soap:Body>
>>>
>>> Regards,
>>> Mike, AdWords API Team
>>>
>>>
>>> On Wednesday, December 16, 2015 at 2:28:48 AM UTC-5, ra...@woopra.com 
>>> wrote:
>>>>
>>>> Ok I have tried probably 30 combinations now.  I still get the same 
>>>> error: 
>>>>
>>>> `[OperatorError.OPERATOR_NOT_SUPPORTED @ operations[0], 
>>>> RequiredError.REQUIRED @ operations[0].operator]`
>>>>
>>>> Unless I mess up the whole operation in which case it adds to the 
>>>> errors list: `RequiredError.REQUIRED @ operations[0].operand` Which 
>>>> happens 
>>>> when I try and wrap the operator/operand pair in another object like 
>>>> "UserListOperation"
>>>> So what this means to me is that the operand is not being read 
>>>> correctly.
>>>>
>>>> I'm not sure exactly what you meant by "You need to use the 
>>>> ExpressionRuleUserList 
>>>> <https://developers.google.com/adwords/api/docs/reference/v201509/AdwordsUserListService.ExpressionRuleUserList>
>>>>  to 
>>>> add the RuleItem 
>>>> <https://developers.google.com/adwords/api/docs/reference/v201509/AdwordsUserListService.RuleItem>
>>>>  instead 
>>>> of the RuleBasedUserList 
>>>> <https://developers.google.com/adwords/api/docs/reference/v201509/AdwordsUserListService.RuleBasedUserList>."
>>>>  
>>>> Perhaps you can make your suggestions directly on the xml that I send so 
>>>> that i can figure out how to get that output from my soap client?  But 
>>>> since no matter what I do to the operand the error says the same thing 
>>>> about the operator, I feel like there is something wrong there.  should it 
>>>> be literally "<ADD />" or "ADD" or what?  There isn't much room to play 
>>>> with the operator though...that's the flaw in my theory. :)
>>>>
>>>> Here's just the body of a cleaner attempt:
>>>>
>>>>  <soap:Body>
>>>>       <mutate xmlns="https://adwords.google.com/api/adwords/rm/v201509";>
>>>>          <operations>
>>>>             <operator>ADD</operator>
>>>>             <operand>
>>>>                <ExpressionRuleUserList>
>>>>                   <id xsi:nil="true" />
>>>>                   <name>Woopra Label: test-label-Id</name>
>>>>                   <integrationCode>test-label-Id</integrationCode>
>>>>                   <rule>
>>>>                      <groups>
>>>>                         <items>
>>>>                            <StringRuleItem>
>>>>                               <key>Woopra_Label-test-label-Id</key>
>>>>                               <op>EQUALS</op>
>>>>                               <value>true</value>
>>>>                            </StringRuleItem>
>>>>                         </items>
>>>>                      </groups>
>>>>                   </rule>
>>>>                </ExpressionRuleUserList>
>>>>             </operand>
>>>>          </operations>
>>>>       </mutate>
>>>>    </soap:Body>
>>>>
>>>>
>>>>
>>>> Thanks again
>>>> --Ralph
>>>>
>>>>
>>>> On Tuesday, December 15, 2015 at 9:33:57 AM UTC-8, Umesh Dengale wrote:
>>>>>
>>>>> Hi Ralph,
>>>>>
>>>>> Thanks for providing the SOAP XML request. The RuleItem is associated 
>>>>> with DateSpecificRuleUserList 
>>>>> <https://developers.google.com/adwords/api/docs/reference/v201509/AdwordsUserListService.DateSpecificRuleUserList>
>>>>>  and ExpressionRuleUserList 
>>>>> <https://developers.google.com/adwords/api/docs/reference/v201509/AdwordsUserListService.ExpressionRuleUserList>.
>>>>>  
>>>>> You need to use the ExpressionRuleUserList 
>>>>> <https://developers.google.com/adwords/api/docs/reference/v201509/AdwordsUserListService.ExpressionRuleUserList>
>>>>>  to 
>>>>> add the RuleItem 
>>>>> <https://developers.google.com/adwords/api/docs/reference/v201509/AdwordsUserListService.RuleItem>
>>>>>  instead 
>>>>> of the RuleBasedUserList 
>>>>> <https://developers.google.com/adwords/api/docs/reference/v201509/AdwordsUserListService.RuleBasedUserList>
>>>>> .
>>>>> I will submit a feature request for node/js client library.
>>>>>
>>>>> Thanks,
>>>>> Umesh, AdWords API Team.
>>>>>
>>>>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/0159e410-4a13-4b25-af44-36cf9a5a9ec0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to