title: How to comply with policy defined in WSDL
body: <p>I'm trying to access a SOAP web service using <a href="http://docs.python-zeep.org/en/master/index.html" rel="nofollow noreferrer">Zeep</a></p>
  
  <p>There is a publicly available <a href="https://www.ipddb.org/WS/Services/IpdDownloadService.svc?wsdl" rel="nofollow noreferrer">WSDL</a>, and a <a href="https://pre.ipddb.org/WS/Services/IpdDownloadService.svc?wsdl" rel="nofollow noreferrer">testing WSDL</a> (has a self-signed cert)</p>
  
  <p>My code to test (from test site) is:</p>
  
  <pre><code>from requests import Session
  from zeep import Client
  from zeep.transports import Transport
  from zeep.wsse.username import UsernameToken
  import xml.dom.minidom
  
  WS_USER_NAME = '&lt;username&gt;'
  WS_PASSWORD = '&lt;password&gt;'
  WS_WSDL = 'https://pre.ipddb.org/WS/Services/IpdDownloadService.svc?wsdl'
  
  session = Session()
  session.verify = False
  transport = Transport(session=session,
                        operation_timeout=10)
  client = Client(wsdl=WS_WSDL,
                  wsse=UsernameToken(WS_USER_NAME, WS_PASSWORD),
                  transport=transport)
  
  with client.options(raw_response=True):
  
      response = client.service.Search(strNames='Rick Astley')
      xml = xml.dom.minidom.parseString(response._content)
      print xml.toprettyxml()
  </code></pre>
  
  <p>My response comes back as:</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope"&gt;
      &lt;s:Header&gt;
          &lt;a:Action s:mustUnderstand="1"&gt;http://www.w3.org/2005/08/addressing/soap/fault&lt;/a:Action&gt;
          &lt;a:RelatesTo&gt;urn:uuid:5ffbeb15-913b-41ec-a2ef-556c131c07eb&lt;/a:RelatesTo&gt;
      &lt;/s:Header&gt;
      &lt;s:Body&gt;
          &lt;s:Fault&gt;
              &lt;s:Code&gt;
                  &lt;s:Value&gt;s:Sender&lt;/s:Value&gt;
                  &lt;s:Subcode&gt;
                      &lt;s:Value xmlns:a="http://schemas.xmlsoap.org/ws/2005/02/sc"&gt;a:BadContextToken&lt;/s:Value&gt;
                  &lt;/s:Subcode&gt;
              &lt;/s:Code&gt;
              &lt;s:Reason&gt;
                  &lt;s:Text xml:lang="es-ES"&gt;The message could not be processed. This is most likely because the action 'https://www.ipddb.org/ws/IpdDownloadService/Search' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding.&lt;/s:Text&gt;
              &lt;/s:Reason&gt;
          &lt;/s:Fault&gt;
      &lt;/s:Body&gt;
  &lt;/s:Envelope&gt;
  </code></pre>
  
  <p>I was provided a username and password from the owners of the web service, so I know I'll need to provide that, but there must be something else I'm missing. I believe it has to do with the policy defined in the WSDL, but the web service doesn't provide anything in terms of documentation.</p>
  
  <p>I'm new to SOAP, but is there enough in the WSDL for me to figure what they need to comply with policy?</p>
  
  <p>Will I be able to use <a href="http://docs.python-zeep.org/en/master/index.html" rel="nofollow noreferrer">Zeep</a> to fulfill all the policies?</p>
  
  <p>Do I need more info from those maintaining the web service?</p>