You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Params from XML attributes;
# e.g. for a request to the 'AddCircle' action:
# <soapenv:Envelope>
# <soapenv:Body>
# <AddCircle>
# <Circle radius="5.0">
# <Center x="10" y="12" />
# </Circle>
# </AddCircle>
# </soapenv:Body>
# </soapenv:Envelope>
soap_action "AddCircle",
:args => { :circle => { :center => { :@x => :integer,
:@y => :integer },
:@radius => :double } },
:return => nil, # [] for wash_out below 0.3.0
:to => :add_circle
def add_circle
circle = params[:circle]
Circle.new(circle[:center][:x], circle[:center][:y], circle[:radius])
render :soap => nil
end
My XML request has many nested arguments and I don't want to define mappings (:args) for each XML attribute. Is there any way to map the XML arguments to ruby class or a more convenient way to do this.
The text was updated successfully, but these errors were encountered:
Going by the sample example:
My XML request has many nested arguments and I don't want to define mappings (:args) for each XML attribute. Is there any way to map the XML arguments to ruby class or a more convenient way to do this.
The text was updated successfully, but these errors were encountered: