title: How to use objects with xsi:types in Savon
body: <p>I'm trying to use Savon to make some SOAP requests, but I'm afraid I need to go beyond the basics somewhat.</p>
  
  <p>I need to send something along the lines of:</p>
  
  <pre><code>&lt;env:Body&gt;
    &lt;wsdl:methodName&gt;
      &lt;parameter xsi:type='ValueClass'&gt;value&lt;/parameter&gt;
    &lt;/wsdl:methodName&gt;
  &lt;/env:Body&gt;
  </code></pre>
  
  <p>Now, if I didn't have to specify that xsi:type, it would be a simple matter of:</p>
  
  <pre><code>client.method_name { |soap| soap.body = {:parameter =&gt; 'value'} }
  </code></pre>
  
  <p>The problem is the xsi:type in the parameter; due to the way the web service I'm using is built around polymorphism, I need to explicitly specify what type the parameter is. Is there any way I can do this (preferably without having to generate my own XML?) I'd really love to drop soap4r for good :)</p>
  
  <p>Thanks!</p>