summaryrefslogtreecommitdiffstats
path: root/aw_api/zsi_toolkit/v200909/GeoLocationService_services.py
blob: 9597355ee8bdde333b0f4b46a68e6cc6d02cb27f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
################################################## 
# GeoLocationService_services.py 
# generated by ZSI.generate.wsdl2python
##################################################


from GeoLocationService_services_types import *
import urlparse, types
from ZSI.TCcompound import ComplexType, Struct
from ZSI import client
import ZSI

# Locator
class GeoLocationServiceLocator:
    GeoLocationServiceInterface_address = "https://adwords.google.com:443/api/adwords/cm/v200909/GeoLocationService"
    def getGeoLocationServiceInterfaceAddress(self):
        return GeoLocationServiceLocator.GeoLocationServiceInterface_address
    def getGeoLocationServiceInterface(self, url=None, **kw):
        return GeoLocationServiceSoapBindingSOAP(url or GeoLocationServiceLocator.GeoLocationServiceInterface_address, **kw)

# Methods
class GeoLocationServiceSoapBindingSOAP:
    def __init__(self, url, **kw):
        kw.setdefault("readerclass", None)
        kw.setdefault("writerclass", None)
        # no resource properties
        self.binding = client.Binding(url=url, **kw)
        # no ws-addressing

    # get: getGeoLocation
    def getGeoLocation(self, request):
        if isinstance(request, getGeoLocationRequest) is False:
            raise TypeError, "%s incorrect request type" % (request.__class__)
        kw = {}
        # no input wsaction
        self.binding.Send(None, None, request, soapaction="", **kw)
        # no output wsaction
        response = self.binding.Receive(getGeoLocationResponse.typecode)
        return response

getGeoLocationRequest = ns0.getGeoLocation_Dec().pyclass

getGeoLocationResponse = ns0.getGeoLocationResponse_Dec().pyclass