Monday, 25 January 2016

Re: ADD ExpressionRuleUserList OPERATION_NOT_SUPPORTED

Hi Ralph,

No worries on the delayed response; I know what it's like to get caught up in code when you've made a breakthrough. It sounds like you'll be an expert on SOAP in no time. If you need any further help, you know where to find us!

Have a wonderful day!
Nadine, AdWords API Team

On Friday, January 22, 2016 at 7:29:00 PM UTC-5, ralph@woopra.com wrote:
Nadine--

Sorry for the delayed response--once this problem was solved i hit the ground running on my AdWords integration.  Everything is working beautifully now, and I was far better able to debug other similar problems I ran into now that I have a better understanding of soap and the xml behind it.

Thank you so much for your detailed explanation!  This soap stuff makes much better sense now! ha ha.  As does the wsdl.  I was using a soap client to compile the xml...not sure why it missed these lines: 

<extension base="cm:Operation">

But now i can check!

I really appreciate you taking the time to teach me this.  Above and beyond...

Thanks again,
--Ralph

On Monday, January 11, 2016 at 1:12:55 PM UTC-8, Nadine Sundquist (AdWords API Team) wrote:
Hi Ralph,

Woohoo!!! I was holding my breath for a possible problem behind that one. I've probably spent a few too many cycles of my life staring at XML, and I've built SOAP XML from scratch before. I've had the same kind of gotcha moment.

What are namespaces?
Namespaces are created in XML to avoid naming conflicts. The closest concept I can reference is a Java package. You can have two classes with the same name in two different Java packages. The way it relates to the AdWords API is that some of our services live in separate namespaces. Sometimes, one service may reference components that come from another namespace. That's what happened to you here.

How do I avoid this in the future?

Option 1
The way we avoid this in the client libraries is that we use tools (such as Apache Axis or Apache CXF for Java) to generate code from the existing WSDLs (definitions of each AdWords API service). I haven't given it a try myself, but there's probably something for js as well.

Option 2
* Short Explanation
If you're checking this manually, you can use a tool to check your XML against the WSDL that we provide. Just Google validate XML against WSDL. There are a couple of options that will come up for free tools. If you're thinking, "What's a WSDL, and where do I find it for the AdWords API?", read on.
* Long Explanation
If you're not using that many services, then you may not want to go through the effort of doing this. However, you want to double-check that you have the right namespaces by manually checking. WSDLs to the rescue! So, let's say you want to check out the AdWordsUserListService. You would go to that page in the documentation for that service, and you would click on the link under Production WSDL. Every service has one of these. You'll notice in the URL, that you'll see the namespace for that service e.g. https://adwords.google.com/api/adwords/rm/v201509/AdwordsUserListService?wsdl has the rm. The targetNamespace is also defined the same way. For your OPERATOR example, Look for OPERATOR in the file. Then work your way up the XML structure until you find a namespace. You'll then bump into the namespace with the cm in it. Rather than eyeballing it, it's nice to have a tool double-check your XML for you.

Happy coding,
Nadine, AdWords API Team

On Friday, January 8, 2016 at 6:50:47 PM UTC-5, ra...@woopra.com wrote:
Holly Shit it worked!  Thank you! Good catch by the way.  How did you find that and how do i avoid this sort of thing in the future?  

What exactly are these namespaces and what's the cm/rm difference?  Are these namespaces built in to soap protocol as just strings to separate services that go over the same http interface? (the url doesn't seem to lead anywhere) Or are the urls actually providing some resource to the soap server to configure it for the request?

I am very new to soap.

Thanks for all the help guys!
--Ralph

On Friday, January 8, 2016 at 7:50:55 AM UTC-8, Nadine Sundquist (AdWords API Team) wrote:
Hi Ralph,

Mike asked me to take a look at this as well to see if I saw anything. I noticed something that may be causing the issue. I believe that you want to change:

to


I'm hoping it's as simple as changing one character.

You mentioned wanting to see what one of the client libraries will output. Here's what Perl outputs; this is only the first part because it's a bit wordy. You can see why I'm thinking a one letter change may make a difference.

 <mutate xmlns="https://adwords.google.com/api/adwords/rm/v201509"> <operations> <operator xmlns="https://adwords.google.com/api/adwords/cm/v201509">ADD</operator> <operand xsi:type="ExpressionRuleUserList"> <name>Expression based user list created at 20160108_103956</name> <description>Users who checked out in six month window OR visited the checkout page with more than one item in their cart</description> <rule> <groups> <items> <StringRuleItem> <key>

Cheers,
Nadine, AdWords API Team

On Thursday, January 7, 2016 at 4:28:39 PM UTC-5, ra...@woopra.com wrote:
Hi Michael--

So I have continued to try this with the admin account on our production adwords account, and I'm always getting these same two errors: [OperatorError.OPERATOR_NOT_SUPPORTED @ operations[0], RequiredError.REQUIRED @ operations[0].operator].  To clarify, I did not get it to work on the test account, I mis-spoke when I said it worked there.  I get these errors when using a test manager account, a production manager account, and a production client account.  I get the user permission denied on a different unused production client account for some reason (possibly because there is no credit card on file for it yet?)  I do not actually have a test client account under my test manager account.  

I think all this about my accounts is accurate, but all the different kinds of accounts and their functionality is pretty complex so I can't be sure ha ha.

I don't think it is a permissions issue as I only have admins on the accounts, and my xml requests look almost exactly like the examples I've found in the docs and from you in this thread.  I am sort of at a loss as to what is going on.  I am considering using one of your client libraries to manually make the call and compare the raw xml to mine as a next step.

If you have any other ideas for what I could try, I'm open to suggestions.

--Ralph

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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+unsubscribe@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+unsubscribe@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/7006f1fe-689e-4a20-b9fd-951c126eb893%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment