title: How to set default xmlns with zeep in Python?
body: <p>I want to use zeep to make some API calls.
  The expected output is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns="https://cabapi-prod.service.dbrent.net/hal2_cabserver/"&gt;
    &lt;soap:Body&gt;
      &lt;CABSERVER.listFreeBikes&gt;
        &lt;CommonParams&gt;
          &lt;UserData&gt;
            &lt;User&gt;XXXXXXXXXXXXXX&lt;/User&gt;
            &lt;Password&gt;XXXXXXXXXXXXXX&lt;/Password&gt;
          &lt;/UserData&gt;
          &lt;LanguageUID&gt;1&lt;/LanguageUID&gt;
          &lt;RequestTime&gt;XXXXXXXXXXXXXX&lt;/RequestTime&gt;
          &lt;Version&gt;2&lt;/Version&gt;
        &lt;/CommonParams&gt;
        &lt;SearchPosition&gt;
          &lt;Longitude&gt;XXXXXXXXXXXXXX&lt;/Longitude&gt;
          &lt;Latitude&gt;XXXXXXXXXXXXXX&lt;/Latitude&gt;
        &lt;/SearchPosition&gt;
        &lt;maxResults&gt;100&lt;/maxResults&gt;
        &lt;searchRadius&gt;844&lt;/searchRadius&gt;
        &lt;CustomerData&gt;
          &lt;Phone&gt;XXXXXXXXXXXXXX&lt;/Phone&gt;
          &lt;Password&gt;XXXXXXXXXXXXXX&lt;/Password&gt;
          &lt;PhoneUserEdited&gt;false&lt;/PhoneUserEdited&gt;
        &lt;/CustomerData&gt;
      &lt;/CABSERVER.listFreeBikes&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>However, I am only able to get:</p>
  
  <pre><code>&lt;soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;soap-env:Body&gt;
      &lt;ns0:CABSERVER.listFreeBikes xmlns:ns0="https://xml.dbcarsharing-buchung.de/hal2_cabserver/"&gt;
        &lt;CommonParams&gt;
          &lt;UserData&gt;
            &lt;User&gt;XXXXXXXXXXXXXX&lt;/User&gt;
            &lt;Password&gt;XXXXXXXXXXXXXX&lt;/Password&gt;
          &lt;/UserData&gt;
          &lt;LanguageUID&gt;1&lt;/LanguageUID&gt;
          &lt;RequestTime&gt;XXXXXXXXXXXXXX&lt;/RequestTime&gt;
          &lt;Version&gt;2&lt;/Version&gt;
        &lt;/CommonParams&gt;
        &lt;CustomerData&gt;
          &lt;Phone&gt;XXXXXXXXXXXXXX&lt;/Phone&gt;
          &lt;Password&gt;XXXXXXXXXXXXXX&lt;/Password&gt;
          &lt;PhoneUserEdited&gt;false&lt;/PhoneUserEdited&gt;
        &lt;/CustomerData&gt;
        &lt;SearchPosition&gt;
          &lt;Longitude&gt;XXXXXXXXXXXXXX&lt;/Longitude&gt;
          &lt;Latitude&gt;XXXXXXXXXXXXXX&lt;/Latitude&gt;
        &lt;/SearchPosition&gt;
        &lt;maxResults&gt;100&lt;/maxResults&gt;
        &lt;searchRadius&gt;844&lt;/searchRadius&gt;
      &lt;/ns0:CABSERVER.listFreeBikes&gt;
    &lt;/soap-env:Body&gt;
  &lt;/soap-env:Envelope&gt;
  </code></pre>
  
  <p>The server is not able to recognize my request correctly and I think it is because of the namespace. I did some research but did not find a way to set the default namespace (xmlns) to <a href="https://xml.dbcarsharing-buchung.de/hal2_cabserver/" rel="nofollow noreferrer">https://xml.dbcarsharing-buchung.de/hal2_cabserver/</a>. Instead, it gets added as extra namespace.</p>
  
  <p>This is my current code:</p>
  
  <pre><code>with client.settings(raw_response=True):
      ## Common Params related
      ### UserData related
      userNameType = client.get_type('ns0:Type_UserName')
      userPasswordType = client.get_type('ns0:Type_UserPassword')
      userName = userNameType('XXXXXXXXXXXXXX')
      userPassword = userPasswordType('XXXXXXXXXXXXXX')
      userDataType = client.get_type('ns0:Type_UserData')
      userData = userDataType(User = userName, Password = userPassword)
  
  
      current_time = time.localtime()
      current_time_str = time.strftime('%Y-%m-%dT%H:%M:%S.GMT+02:00', current_time)
  
      commonParamsType = client.get_type('ns0:Type_CommonParams')
      commonParams = commonParamsType(UserData = userData, LanguageUID = 1, RequestTime = current_time_str, Version = 2)
  
      ## CustomerData related
      customerPhoneType = client.get_type('ns0:Type_CustomerPhone')
      customerPhone = customerPhoneType('XXXXXXXXXXXXXX') # Get from config
      customerPasswordType = client.get_type('ns0:Type_CustomerPassword')
      customerPassword = customerPasswordType('XXXXXXXXXXXXXX') #Get from config
      customerDataType = client.get_type('ns0:Type_CustomerData')
      customerData = customerDataType(Phone = customerPhone, Password = customerPassword, PhoneUserEdited = False)
  
      ## SearchPosition related
      geoPositionType = client.get_type('ns0:Type_GeoPosition')
      geoPosition = geoPositionType(Longitude = XXXXXXXXXXXXXX, Latitude = XXXXXXXXXXXXXX)
  
      # DEBUG
      node = client.create_message(client.service, 'CABSERVER.listFreeBikes', CommonParams = commonParams, CustomerData = customerData, SearchPosition = geoPosition, maxResults = 100, searchRadius = 844)
      from lxml import etree as ET
      tree = ET.ElementTree(node)
      tree.write('test.xml', pretty_print=True)
  
  </code></pre>
  
  <p>What I tried so far:</p>
  
  <pre><code>client.set_ns_prefix('ns0', '')
  </code></pre>
  
  <p>However that does not solve my issue. I am running out of ideas. Anyone who can point me into the right direction?</p>
  
  <p>The WSDL can be found here: <a href="https://xml.dbcarsharing-buchung.de/hal2_cabserver/definitions/HAL2_CABSERVER_3.wsdl" rel="nofollow noreferrer">https://xml.dbcarsharing-buchung.de/hal2_cabserver/definitions/HAL2_CABSERVER_3.wsdl</a></p>