how to set timeout while colling a soap method?

D

dzizes

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,
 
R

ryles

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,

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top