本文整理汇总了Python中SOAPpy.SOAPProxy.simplify_objects方法的典型用法代码示例。如果您正苦于以下问题:Python SOAPProxy.simplify_objects方法的具体用法?Python SOAPProxy.simplify_objects怎么用?Python SOAPProxy.simplify_objects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SOAPpy.SOAPProxy
的用法示例。
在下文中一共展示了SOAPProxy.simplify_objects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: build_session
# 需要导入模块: from SOAPpy import SOAPProxy [as 别名]
# 或者: from SOAPpy.SOAPProxy import simplify_objects [as 别名]
def build_session(resource):
"""returns a SOAP session."""
proxy = 'https://%s:%[email protected]%s.service-now.com/%s.do?SOAP' %\
(servicenow_conf.USERNAME, servicenow_conf.PASSWORD,
servicenow_conf.INSTANCE, resource)
namespace = 'http://www.service-now.com/'
try:
session = SOAPProxy(proxy, namespace)
session.simplify_objects = 1
if (servicenow_conf.SOAP_API_DEBUG):
session.config.dumpHeadersIn = 1
session.config.dumpHeadersOut = 1
session.config.dumpSOAPOut = 1
session.config.dumpSOAPIn = 1
return session
except Exception, e:
raise Exception('Error creating SOAP session: %s' % e)