title: Python Zeep AttributeError: 'NoneType' object has no attribute 'elements' [switching to suds-community]
body: <p>This is a 2-part question, for the following code:</p>
  
  <pre class="lang-py prettyprint-override"><code>from zeep import Client
  from datetime import datetime
  import logging.config
  
  logging.config.dictConfig({
      "version": 1,
      "formatters": {"verbose": {"format": "%(asctime)s # [%(name)s]: %(message)s"}},
      "handlers": {"console": {"level": "DEBUG", "class": "logging.StreamHandler", "formatter": "verbose"}},
      "loggers": {"zeep.transports": {"level": "DEBUG", "propagate": True, "handlers": ["console"]}}
  })
  
  client = Client("https://t-mobile.provisioning.blackberry.com/webservices/Provisioning?wsdl")
  
  client.service._binding_options['address'] = "https://t-mobile.provisioning.blackberry.com/webservices/Provisioning"
  
  ProvisionRequest = {
      "provisionRequest": {
          "body": [{
              "ProvisionReqEntity" : {            
                  "items": [{
                      "ProvisionDataItem": {
                          "name": "MSISDN",   
                          "data": "123456789"
                      }
                  }],
                  "name": "subscriber"
              }
          }],
          "header": {
              "sender": {
                  "id": "123",
                  "loginId": "myLoginId",
                  "name": "myName",
                  "password": "myPassword"
              },
              "timeFormat": "CCYY-MM-DDThh:mm:ssZ",
              "timeStamp": datetime.now().astimezone().replace(microsecond=0).isoformat()
          },
          "productType": "BlackBerry",
          "transactionId": "123123123123",
          "transactionType": "Status",
          "version": "1.2"
      }
  }
  
  response = client.service.echoTest( **ProvisionRequest )
  print(response)
  </code></pre>
  
  <p>1) I can't seem to make the request body match desired array structure for <code>ProvisionReqEntity</code>. Desired Request shall look like:</p>
  
  <pre class="lang-xml prettyprint-override"><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:prov="http://www.blackberry.com/webservices/Provisioning" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;
     &lt;soapenv:Header/&gt;
     &lt;soapenv:Body&gt;
        &lt;prov:echoTest soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;
           &lt;provisionRequest xsi:type="java:ProvisionRequest" xmlns:java="java:provision.control.ari.comm.soap"&gt;
              &lt;body xsi:type="java:ArrayOfProvisionReqEntity" soapenc:arrayType="java:ProvisionReqEntity[1]"&gt;
                  &lt;ProvisionReqEntity&gt;
                     &lt;name xsi:type="xsd:string"&gt;subscriber&lt;/name&gt;
                     &lt;items soapenc:arrayType="java:ProvisionDataItem[1]"&gt;
                        &lt;ProvisionDataItem&gt;
                           &lt;name xsi:type="xsd:string"&gt;MSISDN&lt;/name&gt;
                           &lt;data xsi:type="xsd:string"&gt;123456789&lt;/data&gt;
                        &lt;/ProvisionDataItem&gt;
                     &lt;/items&gt;
                  &lt;/ProvisionReqEntity&gt;
              &lt;/body&gt;
              &lt;header xsi:type="java:ProvisionReqHeader"&gt;
                 &lt;sender xsi:type="java:ProvisionSender"&gt;
                    &lt;id xsi:type="xsd:string"&gt;123&lt;/id&gt;
                    &lt;loginId xsi:type="xsd:string"&gt;myLoginId&lt;/loginId&gt;
                    &lt;name xsi:type="xsd:string"&gt;myName&lt;/name&gt;
                    &lt;password xsi:type="xsd:string"&gt;myPassword&lt;/password&gt;
                 &lt;/sender&gt;
                 &lt;timeFormat xsi:type="xsd:string"&gt;CCYY-MM-DDThh:mm:ssZ&lt;/timeFormat&gt;
                 &lt;timeStamp xsi:type="xsd:string"&gt;${=new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").format(new Date())}&lt;/timeStamp&gt;
              &lt;/header&gt;
              &lt;productType xsi:type="xsd:string"&gt;BlackBerry&lt;/productType&gt;
              &lt;transactionId xsi:type="xsd:string"&gt;123123123123&lt;/transactionId&gt;
              &lt;transactionType xsi:type="xsd:string"&gt;Status&lt;/transactionType&gt;
              &lt;version xsi:type="xsd:string"&gt;1.2&lt;/version&gt;
           &lt;/provisionRequest&gt;
        &lt;/prov:echoTest&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>However; Zeep shows the following for <code>ProvisionReqEntity</code>:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;ns1:body xmlns:ns1="java:provision.control.ari.comm.soap"&gt;
      &lt;ProvisionReqEntity&gt;
          &lt;ns1:items xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/&gt;
          &lt;ns1:name xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/&gt;
          &lt;ns1:optionalTokens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/&gt;
          &lt;ns1:subEntities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/&gt;
          &lt;ns1:type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/&gt;
      &lt;/ProvisionReqEntity&gt;
  &lt;/ns1:body&gt;
  </code></pre>
  
  <p>2) Why isn't Python / Zeep printing the <code>response</code>? The logger clearly shows I got a valid response.</p>
  
  <p>Bonus Question: :-)</p>
  
  <p>3) Is <code>client.service._binding_options['address']</code> the recommended method to modify the endpoint?</p>