title: Complex Type issue with SOAPpy
body: <p>I'm trying to access a function defined in my WSDL from HP Server Automation, I'm able to get servers/etc, but not able to pull anything that takes a server reference specifically via SOAPpy.</p>
  
  <pre><code>import SOAPpy
  from SOAPpy import WSDL
  from SOAPpy import structType
  
  SOAPpy.Config.debug=1
  server = WSDL.Proxy('ServerService.wsdl')
  
  serverRef = structType(name='self', typed=0)
  serverRef._addItem('id',SOAPpy.longType(19250001))
  
  print server.getCustAttr(serverRef,key='HPSW_ED_win32_diskspace',useScope=False)
  
  The SOAP envelope generated from this code looks like this:
  *** Outgoing SOAP ******************************************************
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;SOAP-ENV:Envelope
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd2="http://www.w3.org/2000/10/XMLSchema"
    xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema"
  &gt;
  &lt;SOAP-ENV:Body&gt;
  &lt;ns1:getCustAttr xmlns:ns1="http://server.opsware.com" SOAP-ENC:root="1"&gt;
  &lt;xsd:self&gt;
  &lt;id xsi:type="xsd2:long"&gt;19250001&lt;/id&gt;
  &lt;/xsd:self&gt;
  &lt;useScope xsi:type="xsd:boolean"&gt;False&lt;/useScope&gt;
  &lt;key xsi:type="xsd:string"&gt;HPSW_ED_win32_diskspace&lt;/key&gt;
  &lt;/ns1:getCustAttr&gt;
  &lt;/SOAP-ENV:Body&gt;
  &lt;/SOAP-ENV:Envelope&gt;
  </code></pre>
  
  <p>And it should look like this ( runs successfully via SOAPUI):</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://server.opsware.com"&gt;
     &lt;soapenv:Header/&gt;
     &lt;soapenv:Body&gt;
        &lt;ser:getCustAttr soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;
             &lt;self xsi:type="ser:ServerRef"&gt;
                &lt;id xsi:type="xsd:long"&gt;19250001&lt;/id&gt;
             &lt;/self&gt;
           &lt;key xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;HPSW_ED_win32_diskspace&lt;/key&gt;
           &lt;useScope xsi:type="xsd:boolean"&gt;False&lt;/useScope&gt;
        &lt;/ser:getCustAttr&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>I believe the issue is that the xsi:type="ser:ServerRef" is not set, and not really sure how to do that with SOAPpy...</p>