From: Ian Macdonald Date: 2003-07-16T18:03:47+09:00 Subject: Re: soap4r 1.4.8.1 with REXML 2.7.1 - no REXML::VERSION_MAJOR --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed 16 Jul 2003 at 17:29:40 +0900, Damphyr wrote: > I grabbed the latest soap4r and had a go with the wsdl driver, only to > come to an abrupt stop with the following > > site_ruby/1.6/wsdl/rexmlparser.rb:40:in `doParse': uninitialized > constant VERSION_MAJOR at REXML (NameError) > from f:/devlab/ruby/lib/ruby/site_ruby/1.6/wsdl/parser.rb:85:in > `parse' > from f:/devlab/ruby/lib/ruby/site_ruby/1.6/soap/wsdlDriver.rb:81:in > `parse' > from f:/devlab/ruby/lib/ruby/site_ruby/1.6/soap/wsdlDriver.rb:39:in > `initialize' > from wsdltest.rb:5:in `new' > from wsdltest.rb:5 > > > I?m running 1.6.8 on W2K at the moment and I looked for a VERSION_MAJOR > in REXML but the beast does not want to show itself. > Any ideas ? I had similar problems. Try the attached diff. Ian -- Ian Macdonald | Radial Telemetry Infiltration System Administrator | ian@caliban.org | http://www.caliban.org | | --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ruby-SOAP4R-1.4.8.1-REXML.diff" diff -uNr soap4r-1_4_8_1.orig/lib/soap/rexmlparser.rb soap4r-1_4_8_1/lib/soap/rexmlparser.rb --- soap4r-1_4_8_1.orig/lib/soap/rexmlparser.rb 2003-01-16 05:01:00.000000000 -0800 +++ soap4r-1_4_8_1/lib/soap/rexmlparser.rb 2003-05-08 16:10:59.000000000 -0700 @@ -36,8 +36,10 @@ def doParse( stringOrReadable ) source = nil - if REXML::VERSION_MAJOR < 2 or - ( REXML::VERSION_MAJOR == 2 and REXML::VERSION_MINOR <= 4 ) + version_major, version_minor = + REXML::Version.match(/(\d+)\.(\d+)/)[1,2].map! {|x| x.to_i} + if version_major < 2 or + ( version_major == 2 and version_minor <= 4 ) source = if charset ::SOAP::Charset.codeConv( stringOrReadable, ::SOAP::Charset.getCharsetStr( charset ), 'UTF8' ) else diff -uNr soap4r-1_4_8_1.orig/lib/wsdl/rexmlparser.rb soap4r-1_4_8_1/lib/wsdl/rexmlparser.rb --- soap4r-1_4_8_1.orig/lib/wsdl/rexmlparser.rb 2003-01-16 05:04:54.000000000 -0800 +++ soap4r-1_4_8_1/lib/wsdl/rexmlparser.rb 2003-05-08 16:10:49.000000000 -0700 @@ -36,8 +36,10 @@ def doParse( stringOrReadable ) source = nil - if REXML::VERSION_MAJOR < 2 or - ( REXML::VERSION_MAJOR == 2 and REXML::VERSION_MINOR <= 4 ) + version_major, version_minor = + REXML::Version.match(/(\d+)\.(\d+)/)[1,2].map! {|x| x.to_i} + if version_major < 2 or + ( version_major == 2 and version_minor <= 4 ) source = if charset ::SOAP::Charset.codeConv( stringOrReadable, ::SOAP::Charset.getCharsetStr( charset ), 'UTF8' ) else --vtzGhvizbBRQ85DL--