Reputation: 13
I have just little background in web and I need to do this task by myself so I will be most grateful for your help this is what my boss told me to do (as far as I understand) - I have to write a web service server which gets some parameters, check their validity and then insert/update them in a database. All the parameters are delivered together as a packet written in SOAP - WSDL file. I have to do it using vb.NET in Visual Studio 2010. I read a bit about it and if I understand correctly .NET takes care already of the SOAP an WSDL issue, it is transparent to me, isn't it? or should I install or implement anything concerning that? I saw some examples in the net that all you have to do is to implement web_method in the asmx file, is it so? if yes, which parameters will my method get - the whole bunch of 20 parametres supposed to be in the packet? anything I need to declare or to update in order to connect to the DB? Any help will be appreciated - uf the answer is too long I will be happy just to get a pointer to some relevant material I can read and learn. Thanks a lot
Upvotes: 0
Views: 5926
Reputation: 12355
Try reading this MSDN article: it describes how to write a simple Web service by using Visual Basic .NET
Here are the main steps from the linked MSDN article:
- Start Visual Studio .NET or Visual Studio.
- Create a new Active Server Pages (ASP) .NET Web service project. Name the Web service MathService and point the location to an appropriate Web server that is running ASP.NET if necessary.
- Change the name of the Solution file to MathService for consistency.
- Change the name of the default Web service that is created from Service1.asmx to MathService.asmx.
Click Click here to switch to code view in the designer environment to switch to code view.
Change the name of the class from Public Class Service1 to Public Class MathService.
Define methods that encapsulate the functionality of your service. Each method that will be exposed from the service must be flagged with a WebMethod attribute in front of it. Without this attribute, the method will not be exposed from the service.
Click Build on the Build menu to build the Web service.
- Browse to the MathService.asmx Web service page to test the Web service. If you set the local computer to host the page, the URL is http://localhost/MathService/MathService.asmx.
Upvotes: 2