How to POST a SOAP message on web api (asp.net core ->web api)

Sudama Tripathi

I want to post a SOAP XML based message to Web API which i have created in ASP.NET core project template.

Right now i am getting unsupported media type error when i post with with content-type as application/soap+xml.

I know that we should be sending SOAP message to WCF based service but our requirement is like this only. I should be able to consume SOPA message in web API.

Thanks, Sudama

Benjamin Soulier

Here is a two-part answer:

Exposing SOAP services with ASP.NET Core:

  • Microsoft is not looking into porting SOAP-capable services in ASP.NET Core, not in a near future (look at this other SO answer which states the same).

  • That being said, nothing is preventing you from using the plain .NET Framework, which supports SOAP either using old ASMX or WCF which are part of .NET Framework 4.5.x at least (with support ending in 2023).

  • Lastly, SOAP seems just a technical requirement for you, so you can build a thin SOAP layer just transfering calls to your main ASP.NET Core service.

The only limitation would be to support deploying this on Linux, on which the full .NET Framework does not natively run on; if not, you're good to go.

Consuming SOAP services win ASP.NET Core:

ASP.NET Core supports consuming SOAP Services in ASP.NET Core through the use of WCF Connected services.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

TOP Ranking

HotTag

Archive