Removing support for legacy webservices
This commit is contained in:
committed by
Sebastiaan Janssen
parent
d75cace85d
commit
1340a5ce4b
@@ -39,9 +39,6 @@ namespace Umbraco.Core.IO
|
||||
[Obsolete("Usercontrols are obsolete and code should be removed")]
|
||||
public static string UserControls => "~/usercontrols";
|
||||
|
||||
[Obsolete("Only used by legacy load balancing which is obsolete and should be removed")]
|
||||
public static string WebServices => IOHelper.ReturnPath("umbracoWebservicesPath", Umbraco.EnsureEndsWith("/") + "webservices");
|
||||
|
||||
public static string Packages => Data + "/packages";
|
||||
|
||||
public static string Preview => Data + "/preview";
|
||||
|
||||
@@ -1,248 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Services;
|
||||
using Umbraco.Core.IO;
|
||||
|
||||
namespace Umbraco.Core.Sync
|
||||
{
|
||||
/// <summary>
|
||||
/// The client Soap service for making distributed cache calls between servers
|
||||
/// </summary>
|
||||
[WebServiceBinding(Name = "CacheRefresherSoap", Namespace = "http://umbraco.org/webservices/")]
|
||||
[Obsolete("Legacy load balancing is obsolete and should be removed")]
|
||||
internal class ServerSyncWebServiceClient : System.Web.Services.Protocols.SoapHttpClientProtocol
|
||||
{
|
||||
|
||||
/// <remarks/>
|
||||
public ServerSyncWebServiceClient()
|
||||
{
|
||||
// only set the url if the httpcontext is present, else it's set by the cache dispatcher methods (when using distributed calls)
|
||||
if (System.Web.HttpContext.Current != null)
|
||||
this.Url = "http://" + System.Web.HttpContext.Current.Request.ServerVariables["SERVER_NAME"] + IOHelper.ResolveUrl(SystemDirectories.WebServices) + "/cacheRefresher.asmx";
|
||||
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://umbraco.org/webservices/BulkRefresh", RequestNamespace = "http://umbraco.org/webservices/", ResponseNamespace = "http://umbraco.org/webservices/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void BulkRefresh(RefreshInstruction[] instructions, string appId, string login, string password)
|
||||
{
|
||||
this.Invoke("BulkRefresh", new object[] {
|
||||
instructions,
|
||||
appId,
|
||||
login,
|
||||
password});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginBulkRefresh(RefreshInstruction[] instructions, string appId, string login, string password, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("BulkRefresh", new object[] {
|
||||
instructions,
|
||||
appId,
|
||||
login,
|
||||
password}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndBulkRefresh(System.IAsyncResult asyncResult)
|
||||
{
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://umbraco.org/webservices/RefreshAll", RequestNamespace = "http://umbraco.org/webservices/", ResponseNamespace = "http://umbraco.org/webservices/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void RefreshAll(System.Guid uniqueIdentifier, string Login, string Password)
|
||||
{
|
||||
this.Invoke("RefreshAll", new object[] {
|
||||
uniqueIdentifier,
|
||||
Login,
|
||||
Password});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginRefreshAll(System.Guid uniqueIdentifier, string Login, string Password, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("RefreshAll", new object[] {
|
||||
uniqueIdentifier,
|
||||
Login,
|
||||
Password}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndRefreshAll(System.IAsyncResult asyncResult)
|
||||
{
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://umbraco.org/webservices/RefreshByJson", RequestNamespace = "http://umbraco.org/webservices/", ResponseNamespace = "http://umbraco.org/webservices/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void RefreshByJson(System.Guid uniqueIdentifier, string jsonPayload, string Login, string Password)
|
||||
{
|
||||
this.Invoke("RefreshByJson", new object[] {
|
||||
uniqueIdentifier,
|
||||
jsonPayload,
|
||||
Login,
|
||||
Password});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginRefreshByJson(System.Guid uniqueIdentifier, string jsonPayload, string Login, string Password, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("RefreshByJson", new object[] {
|
||||
uniqueIdentifier,
|
||||
jsonPayload,
|
||||
Login,
|
||||
Password}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndRefreshByJson(System.IAsyncResult asyncResult)
|
||||
{
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://umbraco.org/webservices/RefreshByGuid", RequestNamespace = "http://umbraco.org/webservices/", ResponseNamespace = "http://umbraco.org/webservices/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void RefreshByGuid(System.Guid uniqueIdentifier, System.Guid Id, string Login, string Password)
|
||||
{
|
||||
this.Invoke("RefreshByGuid", new object[] {
|
||||
uniqueIdentifier,
|
||||
Id,
|
||||
Login,
|
||||
Password});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginRefreshByGuid(System.Guid uniqueIdentifier, System.Guid Id, string Login, string Password, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("RefreshByGuid", new object[] {
|
||||
uniqueIdentifier,
|
||||
Id,
|
||||
Login,
|
||||
Password}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndRefreshByGuid(System.IAsyncResult asyncResult)
|
||||
{
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://umbraco.org/webservices/RefreshById",
|
||||
RequestNamespace = "http://umbraco.org/webservices/",
|
||||
ResponseNamespace = "http://umbraco.org/webservices/",
|
||||
Use = System.Web.Services.Description.SoapBindingUse.Literal,
|
||||
ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void RefreshById(System.Guid uniqueIdentifier, int Id, string Login, string Password)
|
||||
{
|
||||
this.Invoke("RefreshById", new object[] {
|
||||
uniqueIdentifier,
|
||||
Id,
|
||||
Login,
|
||||
Password});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginRefreshById(System.Guid uniqueIdentifier, int Id, string Login, string Password, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("RefreshById", new object[] {
|
||||
uniqueIdentifier,
|
||||
Id,
|
||||
Login,
|
||||
Password}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndRefreshById(System.IAsyncResult asyncResult)
|
||||
{
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://umbraco.org/webservices/RefreshByIds",
|
||||
RequestNamespace = "http://umbraco.org/webservices/",
|
||||
ResponseNamespace = "http://umbraco.org/webservices/",
|
||||
Use = System.Web.Services.Description.SoapBindingUse.Literal,
|
||||
ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void RefreshByIds(System.Guid uniqueIdentifier, string jsonIds, string Login, string Password)
|
||||
{
|
||||
this.Invoke("RefreshByIds", new object[] {
|
||||
uniqueIdentifier,
|
||||
jsonIds,
|
||||
Login,
|
||||
Password});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginRefreshByIds(System.Guid uniqueIdentifier, string jsonIds, string Login, string Password, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("RefreshByIds", new object[] {
|
||||
uniqueIdentifier,
|
||||
jsonIds,
|
||||
Login,
|
||||
Password}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndRefreshByIds(System.IAsyncResult asyncResult)
|
||||
{
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://umbraco.org/webservices/RemoveById", RequestNamespace = "http://umbraco.org/webservices/", ResponseNamespace = "http://umbraco.org/webservices/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void RemoveById(System.Guid uniqueIdentifier, int Id, string Login, string Password)
|
||||
{
|
||||
this.Invoke("RemoveById", new object[] {
|
||||
uniqueIdentifier,
|
||||
Id,
|
||||
Login,
|
||||
Password});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginRemoveById(System.Guid uniqueIdentifier, int Id, string Login, string Password, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("RemoveById", new object[] {
|
||||
uniqueIdentifier,
|
||||
Id,
|
||||
Login,
|
||||
Password}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndRemoveById(System.IAsyncResult asyncResult)
|
||||
{
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://umbraco.org/webservices/GetRefreshers", RequestNamespace = "http://umbraco.org/webservices/", ResponseNamespace = "http://umbraco.org/webservices/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public System.Xml.XmlNode GetRefreshers(string Login, string Password)
|
||||
{
|
||||
object[] results = this.Invoke("GetRefreshers", new object[] {
|
||||
Login,
|
||||
Password});
|
||||
return ((System.Xml.XmlNode)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginGetRefreshers(string Login, string Password, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("GetRefreshers", new object[] {
|
||||
Login,
|
||||
Password}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.Xml.XmlNode EndGetRefreshers(System.IAsyncResult asyncResult)
|
||||
{
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((System.Xml.XmlNode)(results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1524,9 +1524,6 @@
|
||||
<Compile Include="Persistence\FaultHandling\RetryDbConnection.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Sync\ServerSyncWebServiceClient.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="..\SolutionInfo.cs">
|
||||
<Link>Properties\SolutionInfo.cs</Link>
|
||||
</Compile>
|
||||
|
||||
@@ -4,7 +4,6 @@ using System.Linq;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Logging;
|
||||
|
||||
namespace Umbraco.Core
|
||||
{
|
||||
@@ -28,7 +27,6 @@ namespace Umbraco.Core
|
||||
/// If any route has an extension in the path like .aspx = back office
|
||||
///
|
||||
/// These are def back office:
|
||||
/// /Umbraco/RestServices = back office
|
||||
/// /Umbraco/BackOffice = back office
|
||||
/// /Umbraco/Preview = back office
|
||||
/// If it's not any of the above, and there's no extension then we cannot determine if it's back office or front-end
|
||||
@@ -78,7 +76,6 @@ namespace Umbraco.Core
|
||||
|
||||
//check for special back office paths
|
||||
if (urlPath.InvariantStartsWith("/" + globalSettings.GetUmbracoMvcArea() + "/BackOffice/")
|
||||
|| urlPath.InvariantStartsWith("/" + globalSettings.GetUmbracoMvcArea() + "/RestServices/")
|
||||
|| urlPath.InvariantStartsWith("/" + globalSettings.GetUmbracoMvcArea() + "/Preview/"))
|
||||
{
|
||||
return true;
|
||||
|
||||
@@ -367,7 +367,6 @@ namespace Umbraco.Tests.Composing
|
||||
"umbraco.interfaces,",
|
||||
"umbraco.providers,",
|
||||
"Umbraco.Web.UI,",
|
||||
"umbraco.webservices",
|
||||
"Lucene.",
|
||||
"Examine,",
|
||||
"Examine.",
|
||||
|
||||
@@ -33,7 +33,6 @@ namespace Umbraco.Tests.CoreThings
|
||||
[TestCase("http://www.domain.com/umbrac", "", false)]
|
||||
[TestCase("http://www.domain.com/test", "", false)]
|
||||
[TestCase("http://www.domain.com/test/umbraco", "", false)]
|
||||
[TestCase("http://www.domain.com/Umbraco/restServices/blah", "", true)]
|
||||
[TestCase("http://www.domain.com/Umbraco/Backoffice/blah", "", true)]
|
||||
[TestCase("http://www.domain.com/Umbraco/anything", "", true)]
|
||||
[TestCase("http://www.domain.com/Umbraco/anything/", "", true)]
|
||||
@@ -42,8 +41,6 @@ namespace Umbraco.Tests.CoreThings
|
||||
[TestCase("http://www.domain.com/myvdir/umbraco/api/blah", "myvdir", false)]
|
||||
[TestCase("http://www.domain.com/MyVdir/umbraco/api/blah", "/myvdir", false)]
|
||||
[TestCase("http://www.domain.com/MyVdir/Umbraco/", "myvdir", true)]
|
||||
[TestCase("http://www.domain.com/MyVdir/Umbraco/restServices/blah", "/myvdir", true)]
|
||||
[TestCase("http://www.domain.com/umbraco/webservices/legacyAjaxCalls.asmx/js", "", true)]
|
||||
[TestCase("http://www.domain.com/umbraco/test/legacyAjaxCalls.ashx?some=query&blah=js", "", true)]
|
||||
public void Is_Back_Office_Request(string input, string virtualPath, bool expected)
|
||||
{
|
||||
|
||||
@@ -44,7 +44,6 @@ namespace Umbraco.Tests.IO
|
||||
Assert.AreEqual(IOHelper.MapPath(SystemDirectories.Scripts, true), IOHelper.MapPath(SystemDirectories.Scripts, false));
|
||||
Assert.AreEqual(IOHelper.MapPath(SystemDirectories.Umbraco, true), IOHelper.MapPath(SystemDirectories.Umbraco, false));
|
||||
Assert.AreEqual(IOHelper.MapPath(SystemDirectories.UserControls, true), IOHelper.MapPath(SystemDirectories.UserControls, false));
|
||||
Assert.AreEqual(IOHelper.MapPath(SystemDirectories.WebServices, true), IOHelper.MapPath(SystemDirectories.WebServices, false));
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -44,14 +44,6 @@ namespace Umbraco.Web.Mvc
|
||||
id = @"[a-zA-Z]*"
|
||||
},
|
||||
new[] {typeof (BackOfficeController).Namespace});
|
||||
|
||||
//Create the REST/web/script service routes
|
||||
context.MapRoute(
|
||||
"Umbraco_web_services",
|
||||
_globalSettings.GetUmbracoMvcArea() + "/RestServices/{controller}/{action}/{id}",
|
||||
new {controller = "SaveFileController", action = "Index", id = UrlParameter.Optional},
|
||||
//look in this namespace for controllers
|
||||
new[] {"Umbraco.Web.WebServices"});
|
||||
}
|
||||
|
||||
public override string AreaName => _globalSettings.GetUmbracoMvcArea();
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace Umbraco.Web.Routing
|
||||
{
|
||||
//public class WebServicesRouteConstraint : IRouteConstraint
|
||||
//{
|
||||
// public bool Match(
|
||||
// HttpContextBase httpContext,
|
||||
// Route route,
|
||||
// string parameterName,
|
||||
// RouteValueDictionary values,
|
||||
// RouteDirection routeDirection)
|
||||
// {
|
||||
// if (routeDirection == RouteDirection.UrlGeneration)
|
||||
// {
|
||||
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
@@ -1137,7 +1137,6 @@
|
||||
<Compile Include="Routing\EnsureRoutableOutcome.cs" />
|
||||
<Compile Include="Routing\PublishedRouter.cs" />
|
||||
<Compile Include="Routing\UrlProvider.cs" />
|
||||
<Compile Include="Routing\WebServicesRouteConstraint.cs" />
|
||||
<Compile Include="Search\ExamineSearcherModel.cs" />
|
||||
<Compile Include="Search\ExamineComponent.cs" />
|
||||
<Compile Include="Components\DatabaseServerRegistrarAndMessengerComponent.cs" />
|
||||
|
||||
Reference in New Issue
Block a user