[Soap-Python] gist: 1242760 Unable to run with Django

Raoul Thill raoul.thill at gmail.com
Wed Mar 7 16:48:04 CET 2012


Hi,

based on the information in the comments section of the Gist, I am
unable to run rpclib in conjunction with Django 1.4c1 and Apache
mod_wsgi.

The Apache server simply blocks upon the first request. When doing an
strace on the processes I can see that some xsd file are generated
in /tmp and after that nothing happens. No pages are served by this
Apache anymore.

Could you help me to track down the problem, I used in my tests the
following code:

from rpclib.server.django import DjangoApplication # not real import
path.
from rpclib.model.primitive import String, Integer
from rpclib.model.complex import Iterable
from rpclib.service import ServiceBase
from rpclib.interface.wsdl import Wsdl11
from rpclib.protocol.soap import Soap11
from rpclib.application import Application
from rpclib.decorator import rpc

class HelloWorldService(ServiceBase):
    @rpc(String, Integer, _returns=Iterable(String))
    def say_hello(ctx, name, times):
        for i in xrange(times):
            yield 'Hello, %s' % name

hello_world_service = DjangoApplication(Application([HelloWorldService],
        'some.tns',
        interface=Wsdl11(),
        in_protocol=Soap11(),
        out_protocol=Soap11()
    ))

and replaced based on the comments:

from rpclib.server.django import DjangoApplication # not real import
path.
by:
from rpclib.server.wsgi import WsgiApplication

and modified the service definition into:

hello_world_service=WsgiApplication(Application([HelloWorldService],
        'some.tns',
        interface=Wsdl11(),
        in_protocol=Soap11(),
        out_protocol=Soap11()
    ))

Both examples are blocking my server.

Thanks for your help.
Raoul



More information about the Soap mailing list