title: Savon and Ruby to call a webservice
body: <p>I have a SOAP request </p>
  
  <pre><code>&lt;Register&gt;
  &lt;soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" &gt;
  &lt;soap:Header/&gt;&lt;soap:Body&gt;
  &lt;Register&gt;
  &lt;identifiers&gt;?&lt;/identifiers&gt;
  &lt;userId&gt;&lt;/userId&gt;
  &lt;password pwct="?"&gt;?&lt;/password&gt;
  &lt;locale&gt;?&lt;/locale&gt;
  &lt;/Register&gt;
  
  Fully Formed Request that works is 
  
          &lt;soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"&gt;
          &lt;soap:Header/&gt;
          &lt;soap:Body&gt;
           &lt;Register&gt;
            &lt;identifiers&gt;
              &lt;DIdentifiers&gt;
           &lt;Section name="IDENTIFIERS"&gt;
      &lt;Property name="Type" value="Support" /&gt;        
      &lt;Property name="Version" value="3.80 Jan 03 2013" /&gt;
      &lt;Property name="Timestamp" value="2015/06/08 11:57:48 GMT" /&gt;
      &lt;Property name="SerialNumber" value="00004" /&gt;
      &lt;Property name="Hostname" value="gmail.com" /&gt;
      &lt;Property name="ProductNumber" value="C00004" /&gt;
      &lt;/Section&gt;&lt;Section name="INTERFACE_IDENTIFIERS"&gt;
      &lt;Property name="InterfaceAddress" value="45.34.54.6"/&gt;
      &lt;Property name="InterfaceMacAddress" value="00579FGHslkf"/&gt;
      &lt;/Section&gt;
      &lt;/DIdentifiers&gt;
      &lt;/identifiers&gt;
         &lt;userId&gt; &lt;userId&gt;
         &lt;password pwct="TRUE"&gt;shirl123&lt;/reg:password&gt;
          &lt;locale&gt;en_US&lt;/locale&gt;
       &lt;Register&gt;
      &lt;/soap:Body&gt;
     &lt;/soap:Envelope&gt;
  
  I have added 
  
      WSDL client = Savon::client(wsdl: " ")
  
  And calling method  
  
      client.call(:Register, message: { })
  </code></pre>
  
  <p>How can I send the above parameters in Ruby? Could not figure out the correct way to pass parameters</p>
  
  <pre><code>I'm passing 
  DeviceIdentifiers: {
      :Section=&gt; {
       { :Property    =&gt; nil,
         :attributes! =&gt; { :Property =&gt; { "name" =&gt; Type, "value" =&gt;Support} }
      }
  }
  </code></pre>
  
  <p>But this doesnot work.. </p>
  
  <p>I referred to this
  <a href="http://savonrb.com/version1/executing-soap-requests.html" rel="nofollow">http://savonrb.com/version1/executing-soap-requests.html</a></p>