SOAP error: Cannot map <class> to SOAP/OM

Hi,

Ruby 1.8.7
soap 1.5.8
Linux & Mac

I’m getting an odd error from the soap library while attempting to
connect to a Sympa 5 server in one of our production apps:

A SOAP::Mapping::MappingError occurred in mail_list#display_list:

Cannot map Array to SOAP/OM.
[RAILS_ROOT]/vendor/gems/soap4r-1.5.8/lib/soap/mapping/
encodedregistry.rb:356:in `_obj2soap’

The line in question is this:

soap = @stub.authenticateAndRun(@email, @connection, ‘lists’, [nil])

Here @stub is the SOAP::RPC::Driver object, @email is the postmaster’s
email address, and @connection is the result of @stub.login.

Replacing [nil] with just nil doesn’t work either. Then it complains
that it cannot map NilClass to SOAP/OM.

What’s odd is that I can’t duplicate this with a standalone program,
and it seems to work fine on our preview boxes. It’s only on our
production boxes that this occurs.

Here’s a standalone script that works fine, and simulates what we’re
doing:

require ‘soap/rpc/driver’

server = ‘http://our.sympa.com/sympasoap
email = ‘[email protected]
passwd = ‘XXXXXX’
nspace = ‘urn:sympasoap’

soap = SOAP::RPC::Driver.new(server, nspace)

soap.add_method(‘login’, ‘email’, ‘password’)
soap.add_method
(‘authenticateAndRun’,‘email’,‘cookie’,‘service’,‘parameters’)
cookie = soap.login(email, passwd)

Get all lists

p soap.authenticateAndRun(email, cookie, ‘lists’, nil)

Get test list

p soap.authenticateAndRun(email, cookie, ‘lists’, ‘testlist’)

Any ideas what could be causing this?

Regards,

Dan

For more on Sympa:

http://www.sympa.org

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs