2

When supplying savon with:

hash = { 
              "Objects" => { //stuff here }, 
           :attributes! => { "Objects" => {"xsi:type" => "Something"}}
       }

I get:

<Objects>...</Objects>

When supplying savon with anything else i get the expected result:

hash = { 
         "foo" => { //stuff here }, 
         :attributes! => { "foo" => {"xsi:type" => "Something"}}
       }

I get:

<foo xsi:type="Something"></foo>

I must use the string "Objects" as the key. I am coding to a 3rd party SOAP web service. I cannot use a symbol because the first letter would become a lower cap.

thanks,

user618589
  • 83
  • 1
  • 7

1 Answers1

0

You have to change :attributes! to :@xsi:type=>"Something" within the hash where you want the attribute

Like:

"foo"=>{:@xsi:type=>'something', //stuff here}
Davidenko
  • 31
  • 1