You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been working on a Proof of Concept today using this gem and keep on getting the error in the title when trying to forward emails.
Full error DEBUG Viewpoint::EWS::Connection : Internal SOAP error. Message: The request failed schema validation: The element 'ForwardItem' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types' has invalid child element 'IsRead' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types'. List of possible elements expected: 'CcRecipients, BccRecipients, IsReadReceiptRequested, IsDeliveryReceiptRequested, From, ReferenceItemId, NewBodyContent' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types'., Code: a:ErrorSchemaValidation
SOAP request being sent as provided by require 'viewpoint/logging/config', removing my email address for obvious reasons.
def forward(message)
message.forward do |m|
m.new_body_content = 'This is a test forward'
m.to_recipients << 'REMOVED'
m.importance = nil
m.is_read = nil
end
end
I did manage to work around the issue by directly modifying the Viewpoint code in the gem folder but obviously this is far from an ideal solution.
To get it to work I changed this msg[:is_read] = is_read
to this msg[:is_read] = is_read if is_read != nil
that code is on line 67 of lib/ews/templates/message.rb
I am more than happy to put in a Pull Request if you want, I just can't do it right at this moment.
The text was updated successfully, but these errors were encountered:
I've been working on a Proof of Concept today using this gem and keep on getting the error in the title when trying to forward emails.
Full error
DEBUG Viewpoint::EWS::Connection : Internal SOAP error. Message: The request failed schema validation: The element 'ForwardItem' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types' has invalid child element 'IsRead' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types'. List of possible elements expected: 'CcRecipients, BccRecipients, IsReadReceiptRequested, IsDeliveryReceiptRequested, From, ReferenceItemId, NewBodyContent' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types'., Code: a:ErrorSchemaValidation
SOAP request being sent as provided by require 'viewpoint/logging/config', removing my email address for obvious reasons.
Code I am using to forward
I did manage to work around the issue by directly modifying the Viewpoint code in the gem folder but obviously this is far from an ideal solution.
To get it to work I changed this
msg[:is_read] = is_read
to this
msg[:is_read] = is_read if is_read != nil
that code is on line 67 of lib/ews/templates/message.rb
I am more than happy to put in a Pull Request if you want, I just can't do it right at this moment.
The text was updated successfully, but these errors were encountered: