[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Problems with Soap4R 1.5.0 and Ruby 1.8

Joey Gibson

9/18/2003 4:58:00 PM

I just downloaded and installed Soap4R on top of my Pragmatic Ruby 1.8.0
on Win2k. After installing the requirements that I didn't have, such as
devel-logger and http-client2, I got the error at the bottom of this
email when trying to require 'soap/driver'. This is occurring when
Soap4R tries to discover which XML parser is available, and since 1.8.0
includes rexml, it should find that. But it dies when trying to load
xmlparser.so, which I assume is the library for one of the other
XMLParsers. Changing the order of loading in xsd/xmlparser.rb to try
rexml first got it working for me, but I don't know what the longterm
solution is. Here's what I changed:

loaded = false
[
'xsd/xmlparser/rexmlparser', # I moved this one to the top
'xsd/xmlparser/xmlscanner',
'xsd/xmlparser/xmlparser',
].each do |lib|

Here's the error:

[C:\New\Ruby]irb
irb(main):001:0> require 'soap/driver'
Loading compatibility library...
TypeError: XMLParser is not a class
from C:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt/xmlparser.so
from C:/ruby/lib/ruby/site_ruby/1.8/xml/parser.rb:5
from
C:/ruby/lib/ruby/site_ruby/1.8/xsd/xmlparser/xmlparser.rb:21:in `require'
from C:/ruby/lib/ruby/site_ruby/1.8/xsd/xmlparser/xmlparser.rb:21
from C:/ruby/lib/ruby/site_ruby/1.8/xsd/xmlparser.rb:64:in `require'
from C:/ruby/lib/ruby/site_ruby/1.8/xsd/xmlparser.rb:64
from C:/ruby/lib/ruby/site_ruby/1.8/xsd/xmlparser.rb:59:in `each'
from C:/ruby/lib/ruby/site_ruby/1.8/xsd/xmlparser.rb:61
from C:/ruby/lib/ruby/site_ruby/1.8/soap/parser.rb:21:in `require'
from C:/ruby/lib/ruby/site_ruby/1.8/soap/parser.rb:21
from C:/ruby/lib/ruby/site_ruby/1.8/soap/processor.rb:23:in
`require'
from C:/ruby/lib/ruby/site_ruby/1.8/soap/processor.rb:23
from C:/ruby/lib/ruby/site_ruby/1.8/soap/rpc/proxy.rb:21:in
`require'
from C:/ruby/lib/ruby/site_ruby/1.8/soap/rpc/proxy.rb:21
from C:/ruby/lib/ruby/site_ruby/1.8/soap/proxy.rb:20:in `require'
from C:/ruby/lib/ruby/site_ruby/1.8/soap/proxy.rb:20
from C:/ruby/lib/ruby/site_ruby/1.8/soap/rpc/driver.rb:21:in
`require'
from C:/ruby/lib/ruby/site_ruby/1.8/soap/rpc/driver.rb:21
from C:/ruby/lib/ruby/site_ruby/1.8/soap/compat.rb:29:in `require'
from C:/ruby/lib/ruby/site_ruby/1.8/soap/compat.rb:29
from C:/ruby/lib/ruby/site_ruby/1.8/soap/driver.rb:20:in `require'
from C:/ruby/lib/ruby/site_ruby/1.8/soap/driver.rb:20
from (irb):1:in `require'
from (irb):1irb(main):002:0>

--
Dean saor, dean saor an spiorad. Is seinn d'orain beo.

http://www.joey...
http://www.joey.../blog/life/Wisdom.html




3 Answers

NAKAMURA, Hiroshi

9/19/2003 8:23:00 AM

0

Hi,

> From: "Joey Gibson" <joey@joeygibson.com>
> Sent: Friday, September 19, 2003 1:57 AM

> I just downloaded and installed Soap4R on top of my Pragmatic Ruby 1.8.0
> on Win2k. After installing the requirements that I didn''t have, such as
> devel-logger and http-client2,

Sorry for your inconvenience. Soap4r and required libraries
will be bundled in the next release of Ruby/1.8.

> I got the error at the bottom of this
> email when trying to require ''soap/driver''. This is occurring when
> Soap4R tries to discover which XML parser is available, and since 1.8.0
> includes rexml, it should find that.

Yes.

> But it dies when trying to load
> xmlparser.so, which I assume is the library for one of the other
> XMLParsers.

> Here''s the error:
>
> [C:\New\Ruby]irb
> irb(main):001:0> require ''soap/driver''
> Loading compatibility library...
> TypeError: XMLParser is not a class
> from C:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt/xmlparser.so
> from C:/ruby/lib/ruby/site_ruby/1.8/xml/parser.rb:5

Hmm. Loading "XMLParser" library which is included in the PragProg
installer seems to be failed.

I downloaded and installed ruby180-10.exe from
http://sourceforge.net/project/showfiles.php?grou...
It seems to work for me.

C:\ruby\bin>ruby -rxmlparser -e ''p XML::Parser.new''
#<XMLParser:0x2847d68>

I''ve no idea now. Is there anyone who met the error?

By the way,

> irb(main):001:0> require ''soap/driver''
> Loading compatibility library...

From soap4r/1.5.0, require ''soap/rpc/driver'' instead of
''soap/driver''. Warning about loading compatibility library shoud
not be dumped then.

Regards,
// NaHi

gabriele renzi

9/19/2003 10:02:00 AM

0

il Fri, 19 Sep 2003 17:22:35 +0900, "NAKAMURA, Hiroshi"
<nahi@keynauts.com> ha scritto::


>I downloaded and installed ruby180-10.exe from
>http://sourceforge.net/project/showfiles.php?grou...
>It seems to work for me.
>
> C:\ruby\bin>ruby -rxmlparser -e ''p XML::Parser.new''
> #<XMLParser:0x2847d68>
>
>I''ve no idea now. Is there anyone who met the error?
>

could it be related to the loading order of the variuos files ?
It seem that in file lib/xsd/xmlparser XMLParser is defined as a
module.
Is it possible that at some point appears a thing like this that
overrides the previous definiton of XMLParser as a class ?


>> require ''xsd/xmlparser''
=> true
>> XMLParser.class
=> Module
>> require ''xml/parser''
TypeError: XMLParser is not a class
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt/xmlpa
rser.so
from
C:/Programmi/ruby-1.8/ruby/lib/ruby/site_ruby/1.8/xml/parser.rb:5
from (irb):3:in `require''
from (irb):3
>>

It seem that the pragprog installer delivers
ruby\lib\ruby\site_ruby\1.8\xml*
(I think it is XMLParser from yoshida masato ) and that in this module
xmlparser.so defines ::XMLParser as a top level class, thus colliding
with the XMLParser definition of XMLParser as a module.

BTW having REXML as the parser fix this problem.

just my 2 cents

NAKAMURA, Hiroshi

9/20/2003 7:30:00 AM

0

Hi,

> From: "gabriele renzi" <surrender_it@rc1.vip.ukl.yahoo.com>
> Sent: Friday, September 19, 2003 7:17 PM

> >I downloaded and installed ruby180-10.exe from
> >http://sourceforge.net/project/showfiles.php?grou...
> >It seems to work for me.
> >
> > C:\ruby\bin>ruby -rxmlparser -e ''p XML::Parser.new''
> > #<XMLParser:0x2847d68>
> >
> >I''ve no idea now. Is there anyone who met the error?

> could it be related to the loading order of the variuos files ?
> It seem that in file lib/xsd/xmlparser XMLParser is defined as a
> module.
> Is it possible that at some point appears a thing like this that
> overrides the previous definiton of XMLParser as a class ?

Doh! I remember that soap4r introduces XSD module constants
into toplevel. XSD::XMLParser crushes with XMLParser at
toplevel...

Thank you. I''ll fix.

Regards,
// NaHi