Wrong number of arguments (0 for 1) when calling 0 argument web service call

I created a Ruby client using the following command:
wsdl2ruby.rb --wsdl
https://fba-inbound.amazonaws.com/doc/2007-05-10/FBAInboundService.wsdl
–type client --force

Here is how I call the service:

@service = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
@service.generate_explicit_type = true
@service.wiredump_dev = STDOUT
@service.endpoint_url = url

begin
result = @service.GetServiceStatus()
rescue Exception => ex
puts “Caught an exception:\n#{ex}”
end

Here is the relevant part of default.rb (generated by the above
command):

{http://fba-inbound.amazonaws.com/doc/2007-05-10/}GetServiceStatus

class GetServiceStatus
@@schema_type =
“GetServiceStatus”
@@schema_ns = “http://fba-inbound.amazonaws.com/doc/
2007-05-10/”
@@schema_qualified = “true”
@@schema_element = []

def initialize
end

end

{http://fba-inbound.amazonaws.com/doc/

2007-05-10/}GetServiceStatusResponse
class GetServiceStatusResponse
@@schema_type = “GetServiceStatusResponse”
@@schema_ns = “http://fba-inbound.amazonaws.com/doc/2007-05-10/
@@schema_qualified = “true”
@@schema_element = [[“getServiceStatusResult”, [nil,
XSD::QName.new(“http://fba-inbound.amazonaws.com/doc/2007-05-10/”,
“GetServiceStatusResult”)]], [“responseMetadata”, [nil,
XSD::QName.new(“http://fba-inbound.amazonaws.com/doc/2007-05-10/”,
“ResponseMetadata”)]]]

def GetServiceStatusResult
  @getServiceStatusResult
end

def GetServiceStatusResult=(value)
  @getServiceStatusResult = value
end

def ResponseMetadata
  @responseMetadata
end

def ResponseMetadata=(value)
  @responseMetadata = value

end
def initialize(getServiceStatusResult = nil, responseMetadata =
nil)
@getServiceStatusResult = getServiceStatusResult
@responseMetadata = responseMetadata
end
end

When I run this I get:
Caught an exception: wrong number of arguments (0 for 1)

Also, when I try to get clever and call it as follows:
result = @service.GetServiceStatus(nil)

I can see the response from the web server, but I get the following
exception (I believe this is thrown when creating the
GetServiceStatusResponse object as the “result” variable above is
nil):
Caught an exception: private method `sub’ called for nil:NilClass

Calls to other methods which have at least one argument work, but I
cannot successfully call this 0-argument method and get back the
response.

Any help is appreciated.

Thanks.
Eric

On Mon, Apr 14, 2008 at 7:41 PM, E-Mac [email protected] wrote:

@service.endpoint_url = url
Here is the relevant part of default.rb (generated by the above
def initialize
XSD::QName.new(“http://fba-inbound.amazonaws.com/doc/2007-05-10/”,
end
nil)

Calls to other methods which have at least one argument work, but I
cannot successfully call this 0-argument method and get back the
response.

Any help is appreciated.

This would probably be more appropriate for the ruby-talk mailing list.

Regards,
Michael G.