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


Python SoapClient.help方法代码示例

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


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

示例1: test_issue129

# 需要导入模块: from pysimplesoap.client import SoapClient [as 别名]
# 或者: from pysimplesoap.client.SoapClient import help [as 别名]
 def test_issue129(self):
     """Test RPC style (axis) messages (including parameter order)"""
     wsdl_url = 'http://62.94.212.138:8081/teca/services/tecaServer?wsdl'
     client = SoapClient(wsdl=wsdl_url, soap_server='axis')
     client.help("contaVolumi")
     response = client.contaVolumi(user_id=1234, valoreIndice=["IDENTIFIER", ""])
     self.assertEqual(response, {'contaVolumiReturn': 0})
开发者ID:adammendoza,项目名称:pysimplesoap,代码行数:9,代码来源:issues_test.py

示例2: test_issue43

# 需要导入模块: from pysimplesoap.client import SoapClient [as 别名]
# 或者: from pysimplesoap.client.SoapClient import help [as 别名]
    def test_issue43(self):
        from pysimplesoap.client import SoapClient

        client = SoapClient(wsdl="https://api.clarizen.com/v1.0/Clarizen.svc",trace=False)

        print client.help("Login")
        print client.help("Logout")
        print client.help("Query")
        print client.help("Metadata")
        print client.help("Execute")
开发者ID:KongJustin,项目名称:pysimplesoap,代码行数:12,代码来源:issues_tests.py

示例3: test_issue123

# 需要导入模块: from pysimplesoap.client import SoapClient [as 别名]
# 或者: from pysimplesoap.client.SoapClient import help [as 别名]
 def test_issue123(self):
     """Basic test for WSDL lacking service tag """
     wsdl = "http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl"
     client = SoapClient(wsdl=wsdl)
     client.help("CreateUsers")
     client.help("GetServices")
     # this is not a real webservice (just specification) catch HTTP error
     try: 
         client.GetServices(IncludeCapability=True)
     except Exception as e:
         self.assertEqual(str(e), "RelativeURIError: Only absolute URIs are allowed. uri = ")
开发者ID:smartylab,项目名称:pysimplesoap,代码行数:13,代码来源:issues_test.py

示例4: test_issue43

# 需要导入模块: from pysimplesoap.client import SoapClient [as 别名]
# 或者: from pysimplesoap.client.SoapClient import help [as 别名]
    def test_issue43(self):

        client = SoapClient(
            wsdl="https://api.clarizen.com/v1.0/Clarizen.svc"
        )

        client.help("Login")
        client.help("Logout")
        client.help("Query")
        client.help("Metadata")
        client.help("Execute")
开发者ID:smartylab,项目名称:pysimplesoap,代码行数:13,代码来源:issues_test.py

示例5: test_buscar_personas_wsdl

# 需要导入模块: from pysimplesoap.client import SoapClient [as 别名]
# 或者: from pysimplesoap.client.SoapClient import help [as 别名]
 def test_buscar_personas_wsdl(self):
     WSDL = "file://" + os.path.join(TEST_DIR, "licencias.wsdl")
     client = SoapClient(wsdl=WSDL, ns="web", trace=True)
     print client.help("PersonaSearch")
     client['AuthHeaderElement'] = {'username': 'mariano', 'password': 'clave'}
     client.http = DummyHTTP(xml)
     resultado = client.PersonaSearch(numero_documento='31867063')
     print resultado
     
     # each resultado['result'][i]['item'] is xsd:anyType, so it is not unmarshalled 
     # they are SimpleXmlElement (see test_buscar_personas_raw)
     self.assertEqual(str(resultado['result'][0]['item']('xsd:string')[0]), "resultado")
     self.assertEqual(str(resultado['result'][1]['item']('xsd:string')[1]), "WS01-01")
     self.assertEqual(str(resultado['result'][3]['item']('xsd:anyType')[1]("ns2:Map").item[10].value), "1985-10-02 00:00:00")
开发者ID:KongJustin,项目名称:pysimplesoap,代码行数:16,代码来源:licencias_tests.py

示例6: test_issue141

