viewpoint 1.2.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +11 -6
- data/lib/ews/calendar_accessors.rb +37 -33
- data/lib/ews/connection.rb +152 -125
- data/lib/ews/connection_helper.rb +36 -33
- data/lib/ews/convert_accessors.rb +58 -54
- data/lib/ews/errors.rb +59 -53
- data/lib/ews/ews_client.rb +92 -79
- data/lib/ews/exceptions/exceptions.rb +61 -61
- data/lib/ews/folder_accessors.rb +235 -234
- data/lib/ews/impersonation.rb +29 -23
- data/lib/ews/item_accessors.rb +215 -213
- data/lib/ews/mailbox_accessors.rb +82 -79
- data/lib/ews/meeting_accessors.rb +38 -31
- data/lib/ews/message_accessors.rb +83 -81
- data/lib/ews/push_subscription_accessors.rb +29 -27
- data/lib/ews/room_accessors.rb +48 -46
- data/lib/ews/roomlist_accessors.rb +47 -45
- data/lib/ews/soap/builders/ews_builder.rb +1191 -1176
- data/lib/ews/soap/ews_response.rb +68 -73
- data/lib/ews/soap/ews_soap_availability_response.rb +57 -57
- data/lib/ews/soap/ews_soap_free_busy_response.rb +115 -117
- data/lib/ews/soap/ews_soap_response.rb +99 -101
- data/lib/ews/soap/ews_soap_room_response.rb +45 -45
- data/lib/ews/soap/ews_soap_roomlist_response.rb +45 -46
- data/lib/ews/soap/exchange_availability.rb +54 -52
- data/lib/ews/soap/exchange_data_services.rb +693 -711
- data/lib/ews/soap/exchange_notification.rb +123 -128
- data/lib/ews/soap/exchange_synchronization.rb +82 -82
- data/lib/ews/soap/exchange_time_zones.rb +41 -44
- data/lib/ews/soap/exchange_user_configuration.rb +30 -27
- data/lib/ews/soap/exchange_web_service.rb +237 -233
- data/lib/ews/soap/parsers/ews_parser.rb +46 -42
- data/lib/ews/soap/parsers/ews_sax_document.rb +63 -58
- data/lib/ews/soap/response_message.rb +69 -68
- data/lib/ews/soap/responses/create_attachment_response_message.rb +45 -45
- data/lib/ews/soap/responses/create_item_response_message.rb +26 -25
- data/lib/ews/soap/responses/find_item_response_message.rb +76 -78
- data/lib/ews/soap/responses/get_events_response_message.rb +52 -51
- data/lib/ews/soap/responses/send_notification_response_message.rb +53 -51
- data/lib/ews/soap/responses/subscribe_response_message.rb +37 -34
- data/lib/ews/soap/responses/sync_folder_hierarchy_response_message.rb +38 -35
- data/lib/ews/soap/responses/sync_folder_items_response_message.rb +38 -35
- data/lib/ews/soap.rb +27 -26
- data/lib/ews/templates/calendar_item.rb +64 -60
- data/lib/ews/templates/forward_item.rb +19 -17
- data/lib/ews/templates/message.rb +61 -58
- data/lib/ews/templates/reply_to_item.rb +20 -18
- data/lib/ews/templates/task.rb +55 -55
- data/lib/ews/types/attachment.rb +75 -74
- data/lib/ews/types/attendee.rb +27 -25
- data/lib/ews/types/calendar_folder.rb +58 -59
- data/lib/ews/types/calendar_item.rb +133 -131
- data/lib/ews/types/contact.rb +11 -5
- data/lib/ews/types/contacts_folder.rb +10 -5
- data/lib/ews/types/copied_event.rb +47 -48
- data/lib/ews/types/created_event.rb +22 -20
- data/lib/ews/types/deleted_event.rb +22 -20
- data/lib/ews/types/distribution_list.rb +11 -5
- data/lib/ews/types/event.rb +60 -59
- data/lib/ews/types/export_items_response_message.rb +54 -50
- data/lib/ews/types/file_attachment.rb +63 -61
- data/lib/ews/types/folder.rb +58 -57
- data/lib/ews/types/free_busy_changed_event.rb +22 -20
- data/lib/ews/types/generic_folder.rb +348 -372
- data/lib/ews/types/item.rb +401 -397
- data/lib/ews/types/item_attachment.rb +87 -80
- data/lib/ews/types/item_field_uri_map.rb +201 -200
- data/lib/ews/types/mailbox_user.rb +146 -154
- data/lib/ews/types/meeting_cancellation.rb +11 -5
- data/lib/ews/types/meeting_message.rb +11 -5
- data/lib/ews/types/meeting_request.rb +11 -5
- data/lib/ews/types/meeting_response.rb +11 -5
- data/lib/ews/types/message.rb +11 -5
- data/lib/ews/types/modified_event.rb +43 -45
- data/lib/ews/types/moved_event.rb +47 -48
- data/lib/ews/types/new_mail_event.rb +22 -20
- data/lib/ews/types/out_of_office.rb +145 -144
- data/lib/ews/types/post_item.rb +11 -5
- data/lib/ews/types/search_folder.rb +10 -5
- data/lib/ews/types/status_event.rb +37 -36
- data/lib/ews/types/task.rb +39 -33
- data/lib/ews/types/tasks_folder.rb +31 -25
- data/lib/ews/types.rb +134 -139
- data/lib/viewpoint/logging/config.rb +19 -19
- data/lib/viewpoint/logging.rb +23 -17
- data/lib/viewpoint/string_utils.rb +31 -32
- data/lib/viewpoint.rb +18 -18
- metadata +50 -25
- data/Changelog.txt +0 -1004
|
@@ -1,53 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
module Viewpoint
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.
|
|
4
|
+
#
|
|
5
|
+
# Copyright © 2011 Dan Wanek <dan.wanek@gmail.com>
|
|
6
|
+
#
|
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
# you may not use this file except in compliance with the License.
|
|
9
|
+
# You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
# See the License for the specific language governing permissions and
|
|
17
|
+
# limitations under the License.
|
|
18
|
+
|
|
19
|
+
module Viewpoint
|
|
20
|
+
module EWS
|
|
21
|
+
module SOAP
|
|
22
|
+
# Parses the Get Events operation SOAP response.
|
|
23
|
+
class GetEventsResponseMessage < ResponseMessage
|
|
24
|
+
def notification
|
|
25
|
+
safe_hash_access message, %i[elems notification elems]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def subscription_id
|
|
29
|
+
safe_hash_access notification[0], %i[subscription_id text]
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def previous_watermark
|
|
33
|
+
safe_hash_access notification[1], %i[previous_watermark text]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def new_watermark
|
|
37
|
+
ev = notification.last
|
|
38
|
+
return unless ev
|
|
39
|
+
|
|
40
|
+
type = ev.keys.first
|
|
41
|
+
ev[type][:elems][0][:watermark][:text]
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def more_events?
|
|
45
|
+
safe_hash_access(notification[2], %i[more_events text]) == 'true'
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def events
|
|
49
|
+
notification[3..]
|
|
50
|
+
end
|
|
41
51
|
end
|
|
42
52
|
end
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
safe_hash_access(notification[2], [:more_events, :text]) == 'true'
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
def events
|
|
49
|
-
notification[3..-1]
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
end # GetEventsResponseMessage
|
|
53
|
-
end # Viewpoint::EWS::SOAP
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
module Viewpoint
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.
|
|
4
|
+
#
|
|
5
|
+
# Copyright © 2011 Dan Wanek <dan.wanek@gmail.com>
|
|
6
|
+
#
|
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
# you may not use this file except in compliance with the License.
|
|
9
|
+
# You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
# See the License for the specific language governing permissions and
|
|
17
|
+
# limitations under the License.
|
|
18
|
+
|
|
19
|
+
module Viewpoint
|
|
20
|
+
module EWS
|
|
21
|
+
module SOAP
|
|
22
|
+
# Parses the Send Notification operation SOAP response.
|
|
23
|
+
class SendNotificationResponseMessage < ResponseMessage
|
|
24
|
+
include Viewpoint::StringUtils
|
|
25
|
+
|
|
26
|
+
def notification
|
|
27
|
+
safe_hash_access message, %i[elems notification elems]
|
|
28
|
+
end
|
|
22
29
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
def subscription_id
|
|
31
|
+
safe_hash_access notification[0], %i[subscription_id text]
|
|
32
|
+
end
|
|
26
33
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
def previous_watermark
|
|
35
|
+
safe_hash_access notification[1], %i[previous_watermark text]
|
|
36
|
+
end
|
|
30
37
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
38
|
+
def new_watermark
|
|
39
|
+
ev = notification.last
|
|
40
|
+
return unless ev
|
|
34
41
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
type = ev.keys.first
|
|
39
|
-
ev[type][:elems][0][:watermark][:text]
|
|
40
|
-
else
|
|
41
|
-
nil
|
|
42
|
-
end
|
|
43
|
-
end
|
|
42
|
+
type = ev.keys.first
|
|
43
|
+
ev[type][:elems][0][:watermark][:text]
|
|
44
|
+
end
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
def more_events?
|
|
47
|
+
safe_hash_access(notification[2], %i[more_events text]) == 'true'
|
|
48
|
+
end
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
def events
|
|
51
|
+
@events ||=
|
|
52
|
+
notification[3..].collect { |ev|
|
|
53
|
+
type = ev.keys.first
|
|
54
|
+
klass = Viewpoint::EWS::Types.const_get(camel_case(type))
|
|
55
|
+
klass.new(nil, ev[type])
|
|
56
|
+
}
|
|
55
57
|
end
|
|
58
|
+
end
|
|
56
59
|
end
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
end # Viewpoint::EWS::SOAP
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -1,35 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
module Viewpoint
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.
|
|
4
|
+
#
|
|
5
|
+
# Copyright © 2011 Dan Wanek <dan.wanek@gmail.com>
|
|
6
|
+
#
|
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
# you may not use this file except in compliance with the License.
|
|
9
|
+
# You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
# See the License for the specific language governing permissions and
|
|
17
|
+
# limitations under the License.
|
|
18
|
+
|
|
19
|
+
module Viewpoint
|
|
20
|
+
module EWS
|
|
21
|
+
module SOAP
|
|
22
|
+
# Parses the Subscribe operation SOAP response.
|
|
23
|
+
class SubscribeResponseMessage < ResponseMessage
|
|
24
|
+
def subscription
|
|
25
|
+
safe_hash_access message, [:elems]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def subscription_id
|
|
29
|
+
safe_hash_access subscription, %i[subscription_id text]
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def watermark
|
|
33
|
+
safe_hash_access subscription, %i[watermark text]
|
|
34
|
+
end
|
|
35
|
+
end
|
|
24
36
|
end
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
safe_hash_access subscription, [:subscription_id, :text]
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def watermark
|
|
31
|
-
safe_hash_access subscription, [:watermark, :text]
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
end # SubscribeResponseMessage
|
|
35
|
-
end # Viewpoint::EWS::SOAP
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -1,36 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
module Viewpoint
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.
|
|
4
|
+
#
|
|
5
|
+
# Copyright © 2011 Dan Wanek <dan.wanek@gmail.com>
|
|
6
|
+
#
|
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
# you may not use this file except in compliance with the License.
|
|
9
|
+
# You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
# See the License for the specific language governing permissions and
|
|
17
|
+
# limitations under the License.
|
|
18
|
+
|
|
19
|
+
module Viewpoint
|
|
20
|
+
module EWS
|
|
21
|
+
module SOAP
|
|
22
|
+
# Parses the Sync Folder Hierarchy operation SOAP response.
|
|
23
|
+
class SyncFolderHierarchyResponseMessage < ResponseMessage
|
|
24
|
+
def sync_state
|
|
25
|
+
safe_hash_access message, %i[elems sync_state text]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def includes_last_folder_in_range?
|
|
29
|
+
ans = safe_hash_access message, %i[elems includes_last_folder_in_range text]
|
|
30
|
+
ans.downcase == 'true'
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def changes
|
|
34
|
+
safe_hash_access(message, %i[elems changes elems]) || []
|
|
35
|
+
end
|
|
36
|
+
end
|
|
24
37
|
end
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
ans = safe_hash_access message, [:elems, :includes_last_folder_in_range, :text]
|
|
28
|
-
ans.downcase == 'true'
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
def changes
|
|
32
|
-
safe_hash_access(message, [:elems, :changes, :elems]) || []
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
end # SyncFolderHierarchyResponseMessage
|
|
36
|
-
end # Viewpoint::EWS::SOAP
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -1,36 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
module Viewpoint
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.
|
|
4
|
+
#
|
|
5
|
+
# Copyright © 2011 Dan Wanek <dan.wanek@gmail.com>
|
|
6
|
+
#
|
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
# you may not use this file except in compliance with the License.
|
|
9
|
+
# You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
# See the License for the specific language governing permissions and
|
|
17
|
+
# limitations under the License.
|
|
18
|
+
|
|
19
|
+
module Viewpoint
|
|
20
|
+
module EWS
|
|
21
|
+
module SOAP
|
|
22
|
+
# Parses the Sync Folder Items operation SOAP response.
|
|
23
|
+
class SyncFolderItemsResponseMessage < ResponseMessage
|
|
24
|
+
def sync_state
|
|
25
|
+
safe_hash_access message, %i[elems sync_state text]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def includes_last_item_in_range?
|
|
29
|
+
ans = safe_hash_access message, %i[elems includes_last_item_in_range text]
|
|
30
|
+
ans.downcase == 'true'
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def changes
|
|
34
|
+
safe_hash_access(message, %i[elems changes elems]) || []
|
|
35
|
+
end
|
|
36
|
+
end
|
|
24
37
|
end
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
ans = safe_hash_access message, [:elems, :includes_last_item_in_range, :text]
|
|
28
|
-
ans.downcase == 'true'
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
def changes
|
|
32
|
-
safe_hash_access(message, [:elems, :changes, :elems]) || []
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
end # SyncFolderItemsResponseMessage
|
|
36
|
-
end # Viewpoint::EWS::SOAP
|
|
38
|
+
end
|
|
39
|
+
end
|
data/lib/ews/soap.rb
CHANGED
|
@@ -1,43 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.
|
|
1
|
+
# frozen_string_literal: true
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
# This file is part of Viewpoint; the Ruby library for Microsoft Exchange Web Services.
|
|
4
|
+
#
|
|
5
|
+
# Copyright © 2011 Dan Wanek <dan.wanek@gmail.com>
|
|
6
|
+
#
|
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
# you may not use this file except in compliance with the License.
|
|
9
|
+
# You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
# See the License for the specific language governing permissions and
|
|
17
|
+
# limitations under the License.
|
|
18
18
|
|
|
19
19
|
# This module defines some constants and other niceties to make available to
|
|
20
20
|
# the underlying SOAP classes and modules that do the actual work.
|
|
21
21
|
module Viewpoint
|
|
22
22
|
module EWS
|
|
23
|
+
# SOAP message building, dispatch, and response parsing.
|
|
23
24
|
module SOAP
|
|
24
|
-
|
|
25
25
|
# CONSTANTS
|
|
26
26
|
|
|
27
|
-
NS_SOAP = 'soap'
|
|
28
|
-
NS_EWS_TYPES = 't'
|
|
29
|
-
NS_EWS_MESSAGES = 'm'
|
|
27
|
+
NS_SOAP = 'soap'
|
|
28
|
+
NS_EWS_TYPES = 't'
|
|
29
|
+
NS_EWS_MESSAGES = 'm'
|
|
30
30
|
NAMESPACES = {
|
|
31
31
|
"xmlns:#{NS_SOAP}" => 'http://schemas.xmlsoap.org/soap/envelope/',
|
|
32
32
|
"xmlns:#{NS_EWS_TYPES}" => 'http://schemas.microsoft.com/exchange/services/2006/types',
|
|
33
|
-
"xmlns:#{NS_EWS_MESSAGES}" => 'http://schemas.microsoft.com/exchange/services/2006/messages'
|
|
33
|
+
"xmlns:#{NS_EWS_MESSAGES}" => 'http://schemas.microsoft.com/exchange/services/2006/messages'
|
|
34
34
|
}.freeze
|
|
35
35
|
|
|
36
36
|
# used in ResolveNames to determine where names are resolved
|
|
37
|
+
# rubocop:disable Naming/ConstantName -- public API names
|
|
37
38
|
ActiveDirectory = 'ActiveDirectory'
|
|
38
39
|
ActiveDirectoryContacts = 'ActiveDirectoryContacts'
|
|
39
40
|
Contacts = 'Contacts'
|
|
40
41
|
ContactsActiveDirectory = 'ContactsActiveDirectory'
|
|
42
|
+
# rubocop:enable Naming/ConstantName
|
|
41
43
|
|
|
42
44
|
# Target specific Exchange Server versions
|
|
43
45
|
# @see http://msdn.microsoft.com/en-us/library/bb891876(v=exchg.140).aspx
|
|
@@ -55,10 +57,9 @@ module Viewpoint
|
|
|
55
57
|
MOVE_TO_DELETED_ITEMS = 'MoveToDeletedItems'
|
|
56
58
|
|
|
57
59
|
def initialize
|
|
58
|
-
@log =
|
|
60
|
+
@log = Viewpoint::EWS.root_logger
|
|
59
61
|
@default_ns = NAMESPACES["xmlns:#{NS_EWS_MESSAGES}"]
|
|
60
62
|
end
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
end # Viewpoint
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|