/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 ?
/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.
ran that above code and it worked:
<?xml version='1.0' encoding='UTF-8'?>
<definitions name='OnlineMessengerService'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='uri://www.myoms.net/'
xmlns:soapenc='Error;
xmlns:s0='uri://www.myoms.net/types/'
xmlns:s='http://www.w3.org/2001/XMLSchema'
targetNamespace='uri://www.myoms.net/'
xmlns='Error;
<types>
<s:schema elementFormDefault='qualified'
attributeFormDefault='qualified'
targetNamespace='uri://www.myoms.net/types/'>
<s:complexType name='Time'>
<s:sequence>
<s:element maxOccurs='1' name='year' minOccurs='1'
nillable='false' type='s:long'/>
....
Maybe provide the actual code you are running, if it is not exaclty the
above.
/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 ?
/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.
ran that above code and it worked:
<?xml version='1.0' encoding='UTF-8'?>
<definitions name='OnlineMessengerService'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='uri://www.myoms.net/'
xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:s0='uri://www.myoms.net/types/'
xmlns:s='http://www.w3.org/2001/XMLSchema'
targetNamespace='uri://www.myoms.net/'
xmlns='http://schemas.xmlsoap.org/wsdl/'>
<types>
<s:schema elementFormDefault='qualified'
attributeFormDefault='qualified'
targetNamespace='uri://www.myoms.net/types/'>
<s:complexType name='Time'>
<s:sequence>
<s:element maxOccurs='1' name='year' minOccurs='1'
nillable='false' type='s:long'/>
....
Maybe provide the actual code you are running, if it is not exaclty the
above.
The code I run is different, however this simple example fails too.
/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. from /usr/lib/ruby/1.8/rexml/parsers/baseparser.rb:100:in `initialize'
from /usr/lib/ruby/1.8/rexml/parsers/treeparser.rb:8:in `initialize'
from /usr/lib/ruby/1.8/rexml/document.rb:178:in `build'
from /usr/lib/ruby/1.8/rexml/document.rb:45:in `initialize'
from test.rb:3
/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 ?