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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -