Click here to Skip to main content
15,390,197 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All, 

I did a lot of research before posting this question, so just as a clarification point of view can you please review the following and let me know if i am heading correct. 

I actually created a WCF project and define few methods inside which are doing something and then made a client then add service reference to that client project and happily consuming the data by calling the methods i defined in the WCF project above, all good till here can you please let me know what shall i call this whether WCF or SOAP API. 

 The reason is someone asked me to create SOAP API for my application so can i say that the one i made above which is working perfectly fine is actually SOAP API as they told me that SOAP API is something which communicates in XML with secured envelope and other fixed format stuff so how i can make this kind of API do i need to completely change my logic if so then what is the above explained API is ? and what is the WebAPI terminology means?

Lastly again another application vendors asked to have the REST API for my application as well, i think i can define some REST functionality in my WCF project and ask to consume by not adding service reference and method calling but through REST API functions of PUT, GET in URL is that correct or do i need to create a separate ASP project for REST.

Thanks a lot for your time. 

What I have tried:

Searched a huge time on internet
Updated 10-May-20 10:14am

Google "WCF soap" and "WCF rest" to see how to implement those types of services. You'll be able to have them all in the same project. Rather than the "work" being done in your WCF interface methods, you should put the actual code into classes, that way you can make your REST and SOAP interfaces call the same code.
Mohammad Azeem 10-May-20 16:42pm
Thanks for the quick response, i have attached two screenshots in the succeding link for the webservice i created can you please tell me whether this is WCF or SOAP or simple web service please..
F-ES Sitecore 10-May-20 16:50pm
Yes, I think that will operate as a SOAP service. You should be able to use the test client to verify
Mohammad Azeem 10-May-20 17:00pm
Thanks again for quick reply, i also made a client see the screenshot in succeeding link where i added a service reference and consuming the method highlighted in red color in screenshot..

But again the question is whether this is pure SOAP or WCF API.

As i reckon SOAP requires the interface to exchange the data using XML format only that is in fixed format like below:
<soapenv:envelope xmlns:soapenv="" xmlns:pag="">

Also they mention [WebMethod] instead of [OperationContract] as i done in screenshot number 1 in my previous reply so i have done something but dont know what to name it?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900