Skip to Content
avatar image
Former Member

How to Set Network Timeout When Calling a WSDL method?

Normally I can call a WSDL service quickly, but of late the service takes longer than expected. How can I code so that PowerBuilder doesn't have to wait for the WSDL service to finish after an unreasonable time and informs the user that the service is taking longer than anticipated?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 16, 2017 at 09:40 PM

    Then again I tried this instead:

    protected soapconnection c


    c.settimeout(5)

    rc = c.CreateInstance(proxy, ptype)

    and it WORKS!

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 15, 2017 at 06:10 PM

    Hi Ronald;

    Have a look at the "SetTimeout()" method on the PB CONNECTION object.

    HTH

    Regards ... Chris

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 16, 2017 at 09:21 PM

    Hi Chris,

    Im trying to see if this will work:
    var instance protected soapconnection c

    rc = c.CreateInstance(proxy, ptype)
    c.settimeout(5)

    (after 5 minutes)
    Oops doesn't seem to work

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 17, 2017 at 02:26 PM

    Try reversing your statements ...

    c.settimeout(5)

    rc = c.CreateInstance(proxy, ptype)

    Add comment
    10|10000 characters needed characters exceeded