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

Michael Wood esiotrot at gmail.com
Wed Mar 14 08:53:50 CET 2012


On 14 March 2012 09:44, Raoul Thill <raoul.thill at gmail.com> wrote:
> Hi,
>
> thanks for the update, as my message didn't appear on the list I could
> not send an update.
> After turning debugging on and learning some new techniques to work with
> mod_wsgi it turned out that WSGIApplicationGroup %{GLOBAL} must be
> enabled in conjunction with lxml and therefore also for rpclib.

That's not quite true.

Using WSGIApplicationGroup %{GLOBAL} is one possible solution, but it
can also cause problems.

Another possible solution is to use WSGIDaemonProcess as mentioned in
the article that Burak linked to.

e.g.:

http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading#The_mod_wsgi_Daemon_Processes

> raoul
>
> -----Original Message-----
> From: azurIt <azurit at pobox.sk>
> To: soap at python.org
> Subject: Re: [Soap-Python] gist: 1242760 Unable to run with Django
> Date: Tue, 13 Mar 2012 21:25:58 +0100
>
> Hi,
>
> always use %{GLOBAL} for WSGIApplicationGroup in mod_wsgi for apps using lxml.
>
> azur
>
>
>
> ______________________________________________________________
>> Od: "Raoul Thill" <raoul.thill at gmail.com>
>> Komu: <soap at python.org>
>> Dátum: 13.03.2012 19:10
>> Predmet: [Soap-Python] gist: 1242760 Unable to run with Django
>>
>>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

-- 
Michael Wood <esiotrot at gmail.com>


More information about the Soap mailing list