How to get the data from objects in ruby~~please help

S

Sim Wong

Hi all,

I have a web service that will return a BookArray when getBooks method
is called. The web service is in java.
something like this--> public BookArray getBooks(){......}
BookArray,toString() will return all the books name and description in
one string
I have a ruby script that send the soap message to call this web service
and finally print out the result.
--------------------
require 'soap/wsdlDriver'

WSDL_URL = 'http://localhost:9002/BookSearch?wsdl'

factory = SOAP::WSDLDriverFactory.new(WSDL_URL)
driver = factory.create_rpc_driver
soap.wiredump_dev = STDOUT

books = driver.getBooks()

puts books.inspect
-------
after run the ruby script, it didn't print out the All the Book
information in the BookArray.
It printed [#<SOAP::Mapping::Object:0xa73104>].
Dose anyone know how to get ruby to print the data in BookArray in
string form. Something like the BookArray.toString().
Thanks!!!

Sim
 

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,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top