Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to set timeout while colling a soap method?

2 views
Skip to first unread message

dzizes

unread,
Jul 13, 2009, 9:07:52 AM7/13/09
to pytho...@python.org

Hello!

I wrote some some python code for executing a soap method:

import SOAPpy
from SOAPpy import WSDL

_server = WSDL.Proxy(some wsdl)
r=_server.generuj(some parameters...)
print r.encode('cp1250')

It works fine. However, the execution time of this soap method might be
long. Therefore, I would like to set a timeout like 1 minute, after which I
would post a timeoute message.

Any ideas?
Greats,


--
View this message in context: http://www.nabble.com/how-to-set-timeout-while-colling-a-soap-method--tp24461403p24461403.html
Sent from the Python - python-list mailing list archive at Nabble.com.

ryles

unread,
Jul 14, 2009, 12:12:01 PM7/14/09
to
On Jul 13, 9:07 am, dzizes <dzizes...@gmail.com> wrote:
> Hello!
>
> I wrote some some python code for executing a soap method:
>
> import SOAPpy
> from SOAPpy import WSDL
>
> _server = WSDL.Proxy(some wsdl)
> r=_server.generuj(some parameters...)
> print r.encode('cp1250')
>
> It works fine. However, the execution time of this soap method might be
> long. Therefore, I would like to set a timeout like 1 minute, after which I
> would post a timeoute message.
>
> Any ideas?
> Greats,
>
> --
> View this message in context:http://www.nabble.com/how-to-set-timeout-while-colling-a-soap-method-...

> Sent from the Python - python-list mailing list archive at Nabble.com.

I don't believe SOAPpy supports this directly. You can set the timeout
globally before you make your SOAP call:

import socket
socket.setdefaulttimeout(60)

http://docs.python.org/library/socket.html#socket.setdefaulttimeout

dzizes

unread,
Jul 15, 2009, 8:07:20 AM7/15/09
to pytho...@python.org

Yes, that is what I was looking for.

Greets!!

--
View this message in context: http://www.nabble.com/how-to-set-timeout-while-colling-a-soap-method--tp24461403p24496577.html

0 new messages