So without further ado ...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'viewpoint' | |
# Get the instance of Viewpoint. This is a singleton class and will | |
# have only one instance ever instantiated no matter how many times | |
# you call #instance | |
vp = Viewpoint::ExchWebServ.instance | |
# Set authentication parameters (probably NTLM) | |
vp.authenticate | |
# This actually calls EWS's FindFolder SOAP message | |
vp.find_folders | |
# Get the instance 'Calendar' and convert it | |
cal = vp.get_folder("Calendar") | |
ical = cal.to_ical | |
puts ical.to_ical | |
# See: http://github.com/zenchild/Viewpoint/blob/master/lib/viewpoint/calendar.rb#L105 for more | |
# in depth information about what is going on. |
Hi
ReplyDeleteThanks for sharing ViewPoint. I'm working through the sample and ran into a problem when authenticating. The error is below. Any suggestions would be very much appreciated.
The error:
at depth 1 - 20: unable to get local issuer certificate
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
from /usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient/session.rb:247:in `connect'
from /usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient/session.rb:247:in `ssl_connect'
from /usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient/session.rb:639:in `connect'
from /usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient/timeout.rb:128:in `timeout'
from /usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient/session.rb:631:in `connect'
from /usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient/session.rb:522:in `query'
from /usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient/session.rb:147:in `query'
from /usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient.rb:953:in `do_get_block'
from /usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient.rb:765:in `do_request'
from /usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient.rb:848:in `protect_keep_alive_disconnected'
from /usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient.rb:764:in `do_request'
from /usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient.rb:666:in `request'
from /usr/local/lib/ruby/gems/1.8/gems/httpclient-2.1.5.2/lib/httpclient.rb:596:in `post'
from /Projects/UCSF/rcal/vendor/gems/soap4r-1.5.8/lib/soap/streamHandler.rb:238:in `send_post'
from /Projects/UCSF/rcal/vendor/gems/soap4r-1.5.8/lib/soap/streamHandler.rb:172:in `send'
from /Projects/UCSF/rcal/vendor/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb:179:in `route'
from /Projects/UCSF/rcal/vendor/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb:143:in `call'
from /Projects/UCSF/rcal/vendor/gems/soap4r-1.5.8/lib/soap/rpc/driver.rb:181:in `call'
from (eval):6:in `resolveNames'
from /Projects/UCSF/rcal/vendor/gems/viewpoint-0.0.5/lib/viewpoint/exchwebserv.rb:176:in `resolve_name'
from /Projects/UCSF/rcal/vendor/gems/viewpoint-0.0.5/lib/viewpoint/exchwebserv.rb:216:in `do_auth'
from /Projects/UCSF/rcal/vendor/gems/viewpoint-0.0.5/lib/viewpoint/exchwebserv.rb:165:in `authenticate'
from (irb):2>>
I got beyond the error above by creating a property file that soap4r reads from and adding:
ReplyDeleteclient.protocol.http.ssl_config.ca_file = /path/to_ca_file
However, I still get nothing but 401 responses from the server.
Any advice?