From: Martin Stannard Date: 2003-11-11T07:59:55+09:00 Subject: SOAP4r sequences and authentication Hi, I've been asked to generate a SOAP client for a J2EE project. I've been given a wsdl file and running wsdl2ruby on it generates a working client. The problem I'm having is in retrieving multiple items from the server. The wsdl file contains the following: and wsdl2ruby generates these classes: class Channel @@schema_type = "Channel" @@schema_ns = "http://test.com.au" def code @code end def code=(value) @code = value end def name @name end def name=(value) @name = value end def category @category end def category=(value) @category = value end def initialize(code = nil, name = nil, category = nil) @code = code @name = name @category = category end end class ChannelList @@schema_type = "ChannelList" @@schema_ns = "http://test.com.au" def Channel @channel end def Channel=(value) @channel = value end def initialize(channel = nil) @channel = channel end end When I run the generated client.rb file and call listAllChannels, which is supposed to return a ChannelList containg a number of channels, only one channel is returned. I assume that this is due to the ChannelList class only holding one Channel. Is there a way of generating a client that returns an array of channels using wsdl2ruby.rb from the wsdl file shown above? I've had a brief look at some of the SOAP spec and it looks like using SOAP-ENC:Array for the ChannelList may have been a better description of the data but I'm not in a position to change that. On a related issue how would I go about passing authentication data username and password with a SOAP request? TIA, Martin