// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // - Redistributions of source code must retain the above copyright notice, this // list of conditions and the following disclaimer. // // - Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // - Neither the name of the Outercurve Foundation nor the names of its // contributors may be used to endorse or promote products derived from this // software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. //------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:2.0.50727.3053 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ // // This source code was auto-generated by wsdl, Version=2.0.50727.42. // using WebsitePanel.Providers.HostedSolution; namespace WebsitePanel.Providers.OCS { using System.Diagnostics; using System.Web.Services; using System.ComponentModel; using System.Web.Services.Protocols; using System; using System.Xml.Serialization; /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Web.Services.WebServiceBindingAttribute(Name="OCSServerSoap", Namespace="http://smbsaas/websitepanel/server/")] public partial class OCSServer : Microsoft.Web.Services3.WebServicesClientProtocol { public ServiceProviderSettingsSoapHeader ServiceProviderSettingsSoapHeaderValue; private System.Threading.SendOrPostCallback CreateUserOperationCompleted; private System.Threading.SendOrPostCallback GetUserGeneralSettingsOperationCompleted; private System.Threading.SendOrPostCallback SetUserGeneralSettingsOperationCompleted; private System.Threading.SendOrPostCallback DeleteUserOperationCompleted; private System.Threading.SendOrPostCallback SetUserPrimaryUriOperationCompleted; /// public OCSServer() { this.Url = "http://exchange-dev:9003/OCSServer.asmx"; } /// public event CreateUserCompletedEventHandler CreateUserCompleted; /// public event GetUserGeneralSettingsCompletedEventHandler GetUserGeneralSettingsCompleted; /// public event SetUserGeneralSettingsCompletedEventHandler SetUserGeneralSettingsCompleted; /// public event DeleteUserCompletedEventHandler DeleteUserCompleted; /// public event SetUserPrimaryUriCompletedEventHandler SetUserPrimaryUriCompleted; /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateUser", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public string CreateUser(string userUpn, string userDistinguishedName) { object[] results = this.Invoke("CreateUser", new object[] { userUpn, userDistinguishedName}); return ((string)(results[0])); } /// public System.IAsyncResult BeginCreateUser(string userUpn, string userDistinguishedName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("CreateUser", new object[] { userUpn, userDistinguishedName}, callback, asyncState); } /// public string EndCreateUser(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((string)(results[0])); } /// public void CreateUserAsync(string userUpn, string userDistinguishedName) { this.CreateUserAsync(userUpn, userDistinguishedName, null); } /// public void CreateUserAsync(string userUpn, string userDistinguishedName, object userState) { if ((this.CreateUserOperationCompleted == null)) { this.CreateUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateUserOperationCompleted); } this.InvokeAsync("CreateUser", new object[] { userUpn, userDistinguishedName}, this.CreateUserOperationCompleted, userState); } private void OnCreateUserOperationCompleted(object arg) { if ((this.CreateUserCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.CreateUserCompleted(this, new CreateUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetUserGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public OCSUser GetUserGeneralSettings(string instanceId) { object[] results = this.Invoke("GetUserGeneralSettings", new object[] { instanceId}); return ((OCSUser)(results[0])); } /// public System.IAsyncResult BeginGetUserGeneralSettings(string instanceId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetUserGeneralSettings", new object[] { instanceId}, callback, asyncState); } /// public OCSUser EndGetUserGeneralSettings(System.IAsyncResult asyncResult) { object[] results = this.EndInvoke(asyncResult); return ((OCSUser)(results[0])); } /// public void GetUserGeneralSettingsAsync(string instanceId) { this.GetUserGeneralSettingsAsync(instanceId, null); } /// public void GetUserGeneralSettingsAsync(string instanceId, object userState) { if ((this.GetUserGeneralSettingsOperationCompleted == null)) { this.GetUserGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetUserGeneralSettingsOperationCompleted); } this.InvokeAsync("GetUserGeneralSettings", new object[] { instanceId}, this.GetUserGeneralSettingsOperationCompleted, userState); } private void OnGetUserGeneralSettingsOperationCompleted(object arg) { if ((this.GetUserGeneralSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.GetUserGeneralSettingsCompleted(this, new GetUserGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetUserGeneralSettings", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public void SetUserGeneralSettings(string instanceId, bool enabledForFederation, bool enabledForPublicIMConectivity, bool archiveInternalCommunications, bool archiveFederatedCommunications, bool enabledForEnhancedPresence) { this.Invoke("SetUserGeneralSettings", new object[] { instanceId, enabledForFederation, enabledForPublicIMConectivity, archiveInternalCommunications, archiveFederatedCommunications, enabledForEnhancedPresence}); } /// public System.IAsyncResult BeginSetUserGeneralSettings(string instanceId, bool enabledForFederation, bool enabledForPublicIMConectivity, bool archiveInternalCommunications, bool archiveFederatedCommunications, bool enabledForEnhancedPresence, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetUserGeneralSettings", new object[] { instanceId, enabledForFederation, enabledForPublicIMConectivity, archiveInternalCommunications, archiveFederatedCommunications, enabledForEnhancedPresence}, callback, asyncState); } /// public void EndSetUserGeneralSettings(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } /// public void SetUserGeneralSettingsAsync(string instanceId, bool enabledForFederation, bool enabledForPublicIMConectivity, bool archiveInternalCommunications, bool archiveFederatedCommunications, bool enabledForEnhancedPresence) { this.SetUserGeneralSettingsAsync(instanceId, enabledForFederation, enabledForPublicIMConectivity, archiveInternalCommunications, archiveFederatedCommunications, enabledForEnhancedPresence, null); } /// public void SetUserGeneralSettingsAsync(string instanceId, bool enabledForFederation, bool enabledForPublicIMConectivity, bool archiveInternalCommunications, bool archiveFederatedCommunications, bool enabledForEnhancedPresence, object userState) { if ((this.SetUserGeneralSettingsOperationCompleted == null)) { this.SetUserGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetUserGeneralSettingsOperationCompleted); } this.InvokeAsync("SetUserGeneralSettings", new object[] { instanceId, enabledForFederation, enabledForPublicIMConectivity, archiveInternalCommunications, archiveFederatedCommunications, enabledForEnhancedPresence}, this.SetUserGeneralSettingsOperationCompleted, userState); } private void OnSetUserGeneralSettingsOperationCompleted(object arg) { if ((this.SetUserGeneralSettingsCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetUserGeneralSettingsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteUser", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public void DeleteUser(string instanceId) { this.Invoke("DeleteUser", new object[] { instanceId}); } /// public System.IAsyncResult BeginDeleteUser(string instanceId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("DeleteUser", new object[] { instanceId}, callback, asyncState); } /// public void EndDeleteUser(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } /// public void DeleteUserAsync(string instanceId) { this.DeleteUserAsync(instanceId, null); } /// public void DeleteUserAsync(string instanceId, object userState) { if ((this.DeleteUserOperationCompleted == null)) { this.DeleteUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteUserOperationCompleted); } this.InvokeAsync("DeleteUser", new object[] { instanceId}, this.DeleteUserOperationCompleted, userState); } private void OnDeleteUserOperationCompleted(object arg) { if ((this.DeleteUserCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.DeleteUserCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/SetUserPrimaryUri", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public void SetUserPrimaryUri(string instanceId, string userUpn) { this.Invoke("SetUserPrimaryUri", new object[] { instanceId, userUpn}); } /// public System.IAsyncResult BeginSetUserPrimaryUri(string instanceId, string userUpn, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("SetUserPrimaryUri", new object[] { instanceId, userUpn}, callback, asyncState); } /// public void EndSetUserPrimaryUri(System.IAsyncResult asyncResult) { this.EndInvoke(asyncResult); } /// public void SetUserPrimaryUriAsync(string instanceId, string userUpn) { this.SetUserPrimaryUriAsync(instanceId, userUpn, null); } /// public void SetUserPrimaryUriAsync(string instanceId, string userUpn, object userState) { if ((this.SetUserPrimaryUriOperationCompleted == null)) { this.SetUserPrimaryUriOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetUserPrimaryUriOperationCompleted); } this.InvokeAsync("SetUserPrimaryUri", new object[] { instanceId, userUpn}, this.SetUserPrimaryUriOperationCompleted, userState); } private void OnSetUserPrimaryUriOperationCompleted(object arg) { if ((this.SetUserPrimaryUriCompleted != null)) { System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); this.SetUserPrimaryUriCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } /// public new void CancelAsync(object userState) { base.CancelAsync(userState); } } /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CreateUserCompletedEventHandler(object sender, CreateUserCompletedEventArgs e); /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CreateUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { private object[] results; internal CreateUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; } /// public string Result { get { this.RaiseExceptionIfNecessary(); return ((string)(this.results[0])); } } } /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetUserGeneralSettingsCompletedEventHandler(object sender, GetUserGeneralSettingsCompletedEventArgs e); /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { private object[] results; internal GetUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; } /// public OCSUser Result { get { this.RaiseExceptionIfNecessary(); return ((OCSUser)(this.results[0])); } } } /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetUserGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteUserCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); /// [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetUserPrimaryUriCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); }