You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
722 B

from soaplib.wsgi_soap import SimpleWSGISoapApp
from soaplib.service import soapmethod
class ServidorNFEFalso(SimpleWSGISoapApp):
from soaplib.serializers.primitive import String, Integer, Array, Null
@soapmethod(String, Integer, _returns=String)
def ping(self, palavra, vezes):
return ','.join([palavra for i in range(vezes)])
if __name__ == '__main__':
porta = 8080
# Via Tornado
import tornado.wsgi
import tornado.httpserver
import tornado.ioloop
application = ServidorNFEFalso()
container = tornado.wsgi.WSGIContainer(application)
http_server = tornado.httpserver.HTTPServer(container)
http_server.listen(porta)
tornado.ioloop.IOLoop.instance().start()