title: Using Ruby to connect to a Microsoft SOAP web service that requires a username, password and a security certificate (.cer file) to connect to it
body: <p><strong>First a little background:</strong></p>
  
  <p>I have already managed to connect to a Microsoft SOAP web service using C#. To use this web service, I have to supply a username and a password in the C# code. I also have to install a security certificate (in .cer format) into the "Root Certificate Authorities" section of the system's certificates. The service's address is a secure “https://” address.</p>
  
  <p>(By the way, the C# class I use to connect to the service was automatically generated for me with the command line tool "svcutil.exe <a href="https://address.of.service" rel="nofollow">https://address.of.service</a>")</p>
  
  <p><strong>Here is my question:</strong></p>
  
  <p>How can I connect to this web service using Ruby? I don't know where to even begin. I don't know where my .cer file, username and password should go exactly. Any ideas?</p>
  
  <p><strong>Further information:</strong></p>
  
  <p>Using <a href="http://thecoffman.com/2011/01/25/please-drop-the-soap/" rel="nofollow">these instructions</a> for C#, I have been able to find out exactly what XML message is sent, and what XML message is received back. These XMLs are fairly straightforward, but “https://” never appears in them, even though the address of the web service is HTTPS. I’m not sure why that is. I suppose sending and receiving messages from a service is just a separate matter from actually <strong><em>connecting</em></strong> to the service.</p>