Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of order elements causes error #20

Open
ChrisAlvares opened this issue Jan 29, 2017 · 2 comments
Open

Out of order elements causes error #20

ChrisAlvares opened this issue Jan 29, 2017 · 2 comments

Comments

@ChrisAlvares
Copy link
Owner

ChrisAlvares commented Jan 29, 2017

Having elements outside of the normal adwords order causes issues with the sdk / api.

Test Case

//this will work
let operation = {
    operator: 'ADD',
    operand: {
     ....
    }
}
//this will not work
let operation = {
    operand: {
     ....
    },
    operator: 'ADD',
}

We might need to read the wsdl to determine the order of elements or something. Not really sure how to solve this one as dynamically as possible.

For now, having the elements in the correct order is the workaround.

@ChrisAlvares ChrisAlvares changed the title Out Order of Elements Causes error Out of Order of Elements Causes error Jan 29, 2017
@ChrisAlvares ChrisAlvares changed the title Out of Order of Elements Causes error Out of order elements causes error Jan 29, 2017
@talha-asad
Copy link

talha-asad commented Jan 30, 2017

Yes this is an issue with XML soap requests, order needs to be preserved. I implemented this by reading the WSDL. It's done in my fork of the googleads-node-lib, adwords-api.

I really like the simplicity of this package though and thinking about deprecating that package as it's just too much mess with Backbone models etc.

I think mentioning that order needs to be preserved in readme, is good enough for now.

@ChrisAlvares
Copy link
Owner Author

ChrisAlvares commented Jan 30, 2017

I will put it in the readme, but I think reading the wsdl might be a good thing. Perhaps even caching it in the package like we do here: https://github.com/ChrisAlvares/node-adwords/blob/master/services.js

You don't necessarily need to read the WSDL as the documentation has everything in the correct order as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants