"GetUserOofSettings"、"SetUserOofSettings"和"GetUserAvailability"的作業不支援 Exchange 模擬 Exchange Server 2010 SP1 結構描述


徵狀


您試著自動產生 proxy 程式碼,根據 Microsoft Exchange Server 2010 Service Pack 1 (SP1) 結構描述。 在此情況下下, 面這一行沒有出現在 proxy 程式碼:
[System.Web.Services.Protocols.SoapHeaderAttribute("ExchangeImpersonation")] 
因此,自動產生的 proxy 並不支援 Exchange Impersonation.This 問題會影響下列三個作業:
  • GetUserOofSettings
  • SetUserOofSettings
  • GetUserAvailability

解決方案


若要解決這個問題,安裝下列更新彙總套件:
2579150 更新彙總套件 4 的 Exchange Server 2010 Service Pack 1 的描述

因應措施


若要解決這個問題,請使用 Microsoft Exchange Web 服務 (EWS) Managed API 1.1 變更結構描述中產生的類別。 若要這麼做,請在 proxy 程式碼中加入下面這一行:
[System.Web.Services.Protocols.SoapHeaderAttribute("ExchangeImpersonation")] 
下面是GetUserOofSettings操作的範例。原來的程式碼:
[System.Web.Services.Protocols.SoapHeaderAttribute("ServerVersionInfoValue", Direction = System.Web.Services.Protocols.SoapHeaderDirection.Out)][System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.microsoft.com/exchange/services/2006/messages/GetUserOofSettings", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)][return: System.Xml.Serialization.XmlElementAttribute("GetUserOofSettingsResponse", Namespace = "http://schemas.microsoft.com/exchange/services/2006/messages")]public GetUserOofSettingsResponse GetUserOofSettings([System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.microsoft.com/exchange/services/2006/messages")] GetUserOofSettingsRequest GetUserOofSettingsRequest){    object[] results = this.Invoke("GetUserOofSettings", new object[] {    GetUserOofSettingsRequest});    return ((GetUserOofSettingsResponse)(results[0]));}
變更的程式碼:
[System.Web.Services.Protocols.SoapHeaderAttribute("ServerVersionInfoValue", Direction = System.Web.Services.Protocols.SoapHeaderDirection.Out)][System.Web.Services.Protocols.SoapHeaderAttribute("ExchangeImpersonation")][System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.microsoft.com/exchange/services/2006/messages/GetUserOofSettings", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)][return: System.Xml.Serialization.XmlElementAttribute("GetUserOofSettingsResponse", Namespace = "http://schemas.microsoft.com/exchange/services/2006/messages")]public GetUserOofSettingsResponse GetUserOofSettings([System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.microsoft.com/exchange/services/2006/messages")] GetUserOofSettingsRequest GetUserOofSettingsRequest){    object[] results = this.Invoke("GetUserOofSettings", new object[] {    GetUserOofSettingsRequest});    return ((GetUserOofSettingsResponse)(results[0]));}

狀態


Microsoft 已確認<適用於>一節中所列的 Microsoft 產品確實有上述問題。

其他相關資訊


如需有關GetUserOofSettings操作的詳細資訊,請造訪下列 Microsoft 網站:如需有關SetUserOofSettings操作的詳細資訊,請造訪下列 Microsoft 網站:如需有關GetUserAvailability操作的詳細資訊,請造訪下列 Microsoft 網站:如需有關 Exchange 模擬的詳細資訊,請造訪下列 Microsoft 網站: