ruby on rails - Savon 2.1 adding attributes to message XML tags -
i trying add atribute 1 of xml elements generating soap request making.
i see savon has attributes hash, adds attributes soap message tag. there equivalent feature have not come across generated xml in message body?
ie have tag in message body
<clientdata></clientdata>
i able able like
<clientdata id=1></clientdata>
is possible using savon hash syntax?
well ended digging gyoku(the gem savon uses form xml) , found has special hash called :attributes! key. calling , passing in hash of elements specified attribues , value did needed.
ie asked aove
:attributes! => { "clientdata => { :id => 1 } }
at end of :message option did trick.
Comments
Post a Comment