how to set timeout while colling a soap method?

Discussion in 'Python' started by dzizes, Jul 13, 2009.

  1. dzizes

    dzizes Guest

    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.
     
    dzizes, Jul 13, 2009
    #1
    1. Advertising

  2. dzizes

    ryles Guest

    On Jul 13, 9:07 am, dzizes <> 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
     
    ryles, Jul 14, 2009
    #2
    1. Advertising

  3. dzizes

    dzizes Guest

    dzizes, Jul 15, 2009
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sham Ramakrishnan
    Replies:
    2
    Views:
    8,422
    Sham Ramakrishnan
    Jul 1, 2003
  2. Replies:
    4
    Views:
    10,341
  3. John Elliott
    Replies:
    0
    Views:
    273
    John Elliott
    Jun 28, 2004
  4. tony
    Replies:
    1
    Views:
    258
    Manish Bafna
    Feb 28, 2007
  5. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,314
    Brian Candler
    Oct 6, 2004
Loading...

Share This Page