Client application and invoke WCF service:
Create new project --> Empty web application --> Add service reference (by using url or address provided in config file of WCF service)
Create new project --> Empty web application --> Add service reference (by using url or address provided in config file of WCF service)
After adding service
reference it automatically generates proxy class and also create many
configuration inside web.config file.
Now invoke the method as
below and get result:
Note: If in config file mote than one endpoint is configured then While
creating the instance of proxy class we need to pass the name of the end point
we want to invoke.
The name of the endpoint can be found from web.config file.
(Because all configurations automatically configured as per the WSDL document
at the time of proxy class creation i.e while add service reference)
No comments:
Post a Comment