DigDes / SoapCore

SOAP extension for ASP.NET Core
MIT License
977 stars 369 forks source link

cannot change soap address #1074

Open lucamorelli opened 2 days ago

lucamorelli commented 2 days ago

Hi, I'm deploying my application in a kubernet pod and I'm facing a problem, because the service works locally but not deplyed. I checked the generated wsdl and I found this

image

the address here is incorrect, because there is some url rewriting, and we think the problem we have is the client fails to get metadata for this reason. looking to the sources of the middleware I find this

image

so looks like it can't be changed, am I wrong? I see there is a https://learn.microsoft.com/en-us/dotnet/api/system.web.services.description.soapaddressbinding?view=netframework-4.8.1 but has not been implemented

andersjonsson commented 2 days ago

Looks like it, yes. https://github.com/DigDes/SoapCore/blob/c8b2be0411739fa7e26f9df8514ddf79aa4247c5/src/SoapCore/SoapEndpointMiddleware.cs#L258-L265

If you feel like submitting a PR it should be fairly easy to add a baseUrlOverride property to the options-class, so you can override the default behavior

lucamorelli commented 2 days ago

I was checking and I noticed that looks like there is always something similar in https://github.com/DigDes/SoapCore/blob/develop/src/SoapCore/WSDLFileOptions.cs but it's used while processing the request. I wonder if we can use directly this value