arskom/rpclib — Issue #107: How do I setup an Endpoint WSDL file in SOAP server?
Author: tlam
Created: 2011-10-26 18:13:29+00:00
State: open

I'm currently setting up a soap server with rpclib which will listen to incoming messages and consume the data. The sender currently has an Endpoint WSDL WSDL file. My soap server currently looks like:

import logging
import os
import site
import sys

from rpclib.application import Application
from rpclib.decorator import srpc
from rpclib.interface.wsdl import Wsdl11
from rpclib.protocol.soap import Soap11
from rpclib.service import ServiceBase
from rpclib.model.complex import Iterable
from rpclib.model.primitive import Integer
from rpclib.model.primitive import String
from rpclib.server.wsgi import WsgiApplication

class HelloWorldService(ServiceBase):
@srpc(String, Integer, _returns=Iterable(String))
def say_hello(name, times):
'''
Docstrings for service methods appear as documentation in the wsdl
what fun
@param name the name to say hello to
@param the number of times to say hello
@return the completed array
'''

for i in xrange(times):
yield 'Hello, %s' % name

wsdl = Wsdl11()
application = WsgiApplication(Application([HelloWorldService], 'rpclib.examples.hello.soap',
interface=wsdl, in_protocol=Soap11(), out_protocol=Soap11()))

Assuming the WSDL file is called `outbount_message.wsdl`. How do I setup the above code to use this WSDL file?