Hello,

The only thing I can think of if the request works on a test account but 
not on your production account is that possibly you actually don't have 
write permissions on your production account. Are you able to make mutate 
calls on any other services, or do you get this error on every mutate call 
for this account? You may have to regenerate your refresh token from an 
account that has full admin permissions.

Regards,
Mike, AdWords API Team

On Tuesday, January 5, 2016 at 6:41:14 PM UTC-5, ra...@woopra.com wrote:
>
> HI Michael--
> No problem! I was out of town too.  Happy New Year!
>
> I fixed the unmarshalling issue, and on my test account, I finally got the 
> error I was expecting: "AuthorizationError.USER_PERMISSION_DENIED"
>
> However when i switched over to make the call on our production account, 
> It went back to the same error: "[OperatorError.OPERATOR_NOT_SUPPORTED @ 
> operations[0], RequiredError.REQUIRED @ operations[0].operator]"
>
>
> My soap client does not seem to allow me to add custom attributes to the 
> envelope but I added the ns0 on the operations tag.  (Also adding 
> validateOnly as testing on production account now.
> Here was my request:
>
> <?xml version="1.0" encoding="UTF-8"?><soap:Envelope 
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:cm="https://adwords.google.com/api/adwords/cm/v201509"; 
> xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"; 
> xmlns:tns="https://adwords.google.com/api/adwords/rm/v201509"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>    <soap:Header>
>       <ns1:RequestHeader 
> xmlns:ns1="https://adwords.google.com/api/adwords/rm/v201509"; 
> xmlns="https://adwords.google.com/api/adwords/rm/v201509";>
>          <ns1:userAgent>Woopra:AppConnect:getTrackers</ns1:userAgent>
>          <ns1:developerToken>XXX</ns1:developerToken>
>          <ns1:clientCustomerId>XXX</ns1:clientCustomerId>
>          <ns1:validateOnly>true</ns1:validateOnly>
>       </ns1:RequestHeader>
>    </soap:Header>
>    <soap:Body>
>       <mutate xmlns="https://adwords.google.com/api/adwords/rm/v201509";>
>          <operations 
> xmlns:ns0="https://adwords.google.com/api/adwords/rm/v201509";>
>             <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>
>
>
>
> Sorry for all this.  I really do wish there was a node library...
> --Ralph
>
> On Monday, January 4, 2016 at 6:52:39 AM UTC-8, Michael Cloonan (AdWords 
> API Team) wrote:
>
> 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:
>
> ...

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/a29ca92f-5650-48c1-8d65-63d7bedbc5ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to