Git Product home page Git Product logo

viewpoint's People

Contributors

aez avatar auzroz avatar brgerd avatar byronm avatar camillebaldock avatar danielzwijnenburg avatar durnin avatar firien avatar flavorjones avatar geoffwa avatar gshutler avatar haroldl avatar heiko-xencon avatar hujiko avatar jbender avatar lleirborras avatar lribeiro avatar mapybara avatar mccahill avatar mutley avatar paulvt avatar pcai avatar rmmsr avatar rubypirate avatar stephenbinns avatar tdm00 avatar troy avatar ybabosiuk avatar zenchild avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

viewpoint's Issues

Connect using Basic Auth

Hello,

I have tried a very simple program, and got this stack trace ...


  • /Users/nvijayap/tools/jruby/lib/ruby/gems/1.8/gems/viewpoint-0.1.27/lib/soap/handsoap/ews_service.rb:95:in `on_http_error'
  • /Users/nvijayap/tools/jruby/lib/ruby/gems/1.8/gems/handsoap-1.1.8/lib/handsoap/service.rb:438:in `parse_http_response'
  • /Users/nvijayap/tools/jruby/lib/ruby/gems/1.8/gems/handsoap-1.1.8/lib/handsoap/service.rb:250:in `invoke'
  • /Users/nvijayap/tools/jruby/lib/ruby/gems/1.8/gems/viewpoint-0.1.27/lib/soap/handsoap/ews_service.rb:804:in `invoke'
  • /Users/nvijayap/tools/jruby/lib/ruby/gems/1.8/gems/viewpoint-0.1.27/lib/soap/handsoap/ews_service.rb:160:in `find_folder'
  • /Users/nvijayap/tools/jruby/lib/ruby/gems/1.8/gems/viewpoint-0.1.27/lib/model/generic_folder.rb:123:in `get_folder_by_name'

- ./tryvp.rb:9:in `(root)'

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 ...


!/usr/bin/env jruby -rubygems

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

end

MailboxUser email_address method not working?

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

delegate email

Is there any way to send an email on behalf of another user (delegate)?

Endpoint for Hotmail

I'm looking to connect to the hotmail exchange server using Viewpoint.

Any idea what the endpoint will be?

Thanks!

namespace m not defined

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)

find_items by participants

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.'

Using viewpoint in rails

Hi Dan,

I'd very much like to start using viewpoint in a rails application,

  • I add 'viewpoint' into my environment.rb
  • I can set the end_point and set_auth methods without error

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!

BodyType as Text

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)

How do you get to attachments?

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

=> []

get_item_response

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.

Some small additions for shallow-mode and syncing

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.

Incorrect brackets and braces for is_equal_to in generic_folder.find_folders

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}}}]}

Unread Emails

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.

Problems running on Vista

Program. Basicly your published example.

encoding: utf-8

require 'rubygems'
require 'viewpoint'
vp = Viewpoint::ExchWebServ.instance
vp.authenticate
vp.find_folders
cal = vp.get_folder("Calendar")
ical = cal.to_ical

puts ical.to_ical

Error:

C:/RUBY187/lib/ruby/gems/1.8/gems/viewpoint-0.0.4/lib/viewpoint/exchwebserv.rb:1
95:in do_auth': undefined methodask' 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'

from testExchangeViewpoint.rb:6

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

How can you create a contact folder within a public folder

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

Automatic deepening should be configurable

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?

Frozen string error using get_user_availability

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.

Soap error for get_user_availability

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.

Recurring Events?

Are these supported in the current gem? Can I push recurring events to Exchange?

Deep folder traversal maintain hierarchal structure

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

Cannot fetch attachments

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.

uninitialized constant Viewpoint::EWSClient (NameError)

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

get_oof not working

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:inget_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.

Cannot access Exchange with correct credentials

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?

Extended properties

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.

Item is 'deepened' even when it doesn't need to be

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..

delegate calendars

Hi-
I was wondering if it was possible to read delegate calendars through Viewpoint?

Massive memory usage when syncing Calendar Items

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."

Support for concurrent requests for different accounts

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 }

Error: Where should I save Exchange certifikate

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:inssl_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:intimeout'
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:inquery'
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:indo_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:inprotect_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:inrequest'
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:ininvoke'
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:inget_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

Why is EWS a singleton?

This makes it not possible to use this service in a multithreaded application, i.e. running background process with Sidekiq.

Assemble email from EWS Item

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.

Failed to login to EWS

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

cannot find calendars in a public folder

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?

Ruby 1.9 support

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:inresponse'
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:inblock 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:infilter_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:ineach'
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:inblock 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:indo_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:insend_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:ininvoke'
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:inget_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

Retrieving additional properties

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?

Proper timezone support for calendar items

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. :)

Error when calendar has Private appointments

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:ininitialize'
from (eval):1:in new' from (eval):1:infind_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:infind_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:infind_items'
from gemsdir/viewpoint-0.1.24/lib/model/calendar_folder.rb:64:in `items_between'
....

this workaround I put into generic_folder.rb line 231

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

Impersonation

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.

Reference documentation

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

SSL Certificate error

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:inssl_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:intimeout'
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:inquery'
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:indo_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:inprotect_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:inrequest'
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:ininvoke'
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:inget_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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.