Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SOAP in .NET Core?

How you do SOAP in .NET Core? Are there any equivalents of Apache CXF in .Net Core (not just a simple SOAP client but full featured stack)?

Sorry if this is a very basic question, my search so far doesn't yield any clear answer.

like image 355
Yudhistira Arya Avatar asked Feb 28 '16 12:02

Yudhistira Arya


People also ask

Does .NET Core support SOAP?

NET Core platform. It provides a compatible implementation of SOAP, NetTCP, and WSDL. Usage in code is similar to WCF, but updated to use ASP.NET Core as the service host, and to work with .

What is core SOAP?

NET Core. SOAP (Simple Object Access Protocol) is a messaging protocol specification for exchanging structured information in the implementation of web services, by using the XML Information Set as its message format (source: https://en.wikipedia.org/wiki/SOAP).

What is SOAP service in C#?

SOAP (Simple Access Object Protocol) is an XML based protocol and provides facility for applications written on different languages and running on different platforms to interact with each other. It works over HTTP. SOAP is a lightweight protocol as it is based on XML which is a lightweight language.


3 Answers

Microsoft currently does not plan to ship a SOAP server side framework for .NET Core. Neither the WCF ServiceHost nor ASMX are available. Too early to tell, which of the non-Microsoft stacks will jump in and be the dominant player.

With the introduction of ASP.NET Web API and the uprising of REST endpoints, WCF was dead. The WCF client is a interop story, not a forward going story (full story here: http://blog.tonysneed.com/2016/01/06/wcf-is-dead-long-live-mvc-6/)

like image 88
Thomas Avatar answered Nov 02 '22 03:11

Thomas


In VS 2017, as of December '17 (v15.5) you can now add a generated WCF client to a service using WSDL from a .NET Standard project using Connected Services. In the Solution Explorer, you can get there from a right-click on "Dependencies" or right-click on the project under "Add..."

like image 22
Marc L. Avatar answered Nov 02 '22 04:11

Marc L.


Some months ago, due to a limitation WCF clients have (when integrating with a Java Web Service, someone created a response class with the same name as the method and in the same namespace and when the WCF client was sending a request it failed the serialization - can't find the related question in SO) I had to create a SOAP HTTP client that used underline the HttpClient. I eventually released an open source version (https://github.com/gravity00/SimpleSOAPClient) that we are successfully using in production and supports .NET Core and Xamarin applications. Feel free to give it a try. I recommend version 2.0.0-RC03 due to some major improvements since version 1.x.

like image 44
João Simões Avatar answered Nov 02 '22 05:11

João Simões