From: brabuhr@... Date: 2007-02-24T04:22:18+09:00 Subject: Re: SOAP Request Problem On 2/23/07, mid wrote: > I'm trying to use a web service and I have found two ways to go about it. > > [...] > Option 2 > ======== > I use wsdl2ruby. This method returns data in a format I can use. I can > access elements by using something like response.AddressLine3 etc. > > Unfortunately, using wsdl2ruby, I can't seem to create the correct XML > elements. > > [...] I once had a similar issue where the SOAP request generated from my wsdl2ruby client didn't have proper namespaces specified. My mistake at that time was passing a Hash or a String instead of the correct object to the method: #!/usr/bin/env ruby require 'UserInfoDriver.rb' soap = UserInfoSoap.new(endpoint_url) # run ruby with -d to see SOAP wiredumps. soap.wiredump_dev = STDERR if $DEBUG # SYNOPSIS # GetUserByUsername(parameters) # # ARGS # parameters GetUserByUsername # - {urn:::Users}GetUserByUsername # # RETURNS # parameters GetUserByUsernameResponse # - {urn:::Users}GetUserByUsernameResponse # parameters = "lapidary" p soap.getUserByUsername(parameters) # => doesn't work parameters = GetUserByUsername.new("lapidary") p soap.getUserByUsername(parameters) # => does work