title: Passing multiple arguments to SOAP webservice using SUDS
body: <p>There is a PHP SOAP webservice I want to use, that requires authentication. However username and password are not required to be passed in HTTP header but as SOAP arguments. I only have a PHP (working) example of running a query:</p>
  
  <pre><code>$soap_client-&gt;getCurrentOrderCustomers(array("user" =&gt; 'root', "password" =&gt; 'toor'));
  </code></pre>
  
  <p>This works fine and creates following request:</p>
  
  <pre><code>&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="https://example.com/webservice/interface_bi.php" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;
     &lt;SOAP-ENV:Body&gt;
        &lt;ns1:getCurrentOrderCustomers&gt;
           &lt;param0 xsi:type="ns2:Map"&gt;
              &lt;item&gt;
                 &lt;key xsi:type="xsd:string"&gt;user&lt;/key&gt;
                 &lt;value xsi:type="xsd:string"&gt;root&lt;/value&gt;
              &lt;/item&gt;
              &lt;item&gt;
                 &lt;key xsi:type="xsd:string"&gt;password&lt;/key&gt;
                 &lt;value xsi:type="xsd:string"&gt;toor&lt;/value&gt;
              &lt;/item&gt;
           &lt;/param0&gt;
        &lt;/ns1:getCurrentOrderCustomers&gt;
     &lt;/SOAP-ENV:Body&gt;
  &lt;/SOAP-ENV:Envelope&gt;
  </code></pre>
  
  <p>Assuming the client is created properly (it is), I tried following in Python:</p>
  
  <pre><code>result = ws_client.service.getCurrentOrderCustomers({'user':'root','password':'toor'})
  </code></pre>
  
  <p>And this as well:</p>
  
  <pre><code>result = ws_client.service.getCurrentOrderCustomers(user='root',password='toor')
  </code></pre>
  
  <p>However both of them lead to following request, with no arguments:</p>
  
  <pre><code>&lt;SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="https://example.com/webservice/interface_bi.php" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;
     &lt;SOAP-ENV:Header/&gt;
     &lt;ns1:Body&gt;
        &lt;ns2:getCurrentOrderCustomers/&gt;
     &lt;/ns1:Body&gt;
  &lt;/SOAP-ENV:Envelope&gt;
  </code></pre>
  
  <p>I would be very grateful if someone suggested how to pass arguments to webservice function in order to get desired request. Thanks in advance.</p>