Guest User

Untitled

a guest
Jan 19th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1.  
  2. from rpclib.server.django import DjangoApplication # not real import path.
  3. from rpclib.service import ServiceBase
  4. from rpclib.interface.wsdl import Wsdl11
  5. from rpclib.protocol.soap import Soap11
  6. from rpclib.application import Application
  7.  
  8. class HelloWorldService(ServiceBase):
  9. @soap(String, Integer, _returns=Iterable(String))
  10. def say_hello(self, name, times):
  11. for i in xrange(times):
  12. yield 'Hello, %s' % name
  13.  
  14.  
  15. hello_world_service = DjangoApplication(Application([HelloWorldService],
  16. 'some.tns',
  17. interface=Wsdl11(),
  18. in_protocol=Soap11(),
  19. out_protocol=Soap11()
  20. ))
Add Comment
Please, Sign In to add comment