web-services asp.net web-services

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

Web Service is an application that is designed to interact directly with other applications over the internet. In simple sense, Web Services are means for interacting with objects over the Internet. The Web serivce consumers are able to invoke method calls on remote objects by using SOAP and HTTP over the Web. WebService is language independent and Web Services communicate by using standard web protocols and data formats, such as - HTTP - XML - SOAP

Syntax

  1. SOAP/WSDL

    [Syntax: http://1111:22/HelloWorld]

    [Response: WDSL]

Parameters

ParametersDescriptions
PathParamBinds the parameter passed to method to a value in path.
QueryParamBinds the parameter passed to method to a query parameter in path.
MatrixParamBinds the parameter passed to method to a HTTP matrix parameter in path.
HeaderParamBinds the parameter passed to method to a HTTP header.
CookieParamBinds the parameter passed to method to a Cookie.
FormParamBinds the parameter passed to method to a form value.
DefaultValueAssigns a default value to a parameter passed to method.
ContextContext of the resource for example HTTPRequest as a context.

Remarks

Now run the application that look like as follows.

enter image description here

Now in the above we see our method that we are created in the webservice.cs file, so click on that method and provide input values and click on the "invoke" link as in.

enter image description here

The output will be as follows enter image description here



Got any web-services Question?