[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Timeout when calling a web service

weiss.matt

6/9/2005 2:56:00 PM

Hey all,

I'm a bit green to ruby so please bear with me as I learn :)

I'm trying to call a web service with ruby. This I have accomplished.
I was able to create an SOAP::RPC::driver like so:

<code>
wsdl = 'url to my wsdl'

driver = SOAP::RPC::Driver.new(wsdl,
"http://localhost:8080/axis/services/ServiceName?wsdl")

</code>

I was able to add web service methods like so...

<code>
driver.add_method("Method1", "in0")
driver.add_method("Method2", "in0")
</code>

My problem is that one of my web service methods takes quite a bit of
time to execute and my call is timing out. I reviewed the .rb files
and I found that the default timeout is 30 seconds. How do I change
the timeout in my driver object or in one of my methods?

Thanks in advance,
Matt

1 Answer

NAKAMURA, Hiroshi

7/16/2005 9:52:00 AM

0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Sorry for late reply. I've not read ruby-talk these days.

weiss.matt@gmail.com wrote:
> My problem is that one of my web service methods takes quite a bit of
> time to execute and my call is timing out. I reviewed the .rb files
> and I found that the default timeout is 30 seconds. How do I change
> the timeout in my driver object or in one of my methods?

driver.options["protocol.http.connect_timeout"] = 999
driver.options["protocol.http.send_timeout"] = 999
driver.options["protocol.http.receive_timeout"] = 999

should work. cf. http://dev.ctor.org/soap4r...

Regards,
// NaHi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)

iD8DBQFC2NiTf6b33ts2dPkRAgdmAKDDN7HYNAQE0UTDL/EnIHbkuagAqQCeOP1F
SKQvQyyd0dGM4OA0x2i09zg=
=JI/T
-----END PGP SIGNATURE-----