DigDes/SoapCore

Upgrade the supported frameworks to .NET 8.0

Closed this issue · 5 comments

Hi Team,

I have been searching for way to use the SoapCore package with .Net 8.0 and I haven't found any articles useful.
Nothing here as well?

Do we have a plan for it or any workaround?

Thank you,
Daniel

Hi Team,

I think that I have found was I was needing.

Thank you! Keep up the good work!

@PoDaC please share what you have found!

Hi Team,

I think that I have found was I was needing.

Thank you! Keep up the good work!

What did you find? I am in the same situation, and please respect some netiquette :)

@LuciferSam86, @jamespfluger-ava
Hello, I was trying to update our solution to .NET8 and I had a failure calling "UseSoapEndpoint" and I was thinking that I would need this package "SoapCore" supporting .Net8 and I was wrong I had to change and to call it from app builder not under endpoints:
Removed:
app.UseEndpoints(endpoints => { endpoints.MapSubscribeHandler(); - endpoints.UseSoapEndpoint<ILRRequest>("/LRRequest.asmx", new BasicHttpBinding()); });
Added:
app.UseSoapEndpoint<ILRRequest>( "/LRRequest.asmx", new SoapEncoderOptions() );
Not sure if still works, I couldn't test it yet, but builds, so I moved on.

There are too many overloads, unfortunately so some of them collide. I'm hoping that some of them can be removed in future releases. I prefer the ones that has a single Action parameter.

You can use SoapCore on endpoints just fine. This is how it looks in my own legacy service

app.UseEndpoints(endpoints =>
{
	endpoints.UseSoapEndpoint<IMyService>(opt => 
	{
		opt.Path = "MyService.asmx";
		opt.SoapSerializer = SoapSerializer.XmlSerializer;
		//etc..
	
	});
});

or you can call UseEndpoint on IApplicationBuilder directly

app.UseSoapEndpoint<IRentalApiService>(opt => {
		opt.Path = "MyService.asmx";
		opt.SoapSerializer = SoapSerializer.XmlSerializer;
		//etc..
	
	});

Either of them should work, but I'm personally using the first one