diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Lync2013/LyncBase.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Lync2013/LyncBase.cs index 7894d701..70b244db 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Lync2013/LyncBase.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution.Lync2013/LyncBase.cs @@ -84,6 +84,11 @@ namespace WebsitePanel.Providers.HostedSolution return CreateOrganizationInternal(organizationId, sipDomain, enableConferencingVideo, maxConferenceSize, enabledFederation, enabledEnterpriseVoice); } + public virtual string GetOrganizationTenantId(string organizationId) + { + return "NoHostingPack"; + } + public virtual bool DeleteOrganization(string organizationId, string sipDomain) { return DeleteOrganizationInternal(organizationId, sipDomain); diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/LyncServerProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/LyncServerProxy.cs index afb3f428..8cfb33c3 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Client/LyncServerProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/LyncServerProxy.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2012, Outercurve Foundation. +// Copyright (c) 2012, Outercurve Foundation. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, @@ -29,7 +29,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.6400 +// Runtime Version:2.0.50727.5466 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -37,11 +37,11 @@ //------------------------------------------------------------------------------ // -// This source code was auto-generated by wsdl, Version=2.0.50727.3038. -// - +// This source code was auto-generated by wsdl, Version=2.0.50727.42. +// using WebsitePanel.Providers.HostedSolution; + namespace WebsitePanel.Providers.Lync { using System.Xml.Serialization; using System.Web.Services; @@ -52,7 +52,7 @@ namespace WebsitePanel.Providers.Lync { /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Web.Services.WebServiceBindingAttribute(Name="LyncServerSoap", Namespace="http://smbsaas/websitepanel/server/")] @@ -62,6 +62,8 @@ namespace WebsitePanel.Providers.Lync { private System.Threading.SendOrPostCallback CreateOrganizationOperationCompleted; + private System.Threading.SendOrPostCallback GetOrganizationTenantIdOperationCompleted; + private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted; private System.Threading.SendOrPostCallback CreateUserOperationCompleted; @@ -82,14 +84,19 @@ namespace WebsitePanel.Providers.Lync { private System.Threading.SendOrPostCallback ReloadConfigurationOperationCompleted; + private System.Threading.SendOrPostCallback GetPolicyListOperationCompleted; + /// public LyncServer() { - this.Url = "http://localhost:9003/LyncServer.asmx"; + this.Url = "http://localhost:9004/LyncServer.asmx"; } /// public event CreateOrganizationCompletedEventHandler CreateOrganizationCompleted; + /// + public event GetOrganizationTenantIdCompletedEventHandler GetOrganizationTenantIdCompleted; + /// public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted; @@ -120,6 +127,9 @@ namespace WebsitePanel.Providers.Lync { /// public event ReloadConfigurationCompletedEventHandler ReloadConfigurationCompleted; + /// + public event GetPolicyListCompletedEventHandler GetPolicyListCompleted; + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/CreateOrganization", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] @@ -180,6 +190,66 @@ namespace WebsitePanel.Providers.Lync { } } + /// + [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetOrganizationTenantId", 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 GetOrganizationTenantId(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice) { + object[] results = this.Invoke("GetOrganizationTenantId", new object[] { + organizationId, + sipDomain, + enableConferencing, + enableConferencingVideo, + maxConferenceSize, + enabledFederation, + enabledEnterpriseVoice}); + return ((string)(results[0])); + } + + /// + public System.IAsyncResult BeginGetOrganizationTenantId(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetOrganizationTenantId", new object[] { + organizationId, + sipDomain, + enableConferencing, + enableConferencingVideo, + maxConferenceSize, + enabledFederation, + enabledEnterpriseVoice}, callback, asyncState); + } + + /// + public string EndGetOrganizationTenantId(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((string)(results[0])); + } + + /// + public void GetOrganizationTenantIdAsync(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice) { + this.GetOrganizationTenantIdAsync(organizationId, sipDomain, enableConferencing, enableConferencingVideo, maxConferenceSize, enabledFederation, enabledEnterpriseVoice, null); + } + + /// + public void GetOrganizationTenantIdAsync(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice, object userState) { + if ((this.GetOrganizationTenantIdOperationCompleted == null)) { + this.GetOrganizationTenantIdOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationTenantIdOperationCompleted); + } + this.InvokeAsync("GetOrganizationTenantId", new object[] { + organizationId, + sipDomain, + enableConferencing, + enableConferencingVideo, + maxConferenceSize, + enabledFederation, + enabledEnterpriseVoice}, this.GetOrganizationTenantIdOperationCompleted, userState); + } + + private void OnGetOrganizationTenantIdOperationCompleted(object arg) { + if ((this.GetOrganizationTenantIdCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetOrganizationTenantIdCompleted(this, new GetOrganizationTenantIdCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")] [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/DeleteOrganization", RequestNamespace="http://smbsaas/websitepanel/server/", ResponseNamespace="http://smbsaas/websitepanel/server/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] @@ -627,17 +697,52 @@ namespace WebsitePanel.Providers.Lync { this.ReloadConfigurationCompleted(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/GetPolicyList", 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[] GetPolicyList(LyncPolicyType type, string name) - { + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/server/GetPolicyList", 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[] GetPolicyList(LyncPolicyType type, string name) { object[] results = this.Invoke("GetPolicyList", new object[] { - type, name}); + type, + name}); return ((string[])(results[0])); } + /// + public System.IAsyncResult BeginGetPolicyList(LyncPolicyType type, string name, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetPolicyList", new object[] { + type, + name}, callback, asyncState); + } + + /// + public string[] EndGetPolicyList(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((string[])(results[0])); + } + + /// + public void GetPolicyListAsync(LyncPolicyType type, string name) { + this.GetPolicyListAsync(type, name, null); + } + + /// + public void GetPolicyListAsync(LyncPolicyType type, string name, object userState) { + if ((this.GetPolicyListOperationCompleted == null)) { + this.GetPolicyListOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPolicyListOperationCompleted); + } + this.InvokeAsync("GetPolicyList", new object[] { + type, + name}, this.GetPolicyListOperationCompleted, userState); + } + + private void OnGetPolicyListOperationCompleted(object arg) { + if ((this.GetPolicyListCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetPolicyListCompleted(this, new GetPolicyListCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// public new void CancelAsync(object userState) { base.CancelAsync(userState); @@ -645,11 +750,11 @@ namespace WebsitePanel.Providers.Lync { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void CreateOrganizationCompletedEventHandler(object sender, CreateOrganizationCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CreateOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -671,11 +776,37 @@ namespace WebsitePanel.Providers.Lync { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetOrganizationTenantIdCompletedEventHandler(object sender, GetOrganizationTenantIdCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetOrganizationTenantIdCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetOrganizationTenantIdCompletedEventArgs(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 DeleteOrganizationCompletedEventHandler(object sender, DeleteOrganizationCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class DeleteOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -697,11 +828,11 @@ namespace WebsitePanel.Providers.Lync { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [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.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CreateUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -723,11 +854,11 @@ namespace WebsitePanel.Providers.Lync { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetLyncUserGeneralSettingsCompletedEventHandler(object sender, GetLyncUserGeneralSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetLyncUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -749,11 +880,11 @@ namespace WebsitePanel.Providers.Lync { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetLyncUserGeneralSettingsCompletedEventHandler(object sender, SetLyncUserGeneralSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SetLyncUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -775,11 +906,11 @@ namespace WebsitePanel.Providers.Lync { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void SetLyncUserPlanCompletedEventHandler(object sender, SetLyncUserPlanCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SetLyncUserPlanCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -801,11 +932,11 @@ namespace WebsitePanel.Providers.Lync { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void DeleteUserCompletedEventHandler(object sender, DeleteUserCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class DeleteUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -827,11 +958,11 @@ namespace WebsitePanel.Providers.Lync { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void GetFederationDomainsCompletedEventHandler(object sender, GetFederationDomainsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetFederationDomainsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -853,11 +984,11 @@ namespace WebsitePanel.Providers.Lync { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void AddFederationDomainCompletedEventHandler(object sender, AddFederationDomainCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class AddFederationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -879,11 +1010,11 @@ namespace WebsitePanel.Providers.Lync { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void RemoveFederationDomainCompletedEventHandler(object sender, RemoveFederationDomainCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class RemoveFederationDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -905,6 +1036,32 @@ namespace WebsitePanel.Providers.Lync { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] public delegate void ReloadConfigurationCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + public delegate void GetPolicyListCompletedEventHandler(object sender, GetPolicyListCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetPolicyListCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetPolicyListCompletedEventArgs(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])); + } + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.Server/LyncServer.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/LyncServer.asmx.cs index 0ab4e33e..d5b8f677 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server/LyncServer.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server/LyncServer.asmx.cs @@ -71,7 +71,7 @@ namespace WebsitePanel.Server } [WebMethod, SoapHeader("settings")] - public string GetOrganizationTenantId(string organizationId, string sipDomain, bool enableConferencing, bool enableConferencingVideo, int maxConferenceSize, bool enabledFederation, bool enabledEnterpriseVoice) + public string GetOrganizationTenantId(string organizationId) { try {