title: How to sign XML with python ( suds)
body: <p>I've been trying to sign an XML object created by suds but I have no luck.</p>
  
  <p>My current script looks like this.</p>
  
  <pre><code>from suds.client import Client
  from suds.transport.http import HttpAuthenticated
  from suds.transport import Reply, TransportError
  
  import requests
  
  class RequestsTransport(HttpAuthenticated):
  
      def __init__(self, **kwargs):
          self.cert = kwargs.pop('cert', None)
          HttpAuthenticated.__init__(self, **kwargs)
  
      def send(self, request):
          self.addcredentials(request)
          resp = requests.post(
              request.url,
              data=request.message,
              headers=request.headers,
              cert=self.cert,
              verify=True
          )
          result = Reply(resp.status_code, resp.headers, resp.content)
          return result
  
  url = 'URL'
  headers = {"Content-Type": "text/xml;charset=UTF-8",
             "SOAPAction": ""}
  t = RequestsTransport(cert=("path to cert","path to key"))
  client = Client(url, headers=headers, transport=t)
  </code></pre>
  
  <p>I create a method and then I need to sign it. I have a pem file for the public cert of the WSDL I am checking.</p>
  
  <p>Also, if I dont sign the request I get :</p>
  
  <p>suds.WebFault: Server raised fault: 'An error was discovered processing the  header'</p>