Issue with Web Service

I have the following:

File: subscription_api.rb

class SubscriptionApi < ActionWebService::API::Base

api_method :newTest, :returns => [ [[:string]] ]

end

File: subscription_controller.rb

class SubscriptionController < ApplicationController

wsdl_service_name ‘Subscription’

web_service_scaffold :invoke

def newTest()
return [ [‘a’,‘a’],[‘b’,‘b’],[‘c’,‘c’]]
end

end

When I run the scaffold generated code I get back my string array. When
I try to call this from .NET it sees it as a “string[][]” so I declare:

string[][] i = sserv.NewTest();

…but this bombs each time.

Any idea what I’m missing?

With statement like this

:returns => [ [[:string]] ]

you define that your methods returns an array or arrays of arrays of
strings, but in the method implementation you return an array of arrays
of
strings. :slight_smile:

Change it to

:returns => [[:string]]

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