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


Python Element.children方法代码示例

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


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

示例1: set_auth_header

# 需要导入模块: from suds.sax.element import Element [as 别名]
# 或者: from suds.sax.element.Element import children [as 别名]
 def set_auth_header(self):
     """Set up the authorization header"""
     auth_user = Element("username").setText(self.api_user)
     auth_key = Element("apiKey").setText(self.api_key)
     auth_header = Element("authenticate", ns=self.ims_ns)
     auth_header.children = [auth_user, auth_key]
     return auth_header
开发者ID:enygma,项目名称:slsoap,代码行数:9,代码来源:slsoap.py

示例2: set_object_mask

# 需要导入模块: from suds.sax.element import Element [as 别名]
# 或者: from suds.sax.element.Element import children [as 别名]
 def set_object_mask(self, data):
     """Create an object mask to tell the API what we want"""
     print "%sObjectMask" % self.object_type
     el = Element("%sObjectMask" % self.object_type, ns=self.ims_ns)
     mask = Element("mask")
     mask = self.build_soap_header(mask, data)
     el.children = [mask]
     return el
开发者ID:enygma,项目名称:slsoap,代码行数:10,代码来源:slsoap.py

示例3: Client

# 需要导入模块: from suds.sax.element import Element [as 别名]
# 或者: from suds.sax.element.Element import children [as 别名]
from suds.client import Client
from suds.transport.http import HttpAuthenticated

url = 'http://academico.espoch.edu.ec/OAS_Interop/Infogeneral.wsdl'
#url adicional
urlCarrera = 'http://academico.espoch.edu.ec/OAS_Interop/Infocarrera.wsdl'

cliente = Client(url)
from suds.sax.element import Element

#Definimos el nombre de usuario
user = Element('acad:username').setText('webmail')

#Definimos la contraseña
pwd = Element('acad:password').setText('webmail')

#Creamos el elemento padre, y el espacio de nombres
reqsoapheader = Element('acad:credentials', ns=['acad','http://academico.espoch.edu.ec/'])

#agregamos usuario y contraseña al padre
reqsoapheader.children = [user, pwd]

#Seteamos los soapheaders con las credenciales de login
cliente.set_options(soapheaders=reqsoapheader)

#Llamamos a los servicios web
a = cliente.service.GetCiudades()

print a
开发者ID:juliohurtado,项目名称:soapespoch,代码行数:31,代码来源:ws.py

示例4: Client

# 需要导入模块: from suds.sax.element import Element [as 别名]
# 或者: from suds.sax.element.Element import children [as 别名]
#!/usr/bin/python
from suds.client import Client 
from SOAPpy import WSDL
from suds.sax.element import Element
from suds.sax.attribute import Attribute
import logging


logging.getLogger('suds.client').setLevel(logging.DEBUG)
logging.basicConfig(filename="/tmp/suds.log", level=logging.INFO)


url = 'http://1ocalhost/SDP_SMS/parlayx_sms_notification_manager_service_2_3.wsdl'
client = Client(url, location='http://196.201.216.14:8310/SmsNotificationManagerService/services/SmsNotificationManager')
spId = Element('spId').setText('35000001')
spPassword = Element('spPassword').setText('somepassword')
serviceId = Element('serviceId').setText('12345')
timeStamp = Element('timeStamp').setText('20120731064245')
reqsoapheader = Element('RequestSOAPHeader')
reqsoapheader.children = [spId,spPassword,serviceId,timeStamp]
client.set_options(soapheaders=reqsoapheader)

reference = client.factory.create('ns0:SimpleReference')
reference.endpoint = 'http://localhost/index.php'
reference.interfaceName = 'notifySmsReception'
reference.correlator = '1234'
reference.smsServiceActivationNumber = '23424'
reference.criteria = 'Love'
client.service.startSmsNotification('http://localhost/index.php','notifySmsReception','1234', '23424', 'Love')
print client.last_received()
开发者ID:Gats,项目名称:GatsBase,代码行数:32,代码来源:sdpstartSmsNotification.py

示例5: Client

# 需要导入模块: from suds.sax.element import Element [as 别名]
# 或者: from suds.sax.element.Element import children [as 别名]
logging.getLogger('suds.client').setLevel(logging.DEBUG)
logging.basicConfig(filename="/tmp/sendSms.log", level=logging.INFO)


url = 'http://localhost/parlayx_sms_send_service_2_2.wsdl'
client = Client(url, location='http://localhost:8310/SendSmsService/services/SendSms')
passw = cryp.update('12345'+'pass'+'20130402115545')
password = cryp.hexdigest()
#print client 
spId = Element('spId').setText('1234')
spPassword = Element('spPassword').setText(password)
serviceId = Element('serviceId').setText('12345')
timeStamp = Element('timeStamp').setText('20130402115545')
linkId = Element('linkid').setText('')
oa = Element('OA').setText('tel:254706123456')
fa = Element('FA').setText('tel:254706123456')

reqsoapheader = Element('RequestSOAPHeader')
reqsoapheader.children = [spId,spPassword,serviceId,timeStamp,linkId,oa,fa]
client.set_options(soapheaders=reqsoapheader)
reference = client.factory.create('ns0:SimpleReference')
reference.endpoint = 'http://localhost/index.php'
reference.interfaceName = 'SmsNotification'
reference.correlator = '12345678'

client.service.sendSms('254706123456','949','0','This is a test message from Simon',reference)
#print client.last_sent()

print client.last_received()
开发者ID:Gats,项目名称:GatsBase,代码行数:31,代码来源:sdpSendSMS.py


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