Class resolution problem

M

Mike Calder

Please bear with me, I'm a beginner, and I'm beginning to think, of very
little brain. I'm trying to run a few of the standard samples and look at
the code to learn Ruby.
Currently I'm on raabrowser. I think I've loaded all the dependencies, but I
get an error -

ruby raabrowser.rb
Loading devel/logger compatibility library...
/usr/local/lib/ruby/site_ruby/1.8/soap/streamHandler.rb:198:in `send_post':
404: Not Found (SOAP::HTTPStreamError)
from /usr/local/lib/ruby/site_ruby/1.8/soap/streamHandler.rb:93:in
`send'
from /usr/local/lib/ruby/site_ruby/1.8/soap/rpc/proxy.rb:108:in
`invoke'
from /usr/local/lib/ruby/site_ruby/1.8/soap/rpc/proxy.rb:117:in `call'
from /usr/local/lib/ruby/site_ruby/1.8/soap/rpc/driver.rb:195:in
`call'
from (eval):2:in `getProductTree'
from ./RAA.rb:23:in `__send__'
from ./RAA.rb:23:in `method_missing'
from raabrowser.rb:108:in `initialize'
from raabrowser.rb:131:in `new'
from raabrowser.rb:131

OK, I look at the stacktrace and follow the source code, it all makes sense
down to StreamHandler.

The code I have is in /usr/local/lib/ruby/site_ruby/1.8/soap/StreamHandler.rb:

line 93: send_post(conn_data, soapaction, charset)

ine 198: raise HTTPStreamError.new("#{ res.status }: #{ res.reason }")

So presumably I have to find a class definition of HTTPStreamError.

A grep of /usr/local/lib/ruby/site_ruby/1.8/soap gives:

grep "HTTPStreamError" *.rb
soap.rb:class HTTPStreamError < StreamError; end
soap.rb:class PostUnavailableError < HTTPStreamError; end
soap.rb:class MPostUnavailableError < HTTPStreamError; end
streamHandler.rb: raise HTTPStreamError.new("#{ res.status }:
#{ res.reason }")

so I look in soap.rb and find, sometime after a "module SOAP" declaration, so
we're looking in the right place, the following code:

which to my little brain includes a definition of the class we should be
looking for (SOAP::HTTPStreamError) and basically equivalences it to
StandardError (via SOAP::StreamError and SOAP::Error), which I presume is a
core class, so I try that:

ruby -e 'class HTTPStreamHandler < StandardError; end; p HTTPStreamHandler'
HTTPStreamHandler

Yup, that works.

so, the problem must be that soap.rb is not being included or is otherwise
failing?

But /usr/local/lib/ruby/site_ruby/1.8/soap/StreamHandler.rb has

which I presume points to /usr/local/lib/ruby/site_ruby/1.8/soap/soap.rb, and
there is no Load Error message or other indication that soap.rb contains bad
code.

What am I missing?
 
D

David Alan Black

Hi --

Mike Calder said:
/usr/local/lib/ruby/site_ruby/1.8/soap/streamHandler.rb:198:in `send_post':
404: Not Found (SOAP::HTTPStreamError)

This means that a SOAP::HTTPStreamError has been raised (with the
message "404: Not Found"), not that the SOAP::HTTPStreamError class
has not been found.


David
 
N

NAKAMURA, Hiroshi

Hi,
This means that a SOAP::HTTPStreamError has been raised (with the
message "404: Not Found"), not that the SOAP::HTTPStreamError class
has not been found.

Yes. RAA SOAP interface is still down to reflect the RAA change. It is
still in test phase and will up within this week. Sorry for inconvenience.

Regards,
// NaHi
 
N

NAKAMURA, Hiroshi

Hi, again,

Yes. RAA SOAP interface is still down to reflect the RAA change. It is
still in test phase and will up within this week. Sorry for inconvenience.

I thought that untested developing version was better than not found.
It should work now. Would you please re-run your soap client again?

Regards,
// NaHi
 
M

Mike Calder

Hi, again,



I thought that untested developing version was better than not found.
It should work now. Would you please re-run your soap client again?

Regards,
// NaHi

Hi.

At 18:45 BST I have:

ruby raabrowser.rb
Loading devel/logger compatibility library...
/usr/local/lib/ruby/site_ruby/1.8/soap/streamHandler.rb:198:in `send_post':
404: Not Found (SOAP::HTTPStreamError)
from /usr/local/lib/ruby/site_ruby/1.8/soap/streamHandler.rb:93:in
`send'
from /usr/local/lib/ruby/site_ruby/1.8/soap/rpc/proxy.rb:108:in
`invoke'
from /usr/local/lib/ruby/site_ruby/1.8/soap/rpc/proxy.rb:117:in `call'
from /usr/local/lib/ruby/site_ruby/1.8/soap/rpc/driver.rb:195:in
`call'
from (eval):2:in `getProductTree'
from ./RAA.rb:23:in `__send__'
from ./RAA.rb:23:in `method_missing'
from raabrowser.rb:108:in `initialize'
from raabrowser.rb:131:in `new'
from raabrowser.rb:131


Did you mean for me to re-download the application code? I didn't do that.
 
N

NAKAMURA, Hiroshi

Hi,

Good morning from Japan,

Mike said:
Did you mean for me to re-download the application code? I didn't do that.

No. Apologies, it's my fault. I uploaded SOAP interface version 1.0.2
at http://raa.ruby-lang.org/soap/1.0.2/ and forgot to update version 1.0
at http://raa.ruby-lang.org/soap/1.0/ .
I updated now. Please try again at your leisure?

FYI: latest RAA SOAP interface sample client in soap4r distribution uses
1.0.2 interface and old releases use 1.0 interface. Difference between
1.0 and 1.0.2 is that 1.0.2 has 'created' and 'updated' information
whereas 1.0 has only 'update'. (just added 'created' and renamed
'update' with 'updated') That's all. Don't mind to use 1.0 interface
if you don't need 'created' information.

1.0 and 1.0.2 interfaces are a CGI application. The 1.1.0 interface
released in this week based on webrick servlet so that it's faster than
before.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top