Hi,
I use version 16.10.0.0
I have created MailQuery object with
string pSubject = “12345’”;
ExchangeQueryBuilder qb = new ExchangeQueryBuilder();
qb.Subject.Contains(pSubject);
MailQuery mailQ = qb.GetQuery();
Please mention the apostrophe in subject;
now I try to use method to list messages.
IEWSClient.ListMessages(folderUri, maxResult, mailQ);
method call fails on error:
System.Web.Services.Protocols.SoapException: The request failed schema validation: The element ‘Restriction’ in namespace ‘http://schemas.microsoft.com/exchange/services/2006/messages
’ has incomplete content. List of possible elements expected: ‘SearchExpression, Exists, Excludes, IsEqualTo, IsNotEqualTo, IsGreaterThan, IsGreaterThanOrEqualTo, IsLessThan, IsLessThanOrEqualTo, Contains, Not, And, Or’ in namespace ‘http://schemas.microsoft.com/exchange/services/2006/types
’.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Aspose.Email.Exchange.Schema.Exchange_2013.ExchangeServiceBinding.FindItem(FindItemType FindItem1)
at #=qFBZJNJeTrY4DOlsawgw1lNTee5c5eC2B3Vr0KGfVAHnkLfRDAWy6A3PKvu8enu8D.#=qGaV7HzMnlvWwqTc3c2GIFa8iZ$QarTsw_PLYsmSxniM=(ExchangeMessagePageInf…
I have tried to escape apostrophe character and use
string pSubject = “12345’”;
but have same result
If I use my code without apostrophe in query - all works fine
please advise solution.
Thanks a lot