winrb / viewpoint Goto Github PK
View Code? Open in Web Editor NEWA Ruby client access library for Microsoft Exchange Web Services (EWS)
License: Apache License 2.0
A Ruby client access library for Microsoft Exchange Web Services (EWS)
License: Apache License 2.0
Hello,
I have tried a very simple program, and got this stack trace ...
I think the issue is because Viewpoint is not supporting Basic Auth. The EWS against which I am trying uses Basic Auth.
So, the question is, how to use Basic Auth in my code below ...
require 'viewpoint'
Viewpoint::EWS::EWS.endpoint = 'https://mail.site.com/ews/Exchange.asmx'
Viewpoint::EWS::EWS.set_auth 'abc-de\un', 'pw'
begin
inbox = Viewpoint::EWS::Folder.get_folder_by_name('Inbox')
rescue Exception => e
y e.backtrace
abort
Hi I have been working on implementing version 1.0 of Viewpoint. The "email_address" method for senders of emails was working fine on the old version of Viewpoint (0.1.27).
However, I cannot get the email address of senders with the 1.0 version. Here is the code:
require 'viewpoint'
include Viewpoint::EWS
endpoint = 'https://exchange.example.com/ews/exchange.asmx'
user = 'username'
pass = 'password'
cli = Viewpoint::EWSClient.new endpoint, user, pass
inbox = cli.get_folder(:inbox)
inbox.items[0].from.name # Works fine
inbox.items[0].from.email_address #Does NOT work
Am I doing something wrong, or is this a bug?
Thanks in advance
Is there any way to send an email on behalf of another user (delegate)?
Viewpoint::EWS::EWS.endpoint = 'https://foobar.com/ews/exchange.asmx'
Viewpoint::EWS::EWS.set_auth auth[0], auth[1]
Does not work anymore.
I'm looking to connect to the hotmail exchange server using Viewpoint.
Any idea what the endpoint will be?
Thanks!
cb=Viewpoint::EWS::SOAP::EwsBuilder.new()
cb.calendar_view!(:root=>calendar.id, :start_date=>"2013-01-12T00:00:00Z", :end_date=>"2013-01-12T23:59:00Z")
yields
rvm/gems/ruby-1.9.3-p374/gems/nokogiri-1.5.9/lib/nokogiri/xml/builder.rb:370:in `method_missing': Namespace m has not been defined (ArgumentError)
How can I find back a calendar item created with
item = {
:subject => {:text => "TestRooster #{starts}"},
:start => {:text => starts},
:end => {:text => ends},
:required_attendees => {:attendee => {:mailbox => {:email_address => {:text => '[email protected]'}}}}
}
by searching on participant? I tried
calendar.find_items(:participants => '[email protected]') but it says
'The request failed schema validation: The 'Participants' attribute is not declared.'
Hi Dan,
I'd very much like to start using viewpoint in a rails application,
However, when executing a get_folder call, I get the following error:
?> Viewpoint::EWS::GenericFolder.get_folder :inbox NameError: uninitialized constant Viewpoint::EWS::SOAP::ExchangeWebService::EwsBuilder from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:105:in `const_missing' from /opt/local/lib/ruby/gems/1.8/gems/viewpoint-0.1.0/lib/soap/handsoap/ews_service.rb:635:in `build!' from /opt/local/lib/ruby/gems/1.8/gems/viewpoint-0.1.0/lib/soap/handsoap/ews_service.rb:199:in `get_folder' from /opt/local/lib/ruby/gems/1.8/gems/handsoap-1.1.7/lib/handsoap/service.rb:240:in `invoke' from /opt/local/lib/ruby/gems/1.8/gems/viewpoint-0.1.0/lib/soap/handsoap/ews_service.rb:198:in `get_folder' from /opt/local/lib/ruby/gems/1.8/gems/viewpoint-0.1.0/lib/model/generic_folder.rb:44:in `get_folder' from (irb):5
Same code in normal irb works.
Thanks for a great gem!
Trying to figure how to get back body type as plain text. Seems it can be retrieved using BodyType "Text".
http://msdn.microsoft.com/en-us/library/exchange/aa565622(v=exchg.80).aspx
Any idea how to form the find_items request including this parameter? Tried various forms of the below with no success...
opts = {
:restriction =>
{:is_equal_to => [
{:field_uRI => {:field_uRI=>'message:IsRead'}},
{:field_uRI_or_constant => {:constant => {:value=> false}}}
]},
:item_shape => {:base_shape => "Default"},
:body_type => "Text"
}
@@inbox.find_items(opts)
I tweeted Dan, who asked me to post this issue:
Seeing something odd. Walking down that line,
msg = inbox.get_item items[0].item_id
Works fine. I can see some attributes, such as:
msg.item_id
=> "AAMkAGEzNmExNzEzLTcxMjEtNDM5YS04NmE0LWE0NWU3MWZiMjEwNgBGAAAAAAB4VZcbdHrATrbGrKL0ANCfBwCjSVkOjPEtQoJN3xOKeIYJAAzyZ5e9AACjSVkOjPEtQoJN3xOKeIYJAA25w05NAAA="
When I trace the whole object, I see that there's a node for attachments with a file_attachment inside:
:attachments=>{
:file_attachment=>{
:content_type=>{:text=>"image/png"},
:content_id=>{:text=>"94C552FB-8474-437C-AB44-DDF809047AB9"},
:attachment_id=>{:id=>"AAMkAGEzNmExNzEzLTcxMjEtNDM5YS04NmE0LWE0NWU3MWZiMjEwNgBGAAAAAAB4VZcbdHrATrbGrKL0ANCfBwCjSVkOjPEtQoJN3xOKeIYJAAzyZ5e9AACjSVkOjPEtQoJN3xOKeIYJAA25w05NAAABEgAQAK9ad+6BP7VHru83AO7CTrU="},
:name=>{:text=>"Hollowbody 2.png"}
}
},
But when I do
msg.attachments
=> []
The get_item_response function from the EwsParser class only looks at the first item in a response. The get_item_request allows for requesting multiple items, so it should create an array of all the items in the response too. Simple fix.
I'm currently using viewpoint in a redmine extension to allow access to exchange contacts, and to make syncing useful (and generally "better behaved" than in the default 0.1.27 release), I'm using viewpoint with the attached patches. If you'd consider including this in a later release from the start, I'd be grateful.
I discovered a bug in generic_folder.find_folders caused by the brackets and braces for is_equal_to being incorrect. I changed it locally to work for me, but you might want to implement this fix as well. Working from commit 5ed667e, change line 73 in generic_folder.rb to this:
{:is_equal_to => [{:field_uRI => {:field_uRI=>'folder:FolderClass'}}, {:field_uRI_or_constant=>{:constant => {:value => folder_type}}}]}
Hello,
Is there a way to get just the unread emails? What option can I pass to find_items to be get just the unread emails?
Thanks very much.
require 'rubygems'
require 'viewpoint'
vp = Viewpoint::ExchWebServ.instance
vp.authenticate
vp.find_folders
cal = vp.get_folder("Calendar")
ical = cal.to_ical
C:/RUBY187/lib/ruby/gems/1.8/gems/viewpoint-0.0.4/lib/viewpoint/exchwebserv.rb:1
95:in do_auth': undefined method
ask' for #Viewpoint::ExchWebServ:0x48ac7cc
(NoMethodError)
from C:/RUBY187/lib/ruby/gems/1.8/gems/viewpoint-0.0.4/lib/viewpoint/exc
hwebserv.rb:166:in `authenticate'
gem list
*** LOCAL GEMS ***
gemcutter (0.1.8)
httpclient (2.1.5.2)
icalendar (1.1.0)
json_pure (1.2.0)
net-scp (1.0.2)
net-ssh (2.0.16)
rubyntlm (0.1.1)
soap4r (1.5.8)
viewpoint (0.0.4)
Ruby 1.8.7. This is the only version that got so far. 1.9. has some problems with encodings in soap4r.
by
TheR
Add the ability to create push type subscriptions to a folder.
Information sources:
http://blogs.msdn.com/vikas/archive/2007/08/28/ews-exchange-2007-notification-subsystem.aspx
http://msdn.microsoft.com/en-us/library/aa579128.aspx
http://www.codeplex.com/exchangenotification
I have managed to create a folder, but I can't find a way of making this subfolder a ContactsFolder or setting this when I create the subfolder.
I need to be able to place contacts within the folder so it needs to be of type ContactsFolder.
Thanks
I was troubleshooting a performance problem with pulling items out of a mailbox and discovered that if you reference a property that has not been returned by the server, Viewpoint is "helpful" and goes back to the server to do an AllProperties shape request to GetItem. This can cause code that iterates over a big mailbox to go from a single HTTP callout to N+1 callouts.
In my client code, I monkey patched deepen! to throw a big ugly NoMethodError since I never want deepening to happen automatically; I want to be forced to add the property I want to the additional_properties of the item_shape.
I'll submit a patch; I'm thinking that an argument to the constructor 'disable_automatic_deepening' and replace all calls to deepen! with a automatic_deepen which will throw an exception if disable_automatic_deepening is set. Fair enough?
Here is my code:
def get_calendar_for(user)
start_time = Time.zone.now.iso8601
end_time = (Time.zone.now + 3.days).iso8601
user_free_busy = @client.get_user_availability([user], start_time: start_time, end_time: end_time, requested_view: :free_busy)
user_free_busy.calendar_event_array
end
When I call the method it gives me this error:
https://gist.github.com/rclements/5469319
It tells me can't modify frozen string. Any help would be much appreciated.
Sometimes it's supposed to be a string only, sometimes it's supposed to be a nested array ...
Continuously getting this error:
Viewpoint::EWS::Connection : Internal SOAP error. Message: The request failed schema validation: The element 'TimeZone' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types' has invalid child element 'Bias' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages'. List of possible elements expected: 'Bias' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types'., Code: soap11:Client
The server is VERSION_2007.
Are these supported in the current gem? Can I push recurring events to Exchange?
Hi again,
Just wondering if there is a built in method for traversing a users account for folders, and returning an object with maintained hierarchy?
Can this only be done with a recursive function on my end?
If it isn't supported yet, what's the thought around this idea for a feature request?
Thanks in advance
Afram
Trying to get attachments, doesn't seem to work.
tried adding following method to message.rb
def attachments
atts= @ews_item[:attachments].collect{|it| it[1]}
end
and I get the file names and such, but I'm still missing the actual file.
I have just installed gem viewpoint (0.1.27) and when I run the example file i get this error:
uninitialized constant Viewpoint::EWSClient (NameError)
this is my test script:
require 'rubygems'
require 'viewpoint'
include Viewpoint::EWS
endpoint = 'https://...../owa'
user = 'xxxxxxxxx'
pass = 'xxxxxxxxx'
cli = Viewpoint::EWSClient.new endpoint, user, pass
folders = cli.find_folders
inbox = cli.get_folder :inbox
inbox.ews_methods
msgs = inbox.items
If I query the out-of-office status of a MailboxUser via get_oof the following error occurs:
1.9.2p290 :065 > user[0].get_oof() at depth 0 - 20: unable to get local issuer certificate
NoMethodError: undefined method []' for #<Viewpoint::EWS::SOAP::EwsSoapResponse:0x007f89de1d8d40> from /Users/d040756/.rvm/gems/ruby-1.9.2-p290/gems/viewpoint-0.1.27/lib/model/mailbox_user.rb:73:in
get_oof'
from (irb):65
from /Users/d040756/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `
If I check the SOAP-Response it looks OK.
1.9.2p290 :066 > ObjectSpace._id2ref(70115056495060).items
=> {:oof_settings=>{:oof_state=>{:text=>"Disabled"}, :external_audience=>{:text=>"None"}, :duration=>{:start_time=>{:text=>"2012-09-06T12:00:00"}, :end_time=>{:text=>"2012-09-07T12:00:00"}}, :internal_reply=>{:message=>{:text=>"..."}}, :external_reply=>{:message=>{:text=>"..."}}}}
If I change line 73 from
s = resp[:oof_settings]
to
s = resp.items[:oof_settings]
it works.
Also the method returns always true instead of checking on @oof_state. Not sure if this is intended.
I get the following error
Viewpoint::EWS::EwsLoginError: Failed to login to EWS at [exchange end point]. Please check your credentials.
The exchange end point is correct and so are the credentials as I can visit the page and authenticate using the browser
I'm using
ruby-1.9.2-p180
Rails 3.1
latest version of the gem (0.1.26)
I did get this when I bundle installed
Installing rubyntlm (0.1.1) WARNING: rubyntlm-0.1.1 has an invalid nil value for @cert_chain
Any ideas on what could be preventing me from authenticating?
I could really use extended properties for create/find -- any pointers on where to start in your code? I'll issue a pull request when I get it done.
If you try to use any of the mbox accessors on an Item, it calls deepen! even if the properties are already present in the @ews_item hash.
This causes an extra (expensive) call to the server for each item you're iterating over
The call to deepen! should only be made if it's not already present in the hash (i.e. if you've specified :additional_properties in the item_shape and included to_recipients, etc.)
Pull request coming..
Thats all. Categories are not returned.
by
TheR
Hello,
May I know how to specify the RequestServerVersion in header?
Thanks
If I create an appointment, the item gets the default GMT timezone, which displays as "Monrovia, Reykjavic" in Outlook. I tried adding ":meeting_time_zone => {:text => 'PT1H'},", but that yields an error:
The element 'MeetingTimeZone' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types' cannot contain text. List of possible elements expected: 'BaseOffset' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types'.' }
Is it possible to use the autodiscover feature of Exchange Online?
Or ist planed?
Or easy to do oneself? ;)
Hi-
I was wondering if it was possible to read delegate calendars through Viewpoint?
I am unable to connect to my company's EWS server and get the message:
"Failed to login to EWS at https://owa.mycompany.com/EWS/Exchange.asmx. Please check your credentials."
I have tried using my username as "[email protected]" as well as "mycompanydomain\otherusername" and they both get denied access. I am wondering if I need to configure the domain somewhere or if I am doing something wrong?
I've been using Viewpoint to sync Calendar Items from a user folder, using AllProperties as sync shape, but even for something at/around 400-500 entries, the memory usage of the synchronizing Ruby process grows to over 1GB (but remains constant there). The actual XML data exchanged on the wire for syncing that contact folder is less than 1MB, so that's a ratio of 1:1000, which leads me to believe that rather there's a memory leakage (or some form of problem reclaiming memory) when instantiating contacts.
I've not dug deeper (yet) as to the causes of the memory usage - the only thing I can think of is that the construction of Mailbox/Attendee-objects takes up this much space - but still, that shouldn't cause a gig of memory usage for just 400-500 contacts.
Anything known about this? I'll debug deeper anyway, so this is just a "heads up."
For applications that need to work with multiple exchange accounts quickly, it would be very helpful if the Viewpoint API provided a mechanism where multiple threads could use the gem concurrently, where each thread was limited to making calls for the same account. For example:
accounts = [
{ :endpoint => <ENDPOINT 1>,
:login => <LOGIN 1>,
:passord => <PASSWORD 1>
},
{ :endpoint => <ENDPOINT 2>,
:login => <LOGIN 2>,
:passord => <PASSWORD 2>
}
]
folders = []
threads = []
accounts.each do |account|
threads << Thread.new(account) { |a|
ews = Viewpoint::EWS::EWS.new
ews.endpoint = a[:endpoint]
ews.set_auth(a[:login, a[:password])
folders << ews.find_folders
}
end
threads.each { |thread| thread.join }
This is error I get when I try to connect our Exchange server:
C:/RUBY187/lib/ruby/gems/1.8/gems/httpclient-2.1.7.2/lib/httpclient/session.rb:276:in connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError) from C:/RUBY187/lib/ruby/gems/1.8/gems/httpclient-2.1.7.2/lib/httpclient/session.rb:276:in
ssl_connect'
from C:/RUBY187/lib/ruby/gems/1.8/gems/httpclient-2.1.7.2/lib/httpclient/session.rb:713:in connect' from C:/RUBY187/lib/ruby/gems/1.8/gems/httpclient-2.1.7.2/lib/httpclient/timeout.rb:129:in
timeout'
from C:/RUBY187/lib/ruby/gems/1.8/gems/httpclient-2.1.7.2/lib/httpclient/session.rb:705:in connect' from C:/RUBY187/lib/ruby/gems/1.8/gems/httpclient-2.1.7.2/lib/httpclient/session.rb:569:in
query'
from C:/RUBY187/lib/ruby/gems/1.8/gems/httpclient-2.1.7.2/lib/httpclient/session.rb:158:in query' from C:/RUBY187/lib/ruby/gems/1.8/gems/httpclient-2.1.7.2/lib/httpclient.rb:991:in
do_get_block'
from C:/RUBY187/lib/ruby/gems/1.8/gems/httpclient-2.1.7.2/lib/httpclient.rb:800:in do_request' from C:/RUBY187/lib/ruby/gems/1.8/gems/httpclient-2.1.7.2/lib/httpclient.rb:887:in
protect_keep_alive_disconnected'
from C:/RUBY187/lib/ruby/gems/1.8/gems/httpclient-2.1.7.2/lib/httpclient.rb:799:in do_request' from C:/RUBY187/lib/ruby/gems/1.8/gems/httpclient-2.1.7.2/lib/httpclient.rb:697:in
request'
from C:/RUBY187/lib/ruby/gems/1.8/gems/handsoap-1.1.8/lib/handsoap/http/drivers/http_client_driver.rb:25:in send_http_request' from C:/RUBY187/lib/ruby/gems/1.8/gems/handsoap-1.1.8/lib/handsoap/service.rb:249:in
invoke'
from C:/RUBY187/lib/ruby/gems/1.8/gems/viewpoint-0.1.24/lib/soap/handsoap/ews_service.rb:781:in invoke' from C:/RUBY187/lib/ruby/gems/1.8/gems/viewpoint-0.1.24/lib/soap/handsoap/ews_service.rb:223:in
get_folder'
from C:/RUBY187/lib/ruby/gems/1.8/gems/viewpoint-0.1.24/lib/model/generic_folder.rb:50:in `get_folder'
from testExchangeViewpoint.rb:34
where it stands: @cal = Viewpoint::EWS::CalendarFolder.get_folder :calendar
And this worked like a charm half year ago when I was testing. Now when I need it it just doesn't. (in between server certificate was renewed).
Do you have any idea.
by
TheR
This makes it not possible to use this service in a multithreaded application, i.e. running background process with Sidekiq.
def save_folder_items(folder)
folder_items = folder.find_items
folder_items.each do |fi|
inc = 0
mail = fi.to_mail
filename_base = @current_directory + '/' + fi.subject.gsub(/[^0-9a-z.\* :-_]/i, '')
filename = filename_base + '' + inc.to_s + '.eml'
while File.exists?(filename) do
inc = inc + 1
filename = filename_base + '' + inc.to_s + '.eml'
end
File.open(filename, "w") {|f| f.write(mail)}
end
I am trying to use the above method to iterate over a specific folder and save any items (emails). The items we have stored in the public folders are all email. But it seems the .to_mail method is written to create an hash into an email, not an EWS item into an RFC compliant email. Is that correct? At least that's my impression from reading the to_mail method in the model/message.rb.
It seems that I can connect to EWS with viewpoint.
Doing various tests, I always end upwith the same error
Failed to login to EWS at https://mail.mycompany.com/EWS/Exchange.asmx. Please check your credentials.
I tried the username and password with OWA and accessing https://mail.mycompany.com/EWS/Exchange.asmx by HTTP and it does work. But I can get around connecting to EWS with Viewpoint.
Any idea what could cause the problem ?
Rails version is 2.3.8 with ruby 1.8.7
Using the following script, I manage to finde the public folder "Raumbelegung". But then I am stuck
# Find all folders under :msgfolderroot
publicfolders = cli.folders(:root =>:publicfoldersroot, :traversal =>:shallow )
gzcalendarfolder = publicfolders.select{|f| f.display_name=="Raumbelegung"}.first
gzcalendarfolder is an array of folders. The first element gives me something like a folder, but also a calendar. It has a property named child_folder_count, which even indicates that there are 22 calendar folders (which is true). But Viewpoint does not seem to provide means to navigate to these folders.
Is that right?
Hi,
I've tried running a simple test script using the Viewpoint library with both ruby 1.8.7 and 1.9.1. With ruby 1.8 it runs fine but with ruby 1.9 I get the following error:
/opt/local/lib/ruby1.9/gems/1.9.1/gems/rubyntlm-0.1.1/lib/net/ntlm.rb:103:in encode_utf16le': uninitialized constant Module::Kconv (NameError) from /opt/local/lib/ruby1.9/gems/1.9.1/gems/rubyntlm-0.1.1/lib/net/ntlm.rb:696:in
response'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/httpclient-2.1.5.2/lib/httpclient/auth.rb:430:in get' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/httpclient-2.1.5.2/lib/httpclient/auth.rb:103:in
block in filter_request'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/httpclient-2.1.5.2/lib/httpclient/auth.rb:102:in each' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/httpclient-2.1.5.2/lib/httpclient/auth.rb:102:in
filter_request'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/httpclient-2.1.5.2/lib/httpclient.rb:943:in block in do_get_block' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/httpclient-2.1.5.2/lib/httpclient.rb:942:in
each'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/httpclient-2.1.5.2/lib/httpclient.rb:942:in do_get_block' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/httpclient-2.1.5.2/lib/httpclient.rb:765:in
block in do_request'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/httpclient-2.1.5.2/lib/httpclient.rb:848:in protect_keep_alive_disconnected' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/httpclient-2.1.5.2/lib/httpclient.rb:764:in
do_request'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/httpclient-2.1.5.2/lib/httpclient.rb:666:in request' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/handsoap-1.1.7/lib/handsoap/http/drivers/http_client_driver.rb:25:in
send_http_request'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/handsoap-1.1.7/lib/handsoap/service.rb:249:in invoke' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/viewpoint-0.1.6/lib/soap/handsoap/ews_service.rb:751:in
invoke'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/viewpoint-0.1.6/lib/soap/handsoap/ews_service.rb:147:in find_folder' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/viewpoint-0.1.6/lib/model/generic_folder.rb:97:in
get_folder_by_name'
from viewpointTest.rb:7:in `
It actually looks like a problem with one of the dependencies (rubyntlm) but have you had it working under ruby 1.9 in any way or is there a plan to get it working with 1.9 using a new/different version of the ntlm library?
Regards,
Tim
When I try to get more properties like
item:Categories
conversation:FlagStatus
conversation:GlobalFlagStatus
item_shape = {:base_shape => 'AllProperties', :additional_properties => {:field_uRI => [
'item:ParentFolderId',
'item:Categories',
'conversation:FlagStatus',
'conversation:GlobalFlagStatus',
]}}
resp = (Viewpoint::EWS::EWS.instance).ews.get_item([ews_message.item_id], item_shape)
I dont get them in ews_item hash or anywhere. What is the right way?
It looks like all calendar items are created in UTC+00:00 (GMT) regardless of how the timezone is specified in the start/end times. What is the status on this? Is this broken for me, or just unimplemented?
A quick example that fails for me:
@v_start = DateTime.parse("#{Date.today}T14:00:00-05:00")
@v_end = DateTime.parse("#{Date.today}T15:00:00-05:00")
item = { :subject => {:text => 'RSpec Testing'},
:start => {:text => @v_start.to_s},
:end => {:text => @v_end.to_s}
}
citem = Viewpoint::EWS::CalendarItem.create_item_from_hash(item)
citem.time_zone.should be_eql('Eastern Standard Time') # <<< This fails
I'm willing to put some time into coding up proper support for this if it's an active to-do, especially if you can give me any pointers about what needs to be done exactly to make this happen. :)
When calling items_beetween method this error occurs on calendar Items entered as ''Private appointments''.
from gemsdir/viewpoint-0.1.24/lib/model/generic_folder.rb:231:in find_items': undefined method
[]' for nil:NilClass (NoMethodError)
from gemsdir/viewpoint-0.1.24/lib/model/message.rb:69:in initialize' from gemsdir/viewpoint-0.1.24/lib/model/calendar_item.rb:108:in
initialize'
from (eval):1:in new' from (eval):1:in
find_items'
from gemsdir/viewpoint-0.1.24/lib/model/generic_folder.rb:229:in eval' from gemsdir/viewpoint-0.1.24/lib/model/generic_folder.rb:231:in
find_items'
from gemsdir/viewpoint-0.1.24/lib/model/generic_folder.rb:229:in each' from gemsdir/viewpoint-0.1.24/lib/model/generic_folder.rb:229:in
find_items'
from gemsdir/viewpoint-0.1.24/lib/model/calendar_folder.rb:64:in `items_between'
....
i_type = i.keys.first
next if i[:calendar_item][:calendar_item_type].nil? # this line
items << (eval "#{i_type.to_s.camel_case}.new(i[i_type])")
by
TheR
Hey,
I wonder if viewpoint (0.1.x or master
/in development versions) can support user impersonation.
Is it possible? Did anyone here already managed to build that? It looks like that all I need to do is to access a calendar on behalf of another user.
Hi!
Not so much an issue, at all. But I'm new to working with EWS and as typical of wrapper libraries there seems to be an assumption that I know what I'm doing :p I'd ask how to accomplish my initial goal (searching for a file with a recipient & has attachment) but that'd be naive and greedy. Does anyone have suggestions for documentation that would help me understand how to navigate and search for items, etc?
I've been trying to read up on pages like http://msdn.microsoft.com/en-us/library/dd633640(v=exchg.80).aspx, but fear this is not translating accordingly.
Thanks!
-Mike
Hi,
I've install the Viewpoint gem and requirements. Running on Mac OS X 10.6 and pointing to an Exchange 2007 server. I can get to the WSDL over HTTPS but when trying to connect using the Viewpoint library I get the following error:
cacerts loading failed
at depth 0 - 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 /Users/timh/.gems/gems/httpclient-2.1.5.2/lib/httpclient/session.rb:247:in connect' from /Users/timh/.gems/gems/httpclient-2.1.5.2/lib/httpclient/session.rb:247:in
ssl_connect'
from /Users/timh/.gems/gems/httpclient-2.1.5.2/lib/httpclient/session.rb:639:in block in connect' from /Users/timh/.gems/gems/httpclient-2.1.5.2/lib/httpclient/timeout.rb:128:in
timeout'
from /Users/timh/.gems/gems/httpclient-2.1.5.2/lib/httpclient/session.rb:631:in connect' from /Users/timh/.gems/gems/httpclient-2.1.5.2/lib/httpclient/session.rb:522:in
query'
from /Users/timh/.gems/gems/httpclient-2.1.5.2/lib/httpclient/session.rb:147:in query' from /Users/timh/.gems/gems/httpclient-2.1.5.2/lib/httpclient.rb:953:in
do_get_block'
from /Users/timh/.gems/gems/httpclient-2.1.5.2/lib/httpclient.rb:765:in block in do_request' from /Users/timh/.gems/gems/httpclient-2.1.5.2/lib/httpclient.rb:848:in
protect_keep_alive_disconnected'
from /Users/timh/.gems/gems/httpclient-2.1.5.2/lib/httpclient.rb:764:in do_request' from /Users/timh/.gems/gems/httpclient-2.1.5.2/lib/httpclient.rb:666:in
request'
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/handsoap-1.1.7/lib/handsoap/http/drivers/http_client_driver.rb:25:in send_http_request' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/handsoap-1.1.7/lib/handsoap/service.rb:249:in
invoke'
from /Users/timh/.gems/gems/viewpoint-0.1.4/lib/soap/handsoap/ews_service.rb:205:in get_folder' from /Users/timh/.gems/gems/viewpoint-0.1.4/lib/model/generic_folder.rb:44:in
get_folder'
from (irb):9
from /opt/local/bin/irb:12:in `
The issuer certificate that has signed the exchange server's certificate is installed on my Mac but I'm not sure how to get this library to pick it up. Alternatively I'd like to disable certificate checking, where would this be done?
Many thanks,
Tim
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.