[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Timeout accessing .Net Webservice via POST or GET

Achim Domma

5/21/2007 8:45:00 AM

Hi,

I try to access an .Net webservice which is accessible via HTTP POST
and GET. Using a browser this works just fine, but using Net::HTTP
causes a timeout in rbuf_fill. Any hint how to debug this? Or is it a
know problem with MS ISS? I didn't find anything using
groups.google.com. Here is my code:

Net::HTTP.get_print URI.parse('https://secure...url which works fine
in browser...')

regards,
Achim

2 Answers

Brian Candler

5/21/2007 10:28:00 AM

0

On Mon, May 21, 2007 at 05:50:18PM +0900, Achim Domma wrote:
> Hi,
>
> I try to access an .Net webservice which is accessible via HTTP POST
> and GET. Using a browser this works just fine, but using Net::HTTP
> causes a timeout in rbuf_fill. Any hint how to debug this? Or is it a
> know problem with MS ISS? I didn't find anything using
> groups.google.com. Here is my code:
>
> Net::HTTP.get_print URI.parse('https://secure...url which works fine
> in browser...')

Are you enabling ssl? Try the following sample code from the documentation
embedded in net/https.rb

require 'net/https'
require 'uri'

uri = URI.parse(ARGV[0] || 'https://localhost/')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true if uri.scheme == "https" # enable SSL/TLS
http.start {
http.request_get(uri.path) {|res|
print res.body
}
}

Achim Domma

5/24/2007 9:44:00 AM

0

On 21 Mai, 12:28, Brian Candler <B.Cand...@pobox.com> wrote:
> Are you enabling ssl? Try the following sample code from the documentation
> embedded in net/https.rb
[...]

That solved my problem. Thanks a lot! :-)

Achim