当前位置: 首页>>代码示例>>Python>>正文


Python Client.__init__方法代码示例

本文整理汇总了Python中suds.client.Client.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Client.__init__方法的具体用法?Python Client.__init__怎么用?Python Client.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在suds.client.Client的用法示例。


在下文中一共展示了Client.__init__方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from suds.client import Client [as 别名]
# 或者: from suds.client.Client import __init__ [as 别名]
    def __init__(self, WSDL_URI=BIOMODELS_WSDL_URI):
	"""Initialize the client with the available queries listed in
	the WSDL file. All the queries can be executed using the following syntax:
	
	client.service.queryToBeExecuted()
	"""
	try:
	    Client.__init__(self, WSDL_URI)
	except Exception, e:
	    print e
开发者ID:BhallaLab,项目名称:moose-thalamocortical,代码行数:12,代码来源:biomodelsclient.py

示例2: __init__

# 需要导入模块: from suds.client import Client [as 别名]
# 或者: from suds.client.Client import __init__ [as 别名]
 def __init__(self, WSDL_URI=BIOMODELS_WSDL_URI):
     """Initialize the client with the available queries listed in
     the WSDL file. All the queries can be executed using the following syntax:
     
     client.service.queryToBeExecuted()
     """
     try:
         Client.__init__(self, WSDL_URI,proxy=proxyOpts)
         #Client.__init__(self, WSDL_URI,transport=HttpTransport())
     except Exception as e:
         print(e)
开发者ID:dilawar,项目名称:moose-gui,代码行数:13,代码来源:biomodelsclient.py

示例3: __init__

# 需要导入模块: from suds.client import Client [as 别名]
# 或者: from suds.client.Client import __init__ [as 别名]
 def __init__(self, table, instance):
     self.__table = table
     self.__instance = instance
     username = Config.getUsername(instance)
     password = Config.getPassword(instance)
     SLogger.debug("Connecting to %s to download from table %s" % (instance, table))
     try:
         Client.__init__(self,
                         instance + table + "_list.do?WSDL",
                         username=username,
                         password=password,
                         timeout=Config.getTimeout())
     except URLError, e:
         SnowClient.__processURLError(e)
开发者ID:Aspediens,项目名称:codesync,代码行数:16,代码来源:soapClient.py

示例4: __init__

# 需要导入模块: from suds.client import Client [as 别名]
# 或者: from suds.client.Client import __init__ [as 别名]
 def __init__(self, wsdl_url, username, password, servicename = None):
     #create parser and download the WSDL document
     self.url = wsdl_url
     self.username = username
     self.password = password
     self.servicename = servicename
     if servicename:
         self.url = self.get_service_url()     
     if is_https(self.url):
         logger.info("Creating secure connection")
         from suds.transport.http import HttpAuthenticated
         http_transport = HttpAuthenticated(username=self.username, password=self.password)
     else:
         from suds.transport.http import HttpAuthenticated
         http_transport = HttpAuthenticated(username=self.username, password=self.password)
     
     #Client.__init__(self, self.url, transport=http_transport, plugins=[SoapFixer()]) # uncomment after testing
     #schema_import = Import(schema_url)
     #schema_doctor = ImportDoctor(schema_import)
 
     Client.__init__(self, self.url, transport=http_transport, plugins=[SoapFixer()]) # added for testing purpose
开发者ID:SadamAnsari,项目名称:Web-services-Integration,代码行数:23,代码来源:soapclient.py

示例5: __init__

# 需要导入模块: from suds.client import Client [as 别名]
# 或者: from suds.client.Client import __init__ [as 别名]
    def __init__(self,options,config_file=None,session="DWE"):
        """Datastream SOAP Client

        >>> ds=Datastream()
        """

        _set_debug(logging.WARN,
                   'suds.resolver',
                   'suds.metrics',
                   'suds.xsd.sxbasic',
                   'suds.xsd.query',
                   'suds.client',
                   'suds.wsdl',
                   'suds.transport.http',
                   'suds.mx.core',
                   'suds.umx.typed',
                   'suds.xsd.schema',
                   'suds.xsd.sxbase',
                   'suds.mx.literal')

        if config_file is None:
            if exists(expanduser('~/.dwe.conf')):
                config_file = expanduser('~/.dwe.conf')
                os.chmod(config_file,stat.S_IRUSR | stat.S_IWUSR)
            else:
                config_file = DEFAULT_DSTREAM_CONF_FILE

        config_file = expanduser(expandvars(config_file))

        self._options = options

        if not exists(config_file):
            LOGGER.info('no configuration for datastream (%s). using BITS path',config_file)
            config_file = join(BITS_ETC,DEFAULT_BITS_CONF_FILE)

        self.config_file = config_file

        if not exists(self.config_file):
            raise IOError, 'Datastream Configuration File not Found %s' % config_file

        
        dstream_info = get_session(config_file,session,
                                   secure=True,
                                   url='http://dataworks.thomson.com/dataworks/enterprise/1.0/webServiceClient.asmx?WSDL',
                                   user=(None,ValueError),
                                   password=(None,ValueError),
                                   realm=''
                                   )
        self._auth=dstream_info

        t = HttpTransport()


        ### Proxy if any
        #
        proxy_info = get_proxy()        
        if proxy_info:
            pip={
                'http':proxy_info['proxy'],
                'https':proxy_info['proxy'],
                }
            proxy = urllib2.ProxyHandler(pip)
            # opener = urllib2.build_opener(SocksiPyHandler(socks.PROXY_TYPE_SOCKS4, 'localhost', 8080))
            opener = urllib2.build_opener(proxy)
            urllib2.install_opener(opener)
            t.urlopener = opener
            LOGGER.debug('proxy info for http: %s',pip['http'])
        #
        #
        ###
        try:
            Client.__init__(self,self._auth['url'],transport=t)
        except urllib2.URLError, exc:
            LOGGER.error('{}: No connection to {}'.format(self._options.job,self._auth['url']))
            raise exc
开发者ID:exedre,项目名称:e4t.new,代码行数:77,代码来源:DatastreamProvider.py

示例6: __init__

# 需要导入模块: from suds.client import Client [as 别名]
# 或者: from suds.client.Client import __init__ [as 别名]
 def __init__(self, url, slug=None, related_objects=None, session=None, transport=None, timeout=None, **kwargs):
     transport = transport or SecurityRequestsTransport(slug=slug, related_objects=related_objects, session=session,
                                                        timeout=timeout)
     DefaultClient.__init__(self, url, transport=transport, **kwargs)
开发者ID:matllubos,项目名称:django-security,代码行数:6,代码来源:security_suds.py

示例7: __init__

# 需要导入模块: from suds.client import Client [as 别名]
# 或者: from suds.client.Client import __init__ [as 别名]
 def __init__(self,*args,**kwargs):
     self.is_local = False
     self.subdomains = []
     # super(Client,self).__init__(*args,**kwargs)
     Client.__init__(self,*args,**kwargs)
开发者ID:mvavalis,项目名称:multidomain_multiphysics,代码行数:7,代码来源:hmc_remoteclient.py


注:本文中的suds.client.Client.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。