+ 1
How does a Web service work and know how to process all the requests accordingly?
So I was working with a software recently and it has a Web service that you install In a windows server in the IIS. What I was hoping to have help with understanding is knowing how that service process is all of the request better sent to it so that they can handle H1 accordingly. So for example, I have a request that I send back to the service to create an account. How does it know that I am wanting to create an account and not just retrieve the information on an account? Thanks.
3 ответов
+ 2
Alright. that makes sense. I am just completely new to the web services realm and was doing some research for a project idea that I would like to do.
Do you have any good suggestions on some reading material to read on this subject? I am familiar with C#, so I think I could do the coding. I would just need to understand and know how to handle the all of the programming of the service.
As a side note, I will be having the web service connect to Microsoft SQL, so I am sure that that can be coded in easily.
Thanks for all of the help. :)
+ 1
Well typically you specify what you want to do in the url.
myservice.com/account/create
myservice.com/account/details?user=frank
myservice.com/account/delete
The service just checks for what the url looks like. The microsoft C# mvc framework that powers most IIS projects can even do that automatically for you - typically you will create a class "Account" and a method "Create" and myservice.com/account/create will be mapped to that method by the framework.
+ 1
Go download the Visual Studio Community edition, it's free! And it can create all the scaffolding for a C# MVC project. As far as reading material goes I can't really help I think, but the Microsoft developer network (MSDN) does have some introductory articles which are ok, they'll show right up on google.
Be prepared though, the Microsoft MVC framework is meant for larger projects, so it'll take some configuring and lots of getting used to and reading. If you just want to write a small service in some 50-100 lines of code you could also spin up a node.js server and write some javascript instead.