|
|
|
@ -5,9 +5,18 @@ Este teste vai verificar um servidor, executado atraves do comando |
|
|
|
'run_fake_soap_server.py', para enviar requisicoes SOAP e esperar as |
|
|
|
responstas em formato WSDL, de forma a simular o servidor da SEFAZ. |
|
|
|
|
|
|
|
Usando suds |
|
|
|
|
|
|
|
>>> from suds.client import Client |
|
|
|
>>> url = 'http://localhost:8080/ServidorNFEFalso?wsdl' |
|
|
|
>>> #client = Client(url) |
|
|
|
>>> #print client |
|
|
|
>>> #print client.service.ping('mario', 5) |
|
|
|
>>> client = Client('http://localhost:8080/ServidorNFEFalso?wsdl', cache=None) |
|
|
|
>>> client.set_options(retxml=True) |
|
|
|
>>> print client.service.ping('mario', 5) |
|
|
|
|
|
|
|
Usando soaplib |
|
|
|
|
|
|
|
>>> #from run_fake_soap_server import ServidorNFEFalso |
|
|
|
>>> #from soaplib.client import ServiceClient, make_service_client |
|
|
|
>>> #client = make_service_client('http://localhost:8080/', ServidorNFEFalso()) |
|
|
|
>>> #print client.ping('Brasil', 5) |
|
|
|
['Brasil', 'Brasil', 'Brasil', 'Brasil', 'Brasil'] |
|
|
|
|