Go to Google Groups Home    soap4r
Sending User object (tried everything!)

Sergio <sergio.souj...@gmail.com>

Here is my live service so you can try for yourself:
http://saoj-office.dyndns.org:8080/ts?wsdl

Now my code which does not work: (feel free to try for yourself)

require 'rubygems'
gem 'soap4r'
require 'soap/wsdlDriver'

url = 'http://saoj-office.dyndns.org:8080/ts?wsdl'
service = SOAP::WSDLDriverFactory.new(url).create_rpc_driver
puts service.sayHello(nil).m_return # OK
puts service.sayHelloTo("Sergio").m_return # Does not work
u = service.getUserFromEmail("s...@saoj.com").m_return # OK
puts u.username
## How do I send an User object to the method sayHelloToUser(User
u) ???

c:\eclipse\workspace\HelloWS\ruby>ruby client.rb
Hi there! Now is: Tue Jun 16 16:12:09 BRT 2009
Hi null! Now is: Tue Jun 16 16:12:09 BRT 2009
saoj

PROBLEMS/QUESTIONS:

- See the "Hi null" in the second line of the output above? "Sergio"
parameter is not being passed to the server somehow.
- How do you pass an User object with an username attribute? I really
tried everything without success. This is now very clear at all. :-(