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

OfflineDataUploadService doesn't seem to be implemented. #228

Closed
stevewilhelm opened this issue Oct 5, 2017 · 6 comments
Closed

OfflineDataUploadService doesn't seem to be implemented. #228

stevewilhelm opened this issue Oct 5, 2017 · 6 comments

Comments

@stevewilhelm
Copy link

The OfflineDataUploadService and OfflineData do not seem to be implemented.

See the following for details:
https://developers.google.com/adwords/api/docs/reference/v201708/OfflineDataUploadService

@msaniscalchi
Copy link
Contributor

Hello Steve,

The linked docs indicate this is a whitelist-only feature. It's possible that you're not included in that whitelist, which would explain why you're having trouble making API calls.

It's not unusual for the library to include whitelisted services like this, so I think this is working as intended.

Regards,
Mark

@stevewilhelm
Copy link
Author

stevewilhelm commented Oct 5, 2017

I am aware this is a whitelisted feature.

If you look at the implementation, there is only one reference to OfflineDataUploadService in the code base, namely in the _SERVICE_MAP.

There doesn't seem to be any other code to implement the service or any code implementing the arguments necessary to make the calls to the service, e.g. OfflineData.

I notice some of the other API implementations, PHP and Java for example, seem to have more complete support for OfflineDataUploadService. We will switch to one of these implementations if necessary, but would prefer to use Python.

@msaniscalchi
Copy link
Contributor

msaniscalchi commented Oct 5, 2017

If you look at the implementation, there is only one reference to OfflineDataUploadService in the code base, namely in the _SERVICE_MAP.

Yes, this doesn't sound unusual. This library isn't generated like the Java client library, it downloads the wsdl (or retrieves it from cache) and creates the service dynamically. Consequently, this library also doesn't have generated DTOs for API objects like OfflineData. We use suds, which does offer some factories to produce these, we discuss this a bit here.

@stevewilhelm
Copy link
Author

stevewilhelm commented Oct 5, 2017

We get the following error:

    offline_data_upload_service = adwords_client.GetService('OfflineDataUploadService', version=constants.VERSION)
  File "build/bdist.macosx-10.11-x86_64/egg/googleads/adwords.py", line 402, in GetService
  File "build/bdist.macosx-10.11-x86_64/egg/suds/client.py", line 115, in __init__
  File "build/bdist.macosx-10.11-x86_64/egg/suds/reader.py", line 150, in open
  File "build/bdist.macosx-10.11-x86_64/egg/suds/wsdl.py", line 136, in __init__
  File "build/bdist.macosx-10.11-x86_64/egg/suds/reader.py", line 74, in open
  File "build/bdist.macosx-10.11-x86_64/egg/suds/reader.py", line 92, in download
  File "build/bdist.macosx-10.11-x86_64/egg/suds/transport/http.py", line 69, in open
suds.transport.TransportError: HTTP Error 404: Not Found

Is this what we should expect if we are not correctly accessing our whitelisted account?

The documents imply I should receive a NotWhitelistedError

https://developers.google.com/adwords/api/docs/reference/v201708/OfflineDataUploadService.NotWhitelistedError.Reason?hl=zh-cn

@msaniscalchi
Copy link
Contributor

msaniscalchi commented Oct 5, 2017

Thanks for following up Steve. It looks like you uncovered an issue that I'm surprised wasn't discovered earlier.

This is the actual wsdl URL:
https://adwords.google.com/api/adwords/rm/v201708/OfflineDataUploadService?wsdl

This is the wsdl URL being used:
https://adwords.google.com/api/adwords/cm/v201708/OfflineDataUploadService?wsdl

It appears that an error was made when this service was added to _SERVICE_MAP. As a temporary work-around, you can modify the value associated with this service to rm.

We're going to be releasing a new AdWords version soon, so we'll include the fix in that release.

Regards,
Mark

@msaniscalchi msaniscalchi reopened this Oct 5, 2017
@stevewilhelm
Copy link
Author

Patching the wsdl URL works!

WARNING:root:
Suds ( https://fedorahosted.org/suds/ )  version: 0.6

Service ( OfflineDataUploadService ) tns="https://adwords.google.com/api/adwords/rm/v201708"
   Prefixes (2)
      ns0 = "https://adwords.google.com/api/adwords/cm/v201708"
      ns1 = "https://adwords.google.com/api/adwords/rm/v201708"
   Ports (1):
      (OfflineDataUploadServiceInterfacePort)
         Methods (2):
            get(ns0:Selector serviceSelector)
            mutate(OfflineDataUploadOperation[] operations)
         Types (92):
            ns0:ApiError
            ns0:ApiException

Now I just need to bone up on suds. Thanks.

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