# 需要导入模块: from pysimplesoap.client import SoapClient [as 别名]
# 或者: from pysimplesoap.client.SoapClient import help [as 别名]
    def test_issue141(self):
        """Test voxone VoxAPI wsdl (ref element)"""
        import datetime
        import hmac
        import hashlib

        client = SoapClient(wsdl="http://sandbox.voxbone.com/VoxAPI/services/VoxAPI?wsdl", cache=None)
        client.help("GetPOPList")

        key = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S:%f000000")
        password="fwefewfewfew"
        usertoken={'Username': "oihfweohf", 'Key': key, 'Hash': hmac.new(key, password, digestmod=hashlib.sha1).hexdigest()}
        try:
            response = client.GetPOPList(UserToken=usertoken)
            result = response['GetPOPListResponse']
        except SoapFault as sf:
            # ignore exception caused by missing credentials sent in this test:
            if sf.faultstring != "Either your username or password is invalid":
                raise
开发者ID:smartylab,项目名称:pysimplesoap,代码行数:21,代码来源:issues_test.py

示例7: test_issue80

# 需要导入模块: from pysimplesoap.client import SoapClient [as 别名]
# 或者: from pysimplesoap.client.SoapClient import help [as 别名]
 def test_issue80(self):
     """Test services.conzoom.eu/addit/ wsdl"""    
     client = SoapClient(wsdl="http://services.conzoom.eu/addit/AddItService.svc?wsdl")        
     client.help("GetValues")
开发者ID:smartylab,项目名称:pysimplesoap,代码行数:6,代码来源:issues_test.py

示例8: TestTrazamed

# 需要导入模块: from pysimplesoap.client import SoapClient [as 别名]
# 或者: from pysimplesoap.client.SoapClient import help [as 别名]
class TestTrazamed(unittest.TestCase):
    internal = 1

    def setUp(self):

        self.client = SoapClient(
            wsdl=WSDL, cache=None, ns="tzmed", soap_ns="soapenv", soap_server="jetty"
        )  # needed to handle list

        # fix location (localhost:9050 is erroneous in the WSDL)
        self.client.services["IWebServiceService"]["ports"]["IWebServicePort"]["location"] = LOCATION

        # Set WSSE security credentials
        if False:
            # deprecated, do not use in new code! (just for testing)
            self.client["wsse:Security"] = {
                "wsse:UsernameToken": {"wsse:Username": "testwservice", "wsse:Password": "testwservicepsw"}
            }
        else:
            # new recommended style using plugins
            wsse_token = UsernameToken(username="testwservice", password="testwservicepsw")
            self.client.plugins.append(wsse_token)

    def test_send_medicamentos(self):
        # self.client.help("sendMedicamentos")

        # Create the complex type (medicament data transfer object):
        medicamentosDTO = dict(
            f_evento=datetime.datetime.now().strftime("%d/%m/%Y"),
            h_evento=datetime.datetime.now().strftime("%H:%M"),
            gln_origen="9999999999918",
            gln_destino="glnws",
            n_remito="1234",
            n_factura="1234",
            vencimiento=(datetime.datetime.now() + datetime.timedelta(30)).strftime("%d/%m/%Y"),
            gtin="GTIN1",
            lote=datetime.datetime.now().strftime("%Y"),
            numero_serial=int(time.time()),
            id_obra_social=None,
            id_evento=134,
            cuit_origen="20267565393",
            cuit_destino="20267565393",
            apellido="Reingart",
            nombres="Mariano",
            tipo_documento="96",
            n_documento="26756539",
            sexo="M",
            direccion="Saraza",
            numero="1234",
            piso="",
            depto="",
            localidad="Hurlingham",
            provincia="Buenos Aires",
            n_postal="1688",
            fecha_nacimiento="01/01/2000",
            telefono="5555-5555",
        )

        # Call the webservice to inform a medicament:
        res = self.client.sendMedicamentos(arg0=medicamentosDTO, arg1="pruebasws", arg2="pruebasws")

        # Analyze the response:
        ret = res["return"]
        self.assertIsInstance(ret["codigoTransaccion"], basestring)
        self.assertEqual(ret["resultado"], True)

    def test_send_medicamentos_dh_serie(self):
        self.client.help("sendMedicamentosDHSerie")

        # Create the complex type (medicament data transfer object):
        medicamentosDTODHSerie = dict(
            f_evento=datetime.datetime.now().strftime("%d/%m/%Y"),
            h_evento=datetime.datetime.now().strftime("%H:%M"),
            gln_origen="9999999999918",
            gln_destino="glnws",
            n_remito="1234",
            n_factura="1234",
            vencimiento=(datetime.datetime.now() + datetime.timedelta(30)).strftime("%d/%m/%Y"),
            gtin="GTIN1",
            lote=datetime.datetime.now().strftime("%Y"),
            desde_numero_serial=int(time.time()) + 1,
            hasta_numero_serial=int(time.time()) - 1,
            id_obra_social=None,
            id_evento=134,
        )

        # Call the webservice to inform a medicament:
        res = self.client.sendMedicamentosDHSerie(arg0=medicamentosDTODHSerie, arg1="pruebasws", arg2="pruebasws")

        # Analyze the response:
        ret = res["return"]

        # Check the results:
        self.assertIsInstance(ret["codigoTransaccion"], basestring)
        self.assertEqual(ret["errores"][0]["_c_error"], "3004")
        self.assertEqual(
            ret["errores"][0]["_d_error"], "El campo Hasta Nro Serial debe ser mayor o igual al campo Desde Nro Serial."
        )
        self.assertEqual(ret["resultado"], False)

