From: "NAKAMURA, Hiroshi" Date: 2003-11-11T11:16:35+09:00 Subject: Re: SOAP4r sequences and authentication Hi, > From: "Martin Stannard" > Sent: Tuesday, November 11, 2003 7:59 AM > 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: > > > > > > > > > > > type="epg:Channel"/> > > Hmm. It seems that the wsdl uses for literal encoding(no encoding). Can I see entire definition of the wsdl? Wsdl2ruby.rb only supports SOAP Encoding now... With SOAP Encoding, WSDL should be like this; To access literal encoding SOAP service, without WSDL, soap4r/sample/soap/icd/* may help you. In short example, following should work. require 'soap/rpc/driver' server = ARGV.shift drv = SOAP::RPC::Driver.new(server, "urn:serviceNamespace") # This line is for literal encoding -> language mapping which has # its origin in ASP.NET. drv.default_encodingstyle = SOAP::EncodingStyle::ASPDotNetHandler::Namespace drv.add_method("getChannelList") drv.getChannedList.Channel.each do |ch| p ch end > Is there a way of generating a client that returns an array of channels > using wsdl2ruby.rb from the wsdl file shown above? Using wsdl2ruby.rb is a must? > On a related issue how would I go about passing authentication data > username and password with a SOAP request? With SOAP Header, not embedding auth data into SOAP Body? There is very low level API for now... An example is in soap4r/sample/soapbox/* but I must add high level API and examples for it. Regards, // NaHi