Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/SoapCore.Tests/WsdlFromFile/WsdlIncludeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void CheckXSDIncludeXSD()
var addresses = _host.ServerFeatures.Get<IServerAddressesFeature>();
var address = addresses.Addresses.Single();

string url = address + "/Service.asmx?xsd&name=echoIncluded.xsd";
string url = address + "/Management/Service.asmx?xsd&name=echoIncluded.xsd";

Assert.IsNotNull(element);
Assert.AreEqual(url, element.Attributes["schemaLocation"]?.Value);
Expand Down
3 changes: 1 addition & 2 deletions src/SoapCore/HeadersHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ public static string GetSoapAction(HttpContext httpContext, ref Message message)
}
#endif

if (soapAction != null &&
(GetTrimmedSoapAction(soapAction).Length == 0 || GetTrimmedClearedSoapAction(soapAction).Length == 0))
if (GetTrimmedSoapAction(soapAction).Length == 0 || GetTrimmedClearedSoapAction(soapAction).Length == 0)
{
soapAction = ReadOnlySpan<char>.Empty;
}
Expand Down
16 changes: 4 additions & 12 deletions src/SoapCore/SoapEndpointMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1060,9 +1060,9 @@ private MetaFromFile GetMeta(HttpContext httpContext)
meta.CurrentWebServer = options.VirtualPath + "/";
}

meta.CurrentWebService = httpContext.Request.Path.Value.Replace("/", string.Empty);
var mapping = options.WebServiceWSDLMapping[meta.CurrentWebService];

string url = httpContext.Request.Path.Value.Replace("/", string.Empty);
var mapping = options.WebServiceWSDLMapping[url];
meta.CurrentWebService = string.IsNullOrEmpty(mapping.UrlOverride) ? url : mapping.UrlOverride;
meta.WSDLFolder = mapping.WSDLFolder;
meta.XsdFolder = mapping.SchemaFolder;
meta.ServerUrl = GetServerUrl(options, httpContext);
Expand Down Expand Up @@ -1135,15 +1135,7 @@ private async Task ProcessMetaFromFile(HttpContext httpContext, bool showDocumen
meta.CurrentWebServer = options.VirtualPath + "/";
}

if (string.IsNullOrEmpty(mapping.UrlOverride))
{
meta.CurrentWebService = url;
}
else
{
meta.CurrentWebService = mapping.UrlOverride;
}

meta.CurrentWebService = string.IsNullOrEmpty(mapping.UrlOverride) ? url : mapping.UrlOverride;
meta.WSDLFolder = mapping.WSDLFolder;
meta.XsdFolder = mapping.SchemaFolder;
meta.ServerUrl = GetServerUrl(options, httpContext);
Expand Down
Loading