a simple code to define a web service structures:
class CLL_Answer < CLL_Struct
member :answer, :bool
member :answer_description, :string
member :error, :bool
member :error_description, :string
This is my setter
def error_description=(value)
@answer_description = nil
@error = true
@error_description = value
end
end
and now, the webservice
class UnifiedLoginApi < ActionWebService::API::Base
api_method :test1,
:returns => [CLL_Answer]
end
class UnifiedLoginController < ApplicationController
wsdl_service_name ‘UnifiedLogin’
web_service_scaffold :invoke
def test1
answer = CLL_Answer.new
answer.answer_description = “hello world!!!”
answer
end
end
well, I’m supposed to receive an answer structures, with the member
answer_description with the value “hello world!!!”, instead of that, I
receive a nil value in answer_description, so I put a breakpoint in
CLL_Answer.answer_description= and it reaches the breakpoint, but I
never called that function!!! it seems that someone is calling that
function with no value before the web service returns the value to the
caller, and I don’t know why