xml - Ruby SOAP with Savon 2 and nested attributes -


my first time work soap.

having looked savon document couldn't figure out how turn following xml hash. i'm using savon 2.11.1.

should use ":attributes!" or "@" "version" , "language" attribute in "fp:example" element?

so, question how can this?

 <fp:example version="1.0" language="en">   <fp:findsomething id="id-1">       <fp:somestuff>           <fp:number>50</fp:number>       </fp:somestuff>    </fp:findsomething> </fp:example> 

thanks!

for version 2.11.1, @ working me. find below example

client.call(:create, { :message => {     :sobjects => {       :'@xsi:type' => 'urn1:contact',       :firstname => 'jane',       :lastname => 'doe'     }   } }) 

yields:

<tns:sobjects xsi:type="urn1:contact">   <tns:firstname>jane</tns:firstname>   <tns:lastname>doe</tns:lastname> </tns:sobjects> 

Comments

Popular posts from this blog

How to show in django cms breadcrumbs full path? -

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -