Stan, here is a sample standalone file that might be helpful to you is
testing. You have to put your own certificate and key files where
specified  and substitute the URL string. Try with both VERIFY_PEER and
VERIFY_NONE. Here is the code which I hope might be useful to you

[code]
#!/usr/bin/env ruby
require "uri"
require "net/https"

cer_file = File.dirname(__FILE__) + '/cer.pem'
key_file = File.dirname(__FILE__) + '/key.pem'
url_str = 'https://www.myservice.com/service_path/service_method'

pem = File.read(cer_file)
key = File.read(key_file)

uri = URI.parse(url_str)
http = Net::HTTP.new(uri.host, uri.port)
http.open_timeout = 3
http.read_timeout = 5

http.use_ssl = (uri.scheme == "https")  # enable SSL/TLS
http.verify_mode = OpenSSL::SSL::VERIFY_PEER #also try VERIFY_NONE
http.cert = OpenSSL::X509::Certificate.new(pem)
http.key = OpenSSL::PKey::RSA.new(key)

http.verify_callback = Proc.new {
  puts "===> in verify_callback -- #{Time.now}"
  true
}
request = Net::HTTP::Post.new(uri.request_uri)

request.body =
  '<?xml version="1.0" encoding="UTF-8"?>
  <env:Envelope xmlns:wsdl="http://tempuri.com/"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Body>
      <wsdl:TransactionRequest>
      <Var1>MyName</Var1>
      <VarTimestamp>2000-01-01T00:00:00</VarTimestamp>
      </wsdl:TransactionRequest>
    </env:Body>
  </env:Envelope>'

#request.headers["Content-Type"] = "text/xml"
resp = http.request(request)
puts "response => #{resp.inspect}"
[/code]

BTW, I tested this code on Windows 7, Mac OS X 10.6.4/5/6, and Linux
virtual machine and it worked on all of them.

-- 
Posted via http://www.ruby-forum.com/.