From 1a23e07f86e3c187c56582260559a25fe9985c2a Mon Sep 17 00:00:00 2001 From: vincent1405 Date: Mon, 20 Jan 2025 09:59:36 +0100 Subject: [PATCH 1/2] Update SoapEndpointMiddleware.cs Use Path.Combine to create a file path to WsdlFile. --- src/SoapCore/SoapEndpointMiddleware.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SoapCore/SoapEndpointMiddleware.cs b/src/SoapCore/SoapEndpointMiddleware.cs index ae937ccc..47dd194d 100644 --- a/src/SoapCore/SoapEndpointMiddleware.cs +++ b/src/SoapCore/SoapEndpointMiddleware.cs @@ -1124,14 +1124,14 @@ private async Task ProcessMetaFromFile(HttpContext httpContext, bool showDocumen meta.CurrentWebService = mapping.UrlOverride; } - meta.WSDLFolder = mapping.WSDLFolder; + meta.WSDLFolder = mapping.WSDLFolder ?? ""; meta.XsdFolder = mapping.SchemaFolder; meta.ServerUrl = GetServerUrl(options, httpContext); string wsdlfile = mapping.WsdlFile; - string path = options.AppPath; - string wsdl = await meta.ReadLocalFileAsync(path + Path.AltDirectorySeparatorChar + meta.WSDLFolder + Path.AltDirectorySeparatorChar + wsdlfile); + string path = options.AppPath ? ""; + string wsdl = await meta.ReadLocalFileAsync(Path.Combine(path, meta.WSDLFolder, wsdlfile); string modifiedWsdl = meta.ModifyWSDLAddRightSchemaPath(wsdl); if (showDocumentation) From 1fd22272e9167d6f6506b343772617615e59b29f Mon Sep 17 00:00:00 2001 From: vincent1405 Date: Mon, 20 Jan 2025 10:04:34 +0100 Subject: [PATCH 2/2] Update SoapEndpointMiddleware.cs Fix missing ) --- src/SoapCore/SoapEndpointMiddleware.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SoapCore/SoapEndpointMiddleware.cs b/src/SoapCore/SoapEndpointMiddleware.cs index 47dd194d..f77df3a3 100644 --- a/src/SoapCore/SoapEndpointMiddleware.cs +++ b/src/SoapCore/SoapEndpointMiddleware.cs @@ -1131,7 +1131,7 @@ private async Task ProcessMetaFromFile(HttpContext httpContext, bool showDocumen string wsdlfile = mapping.WsdlFile; string path = options.AppPath ? ""; - string wsdl = await meta.ReadLocalFileAsync(Path.Combine(path, meta.WSDLFolder, wsdlfile); + string wsdl = await meta.ReadLocalFileAsync(Path.Combine(path, meta.WSDLFolder, wsdlfile)); string modifiedWsdl = meta.ModifyWSDLAddRightSchemaPath(wsdl); if (showDocumentation)