An ASP.NET MVC 5 Web Application Template Used to Create RESTful Endpoint for Pure SOAP Web Services
Details
RESTful services become the most trendy methodology to create web services because of its ease, scalability and portability because it is consumed through HTTP verbose which makes it portable with any platform.
WCF services support creating both SOAP and RESTful endpoints for the same service, unfortunately, class ASMX SOAP services does not support creating multiple endpoints and some old project still contain ASMX services and developers are obliged to deal with them.
I have created this ASP.NET MVC 5 web-based project template to enable developers to create a remote RESTful or RPC through HTTP endpoint for these easily which can be consumed easily through HTTP verbose.
Usage Guide
Installing Project Template Extension
You can install the project template extension using 2 ways:
Installing VSIX file
Click on Download button on top of this page to download the VSIX file.
Install the downloaded file (Double click it then click Install).
Restart Microsoft Visual Studio.
Create a project from ASP.NET SOAP To RESTful Convertertemplate (You can find it on the left menu under Visual C# -> Web).
Creating project through online templates
Start Microsoft Visual Studio.
Select File -> New -> Project.
Select online from the left menu.
Search for ASP.NET SOAP To RESTful Converter.
Choose project name and click OK.
Click on Install.
Adding SOAP Service Web Reference
On Solution Explorer -> Right click on References and select Add Service Reference.
The Add Service Reference window will appear click on Advanced.
Service Reference Settings window will appear, click on Add Web Reference.
Add Web Reference window will appear, insert your SOAP service URL inside URL text box, click on Go, insert desired namespace (Any Namespace) and then click on Add Reference.
>
The service reference will be added to References in Soulution Explorer.
In Solution Explorer, right click on Controllers folder and then select Add -> Controller, select Web API 2 Controller - Empty and click on Add and give it a desired name (I.E. TestController).
Inside your Web API Controller (TestController), add a new method which will return the data according to your business [My test service has a method named GetData which returnes IEnumerable<Student> model] it will look like the following according to my SOAP service busines.
*Note: I have used RPC (Remote Procedure Call) other than RESTful because it suites better for SOAP services, but you can use RESTful by using Web API Controller with read/write actions and override the auto generated methods for GET, POST, PUT and DELETE according your business.
Now test your Web API and the data is returned successfully.