我尝试使用带有gSoap的EWS向交换服务器发送消息。我所做的是:
设置SSL连接和验证。与Exchange Server。 (这很好用)
定义createItem操作以创建消息。
设置接收者信息。
定义MessageDispositionType以定义sendOnly消息的类型。
向服务器发送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]
这可能是什么问题?任何帮助赞赏。谢谢。