1

I am trying to migrate a old webservice in soap made for actionwebservice to a new soap gem. I found wash_out, it looks a great gem for me, but I am not understanding some things in the official page. https://github.com/inossidabile/wash_out

I have a struture in action webservice like:

class DataElement < ActionWebService::Struct
  member :data_id, :int
  member :state, :string
  member :tag, :string
end

class DatasResponse < ActionWebService::Struct
  member :datas, [DataElement]
  member :code, :int
  member :description, :string
end

then trying to migrate this to wash_out, how this will stay to get the same thing?

class DataElement < WashOut::Type
  map :universe => {
    :broadcast_id => :int,
    :state => :string,
    :tag => :string,
  }
end

class BroadcastsResponse < WashOut::Type
  map :universe => {
    :broadcasts => [BroadcastElement], # can say that tis is an array?
                                       # when use map am I saying that this is an array?
    :code => :int,
    :description => :string
  }
end

I am not understanding the documentation for the types. How can I define type with and array inside?

Maybe I am getting this wrong, I am new to ruby and soap. I can't turn this to REST because it used in legacy services.

fabio
  • 119
  • 10

0 Answers0