#.........这里部分代码省略.........
开发者ID:raptorz,项目名称:pysimplesoap,代码行数:103,代码来源:trazamed_test.py

示例9: TestTrazamed

# 需要导入模块: from pysimplesoap.client import SoapClient [as 别名]
# 或者: from pysimplesoap.client.SoapClient import help [as 别名]
class TestTrazamed(unittest.TestCase):
    internal = 1

    def setUp(self):

        self.client = SoapClient(
            wsdl=WSDL,
            cache=None,
            ns="tzmed",
            soap_ns="soapenv",
            #soap_server="jbossas6",
            trace="--trace" in sys.argv)

        # fix location (localhost:9050 is erroneous in the WSDL)
        self.client.services['IWebServiceService']['ports']['IWebServicePort']['location'] = LOCATION

        # Set WSSE security credentials
        self.client['wsse:Security'] = {
            'wsse:UsernameToken': {
                'wsse:Username': 'testwservice',
                'wsse:Password': 'testwservicepsw',
                }
            }

    def test_send_medicamentos(self):
        self.client.help("sendMedicamentos")
        res = self.client.sendMedicamentos(
            arg0={'f_evento': "25/11/2011",
                  'h_evento': "04:24",
                  'gln_origen': "glnws",
                  'gln_destino': "glnws",
                  'n_remito': "1234",
                  'n_factura': "1234",
                  'vencimiento': "30/11/2011",
                  'gtin': "GTIN1",
                  'lote': "1111",
                  'numero_serial': "12345",
                  'id_obra_social': 1,
                  'id_evento': 133,
                  'cuit_origen': "20267565393",
                  'cuit_destino': "20267565393",
                  'apellido': "Reingart",
                  'nombres': "Mariano",
                  'tipo_docmento': "96",
                  'n_documento': "26756539",
                  'sexo': "M",
                  'direccion': "Saraza",
                  'numero': "1234",
                  'piso': "",
                  'depto': "",
                  'localidad': "Hurlingham",
                  'provincia': "Buenos Aires",
                  'n_postal': "B1688FDD",
                  'fecha_nacimiento': "01/01/2000",
                  'telefono': "5555-5555",
            },
            arg1='pruebasws',
            arg2='pruebasws',
        )

        ret = res['return']

        self.assertEqual(ret[0]['codigoTransaccion'], None)
        self.assertEqual(ret[1]['errores']['_c_error'], '3019')
        self.assertEqual(ret[1]['errores']['_d_error'], "No ha informado la recepcion del medicamento que desea enviar.")
        self.assertEqual(ret[-1]['resultado'], False)

    def test_send_medicamentos_dh_serie(self):
        self.client.help("sendMedicamentosDHSerie")
        res = self.client.sendMedicamentosDHSerie(
            arg0={'f_evento': "25/11/2011",
                  'h_evento': "04:24",
                  'gln_origen': "glnws",
                  'gln_destino': "glnws",
                  'n_remito': "1234",
                  'n_factura': "1234",
                  'vencimiento': "30/11/2011",
                  'gtin': "GTIN1",
                  'lote': "1111",
                  'desde_numero_serial': 2,
                  'hasta_numero_serial': 1,
                  'id_obra_social': 1,
                  'id_evento': 133,
                  'cuit_origen': "20267565393",
                  'cuit_destino': "20267565393",
                  'apellido': "Reingart",
                  'nombres': "Mariano",
                  'tipo_docmento': "96",
                  'n_documento': "26756539",
                  'sexo': "M",
                  'direccion': "Saraza",
                  'numero': "1234",
                  'piso': "",
                  'depto': "",
                  'localidad': "Hurlingham",
                  'provincia': "Buenos Aires",
                  'n_postal': "B1688FDD",
                  'fecha_nacimiento': "01/01/2000",
                  'telefono': "5555-5555",
            },
#.........这里部分代码省略.........
开发者ID:rcarmo,项目名称:pysimplesoap,代码行数:103,代码来源:trazamed_tests.py

示例10: TestTrazamed

# 需要导入模块: from pysimplesoap.client import SoapClient [as 别名]
# 或者: from pysimplesoap.client.SoapClient import help [as 别名]
class TestTrazamed(unittest.TestCase):

    def setUp(self):

        self.client = SoapClient(
            wsdl = WSDL,        
            cache = None,
            ns="tzmed",
            soap_ns="soapenv",
            soap_server="jetty",                # needed to handle list
            trace = "--trace" in sys.argv)
            
        # fix location (localhost:9050 is erroneous in the WSDL)
        self.client.services['IWebServiceService']['ports']['IWebServicePort']['location'] = LOCATION
            
        # Set WSSE security credentials
        self.client['wsse:Security'] = {
            'wsse:UsernameToken': {
                'wsse:Username': 'testwservice',
                'wsse:Password': 'testwservicepsw',
                }
            }

    def test_send_medicamentos(self):
        #self.client.help("sendMedicamentos")
        
        # Create the complex type (medicament data transfer object):
        medicamentosDTO = dict(
            f_evento=datetime.datetime.now().strftime("%d/%m/%Y"),
            h_evento=datetime.datetime.now().strftime("%H:%M"), 
            gln_origen="9999999999918", gln_destino="glnws", 
            n_remito="1234", n_factura="1234", 
            vencimiento=(datetime.datetime.now() + 
                         datetime.timedelta(30)).strftime("%d/%m/%Y"), 
            gtin="GTIN1", lote=datetime.datetime.now().strftime("%Y"),
            numero_serial=int(time.time()), 
            id_obra_social=None, id_evento=134,
            cuit_origen="20267565393", cuit_destino="20267565393", 
            apellido="Reingart", nombres="Mariano",
            tipo_docmento="96", n_documento="26756539", sexo="M",
            direccion="Saraza", numero="1234", piso="", depto="", 
            localidad="Hurlingham", provincia="Buenos Aires",
            n_postal="1688", fecha_nacimiento="01/01/2000", 
            telefono="5555-5555",
            )
        
        # Call the webservice to inform a medicament:
        res = self.client.sendMedicamentos(
            arg0=medicamentosDTO,
            arg1='pruebasws', 
            arg2='pruebasws',
        )

        # Analyze the response:
        ret = res['return']        
        self.assertIsInstance(ret['codigoTransaccion'], unicode)
        self.assertEqual(ret['resultado'], True)

    def test_send_medicamentos_dh_serie(self):
        self.client.help("sendMedicamentosDHSerie")
        
        # Create the complex type (medicament data transfer object):
        medicamentosDTODHSerie = dict(
            f_evento=datetime.datetime.now().strftime("%d/%m/%Y"),
            h_evento=datetime.datetime.now().strftime("%H:%M"), 
            gln_origen="9999999999918", gln_destino="glnws", 
            n_remito="1234", n_factura="1234", 
            vencimiento=(datetime.datetime.now() + 
                         datetime.timedelta(30)).strftime("%d/%m/%Y"), 
            gtin="GTIN1", lote=datetime.datetime.now().strftime("%Y"),
            desde_numero_serial=10,
            hasta_numero_serial=0, 
            id_obra_social=None, id_evento=134,
            )
        
        # Call the webservice to inform a medicament:
        res = self.client.sendMedicamentosDHSerie(
            arg0=medicamentosDTODHSerie, 
            arg1='pruebasws', 
            arg2='pruebasws',
        )

        # Analyze the response:
        ret = res['return']
        
        # Check the results:
        self.assertIsInstance(ret['codigoTransaccion'], unicode)
        self.assertEqual(ret['errores'][0]['_c_error'], '3004')
        self.assertEqual(ret['errores'][0]['_d_error'], "El campo Hasta Nro Serial debe ser mayor o igual al campo Desde Nro Serial.")
        self.assertEqual(ret['resultado'], False)

    def test_get_transacciones_no_confirmadas(self):

        # Call the webservice to query all the un-confirmed transactions:
        res = self.client.getTransaccionesNoConfirmadas(
                arg0='pruebasws', 
                arg1='pruebasws',
            )
        
        # Analyze the response:
#.........这里部分代码省略.........
开发者ID:limoragni,项目名称:visionar,代码行数:103,代码来源:trazamed_tests.py

示例11: TestTrazamed

# 需要导入模块: from pysimplesoap.client import SoapClient [as 别名]
# 或者: from pysimplesoap.client.SoapClient import help [as 别名]
class TestTrazamed(unittest.TestCase):
    def setUp(self):

        self.client = SoapClient(
            wsdl=WSDL,
            cache=None,
            ns="tzmed",
            soap_ns="soapenv",
            # soap_server="jbossas6",
            trace="--trace" in sys.argv,
        )

        # fix location (localhost:9050 is erroneous in the WSDL)
        self.client.services["IWebServiceService"]["ports"]["IWebServicePort"]["location"] = LOCATION

        # Set WSSE security credentials
        self.client["wsse:Security"] = {
            "wsse:UsernameToken": {"wsse:Username": "testwservice", "wsse:Password": "testwservicepsw"}
        }

    def test_send_medicamentos(self):
        self.client.help("sendMedicamentos")
        res = self.client.sendMedicamentos(
            arg0={
                "f_evento": "25/11/2011",
                "h_evento": "04:24",
                "gln_origen": "glnws",
                "gln_destino": "glnws",
                "n_remito": "1234",
                "n_factura": "1234",
                "vencimiento": "30/11/2011",
                "gtin": "GTIN1",
                "lote": "1111",
                "numero_serial": "12345",
                "id_obra_social": 1,
                "id_evento": 133,
                "cuit_origen": "20267565393",
                "cuit_destino": "20267565393",
                "apellido": "Reingart",
                "nombres": "Mariano",
                "tipo_docmento": "96",
                "n_documento": "26756539",
                "sexo": "M",
                "direccion": "Saraza",
                "numero": "1234",
                "piso": "",
                "depto": "",
                "localidad": "Hurlingham",
                "provincia": "Buenos Aires",
                "n_postal": "B1688FDD",
                "fecha_nacimiento": "01/01/2000",
                "telefono": "5555-5555",
            },
            arg1="pruebasws",
            arg2="pruebasws",
        )

        ret = res["return"]

        self.assertEqual(ret[0]["codigoTransaccion"], None)
        self.assertEqual(ret[1]["errores"]["_c_error"], "3019")
        self.assertEqual(
            ret[1]["errores"]["_d_error"], "No ha informado la recepcion del medicamento que desea enviar."
        )
        self.assertEqual(ret[-1]["resultado"], False)

    def test_send_medicamentos_dh_serie(self):
        self.client.help("sendMedicamentosDHSerie")
        res = self.client.sendMedicamentosDHSerie(
            arg0={
                "f_evento": "25/11/2011",
                "h_evento": "04:24",
                "gln_origen": "glnws",
                "gln_destino": "glnws",
                "n_remito": "1234",
                "n_factura": "1234",
                "vencimiento": "30/11/2011",
                "gtin": "GTIN1",
                "lote": "1111",
                "desde_numero_serial": 2,
                "hasta_numero_serial": 1,
                "id_obra_social": 1,
                "id_evento": 133,
                "cuit_origen": "20267565393",
                "cuit_destino": "20267565393",
                "apellido": "Reingart",
                "nombres": "Mariano",
                "tipo_docmento": "96",
                "n_documento": "26756539",
                "sexo": "M",
                "direccion": "Saraza",
                "numero": "1234",
                "piso": "",
                "depto": "",
                "localidad": "Hurlingham",
                "provincia": "Buenos Aires",
                "n_postal": "B1688FDD",
                "fecha_nacimiento": "01/01/2000",
                "telefono": "5555-5555",
            },
#.........这里部分代码省略.........
开发者ID:p40l3tt0,项目名称:pysimplesoap,代码行数:103,代码来源:trazamed_tests.py


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