1

我正在尝试使用 EWS 和 gSoap 向交换服务器发送消息。我所做的是:

  1. 设置 SSL 连接和身份验证。与 Exchange 服务器。(这工作正常)

  2. 定义 createItem 操作来创建消息。

  3. 设置接收方信息。

  4. 定义 MessageDispositionType 以定义 sendOnly 消息的类型。

  5. 向服务器发送 CreateItem 请求。

编译成功后,运行程序时出现以下 SOAP 错误(对于 SOAP 版本 1.2)

 SOAP 1.2 fault: SOAP-ENV:Sender[ns2:ErrorSchemaValidation] "The request failed schema validation: The element 'Items' in namespace 'http://schemas.microsoft.com/exchange/services/2006/messages' has incomplete content. List of possible elements expected: 'Item, Message, CalendarItem, Contact, DistributionList, MeetingMessage, MeetingRequest, MeetingResponse, MeetingCancellation, Task, ReplyToItem, ForwardItem, ReplyAllToItem, AcceptItem, TentativelyAcceptItem, DeclineItem, CancelCalendarItem, RemoveItem, SuppressReadReceipt' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types'." Detail: ErrorSchemaValidation/e:ResponseCode

成功编译后,运行程序时出现以下 SOAP 错误(对于 SOAP 版本 1.1)

SOAP 1.1 fault: SOAP-ENV:MustUnderstand[no subcode] "The data in element 'Action' must be understood but cannot be handled" Detail: [no detail]

它可能是什么问题?任何帮助表示赞赏。谢谢你。

4

0 回答 0