From: Daniel Finnie Date: 2007-01-13T06:06:34+09:00 Subject: Re: Problem with open-uri xml = REXML::Document.new(open("http://myoms.net/soap/oms2.wsdl")*.read*) Try that. Dan Gregory Brown wrote: > On 1/12/07, David Sulc wrote: >> Hi ! >> >> I'm unable to open certain URIs with open-uri. Here is the code : >> >> require 'rexml/document' >> require 'open-uri' >> xml = REXML::Document.new(open("http://myoms.net/soap/oms2.wsdl")) >> >> The error I get is : >> >> /usr/lib/ruby/1.8/rexml/parsers/baseparser.rb:133:in `stream=': Tempfile >> is not a valid input stream. It must be (RuntimeError) >> either a String, IO, StringIO or Source. >> >> I have tried to "cast" the parameter to IO with to_io, but it still >> doesn't work. Any ideas ? > > if it works on strings just do > > open("http://myurl.com").read > >