title: Testing Soap 1.2 service in RobotFramework using suds library
body: <p>I am trying to test soap 1.2 services using RobotFramework. So far, we have only tested soap 1.1 services using suds library for RobotFramework, and suds is not compatible with soap 1.2.</p>
  
  <p>Backwards compatibility is an option for the new services, but it would be better to have a more long-term solution. I am not an experienced programmer, though I can edit code if told what to edit and where.</p>
  
  <p>What happens in the test we have for soap 1.2 services using suds is: suds is unable to interpret the response it gets from the webservice and gives this error: SAXParseException: :159:229: mismatched tag</p>
  
  <p>The soap message is fine, there is no problem using it in SoapUI.</p>
  
  <p>I have found some snippets online that suggest I could get suds library to work with soap 1.2 for my RobotFramework tests. But I have little programming experience and no idea how to incorporate those snippets in suds.
  Someone commented on this snippet that this fixed his issue with RobotFramework and suds.</p>
  
  <p>Is there someone out there willing to explain how I could make this work? I can't seem to figure it out on my own. Any suggestions would be greatly appreciated.</p>
  
  <pre><code>from suds.client import Client
  from suds.bindings import binding
  import logging
  
  
  USERNAME = 'username'
  PASSWORD = 'password'
  
  # Just for debugging purposes.
  logging.basicConfig(level=logging.INFO)
  logging.getLogger('suds.client').setLevel(logging.DEBUG)
  
  # Telnic's SOAP server expects a SOAP 1.2 envelope, not a SOAP 1.1 envelope
  # and will complain if this hack isn't done.
  binding.envns = ('SOAP-ENV', 'http://www.w3.org/2003/05/soap-envelope')
  client = Client('client.wsdl',
          username=USERNAME,
          password=PASSWORD,
          headers={'Content-Type': 'application/soap+xml'})
  
  # This will now work just fine.
  client.service.someRandomMethod()
  </code></pre>
  
  <p>snippet from: <a href="https://gist.github.com/kgaughan/858851" rel="nofollow noreferrer">https://gist.github.com/kgaughan/858851</a></p>