SlideShare a Scribd company logo
WS-Discovery in WCF 4.0 By SanketKulkarni
Problem Statement Client of the service needs to know only End Point to consume the service. What if binding need to change at the service side from basic to WS over HTTP? This is very basic change but to accommodate this client has to update the service again. And this is very much error prone. It is very tedious task to update client about all the basic frequent change at the service side.
Solution-End Point Discovery or Dynamic Service. This is a multicast protocol that issues SOAP message over UDP. This protocol helps for discovering the location endpoints of the service at runtime. The client application uses this protocol to probe the service endpoints and then using this endpoint address, the communication is established with the WCF service.
WS-Discovery conceptual model
WS –Discovery standard or protocol It is a Standard that defines a lightweight discovery mechanism for discovering services based on multicast messages.  It enables a service to send a Hello announcement message when it is initialized and a Bye message when is removed from the network. Client can discover services by multicasting a Probe message to which a service can reply with a ProbeMatch message containing the information necessary to contact the service. Client can find services that have changed endpoint by issuing a Resolve message to which respond with a ResolveMatchmessage.
WCF Service Discovery API This API helps to dynamically publish and discover of web service using WS –Discovery protocol. Modes : There are two modes Managed Mode Ad-Hoc Mode
Managed Mode In managed mode there is a centralized server called a discovery proxy  that services use to publish themselves and clients use to retrieve information about available services.  When a new service starts up it sends an announcement message to the discovery proxy. When a clientmust search for a service it sends a Probe request to the discovery proxy and it determines whether any of the services that have been published match the request. If there are matches the discovery proxy sends a ProbeMatchresponse back to the client. The client can then contact the service directly using the service information returned from the proxy.
Ad-Hoc Mode There is no centralized server. Service announcements and client requests are sent in a multicast fashion.  Service on start up sends out Hello messages over multicast address using the UDP protocol.  Clients have to actively listen for these announcements and process them accordingly. When a client issues a Probe request for a service it is also sent over the network using a multicast protocol. Each service that receives the request determines whether it matches the criteria in the Probe request and responds directly to the client with a ProbeMatch message if the service matches the criteria specified in the Probe request.
Demo Application Step 1 : Create WCF service
Demo Application Step 2 : Writing Host for the Service. add a new console application Add a reference to ‘System.ServiceModel’ and ‘System.ServiceModel.DIscovery’ in this project. In the project add a new ‘App.Config’ file.
Demo Application ‘<serviceDiscovery>’, enables service discovery behavior. This also defines standard ‘udp’ discovery endpoints. The above ‘UDPEndpoint’ configuration makes the service discoverable over a local subnet.
Demo Application Create client application Add a service reference to the WCF service project Add Web.Config file in the project
Demo Application
Demo Application   DiscoveryClient: Allows client application to use available services. This uses udp discovery endpoint name to discover endpoint of the service.   FindCriteria: Represent criteria used for searching services. The criteria can be the service contract made available in the proxy.  FindResponse: This contains response from the find service.
Thank You Reference http://msdn.microsoft.com/en-us/library/ee354381.aspx

More Related Content

Viewers also liked

Animales en peligro de extincion
Animales en peligro de extincionAnimales en peligro de extincion
Animales en peligro de extincion
Raimundo Tejedor Moran
 
Vactors
VactorsVactors
Vactors
Microbiology
 
FIRST SOLAR
FIRST SOLARFIRST SOLAR
FIRST SOLAR
Mohamed Sahar
 
Hack Science || Ali Afshar || Disrupting the Lab
Hack Science || Ali Afshar || Disrupting the LabHack Science || Ali Afshar || Disrupting the Lab
Hack Science || Ali Afshar || Disrupting the Lab
Science: Disrupt
 
França Normas 9000
França  Normas 9000França  Normas 9000
França Normas 9000
Pedro Victor de Almeida Lopes
 
Investing in Space || James Bruegger || Future Space
Investing in Space || James Bruegger || Future SpaceInvesting in Space || James Bruegger || Future Space
Investing in Space || James Bruegger || Future Space
Science: Disrupt
 
OpenTrials || Ben Meghreblian || Future Health
OpenTrials || Ben Meghreblian || Future HealthOpenTrials || Ben Meghreblian || Future Health
OpenTrials || Ben Meghreblian || Future Health
Science: Disrupt
 
First Solar case study
First Solar case studyFirst Solar case study
First Solar case study
amanbhattarai
 
Python if loop-function
Python if loop-functionPython if loop-function
Python if loop-function
건희 김
 
MachinePulse company presentation
MachinePulse company presentationMachinePulse company presentation
MachinePulse company presentation
MachinePulse
 
Phân tích và làm rõ những bước phát triển trong đường lối cnh, hđh của đẳng t...
Phân tích và làm rõ những bước phát triển trong đường lối cnh, hđh của đẳng t...Phân tích và làm rõ những bước phát triển trong đường lối cnh, hđh của đẳng t...
Phân tích và làm rõ những bước phát triển trong đường lối cnh, hđh của đẳng t...
https://www.facebook.com/garmentspace
 
20170120 東吳大學報告企業資產擔保法草案
20170120 東吳大學報告企業資產擔保法草案20170120 東吳大學報告企業資產擔保法草案
20170120 東吳大學報告企業資產擔保法草案
R.O.C.Executive Yuan
 
Introduction to angular js for .net developers
Introduction to angular js  for .net developersIntroduction to angular js  for .net developers
Introduction to angular js for .net developers
Mohd Manzoor Ahmed
 
Kertas kerja family day
Kertas kerja family dayKertas kerja family day
Kertas kerja family dayazizishaari
 
python and database
python and databasepython and database
python and database
Kwangyoun Jung
 
20170120金管會簡報
20170120金管會簡報20170120金管會簡報
20170120金管會簡報
R.O.C.Executive Yuan
 
11 British period in india
11 British period in india11 British period in india
11 British period in india
EACT_COEP
 

Viewers also liked (17)

Animales en peligro de extincion
Animales en peligro de extincionAnimales en peligro de extincion
Animales en peligro de extincion
 
Vactors
VactorsVactors
Vactors
 
FIRST SOLAR
FIRST SOLARFIRST SOLAR
FIRST SOLAR
 
Hack Science || Ali Afshar || Disrupting the Lab
Hack Science || Ali Afshar || Disrupting the LabHack Science || Ali Afshar || Disrupting the Lab
Hack Science || Ali Afshar || Disrupting the Lab
 
França Normas 9000
França  Normas 9000França  Normas 9000
França Normas 9000
 
Investing in Space || James Bruegger || Future Space
Investing in Space || James Bruegger || Future SpaceInvesting in Space || James Bruegger || Future Space
Investing in Space || James Bruegger || Future Space
 
OpenTrials || Ben Meghreblian || Future Health
OpenTrials || Ben Meghreblian || Future HealthOpenTrials || Ben Meghreblian || Future Health
OpenTrials || Ben Meghreblian || Future Health
 
First Solar case study
First Solar case studyFirst Solar case study
First Solar case study
 
Python if loop-function
Python if loop-functionPython if loop-function
Python if loop-function
 
MachinePulse company presentation
MachinePulse company presentationMachinePulse company presentation
MachinePulse company presentation
 
Phân tích và làm rõ những bước phát triển trong đường lối cnh, hđh của đẳng t...
Phân tích và làm rõ những bước phát triển trong đường lối cnh, hđh của đẳng t...Phân tích và làm rõ những bước phát triển trong đường lối cnh, hđh của đẳng t...
Phân tích và làm rõ những bước phát triển trong đường lối cnh, hđh của đẳng t...
 
20170120 東吳大學報告企業資產擔保法草案
20170120 東吳大學報告企業資產擔保法草案20170120 東吳大學報告企業資產擔保法草案
20170120 東吳大學報告企業資產擔保法草案
 
Introduction to angular js for .net developers
Introduction to angular js  for .net developersIntroduction to angular js  for .net developers
Introduction to angular js for .net developers
 
Kertas kerja family day
Kertas kerja family dayKertas kerja family day
Kertas kerja family day
 
python and database
python and databasepython and database
python and database
 
20170120金管會簡報
20170120金管會簡報20170120金管會簡報
20170120金管會簡報
 
11 British period in india
11 British period in india11 British period in india
11 British period in india
 

Similar to Ws discovery in wcf 4

MSB-Remote procedure call
MSB-Remote procedure callMSB-Remote procedure call
MSB-Remote procedure call
MOHD. SHAHRUKH BHATI
 
Real time app with SignalR
Real time app with SignalR Real time app with SignalR
Real time app with SignalR
Mojammel Haque
 
Web service
Web serviceWeb service
Web service
nagarajupatangay
 
WCF (Windows Communication Foundation)
WCF (Windows Communication Foundation)WCF (Windows Communication Foundation)
WCF (Windows Communication Foundation)
ipower softwares
 
Dot Net Training Wcf Dot Net35
Dot Net Training Wcf Dot Net35Dot Net Training Wcf Dot Net35
Dot Net Training Wcf Dot Net35
Subodh Pushpak
 
Introduction to WAP
Introduction to WAPIntroduction to WAP
Introduction to WAP
Nitin Saswade
 
web services-May 25.ppt
web services-May 25.pptweb services-May 25.ppt
web services-May 25.ppt
ShivaangiKrish
 
SOA web services concepts
SOA web services conceptsSOA web services concepts
SOA web services concepts
XAVIERCONSULTANTS
 
Web Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NETWeb Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NET
Ponraj
 
Spring cloud Service-Discovery
Spring cloud Service-DiscoverySpring cloud Service-Discovery
Spring cloud Service-Discovery
Nikhil Hiremath
 
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUIAdvancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio
 
Real Time App with SignalR
Real Time App with SignalRReal Time App with SignalR
Real Time App with SignalR
Mojammel Haque
 
Wcf faq
Wcf faqWcf faq
Wcf faq
Rajoo Jha
 
Service workers and their role in PWAs
Service workers and their role in PWAsService workers and their role in PWAs
Service workers and their role in PWAs
Ipsha Bhidonia
 
Introduction to soapui and webservices
Introduction to soapui  and webservicesIntroduction to soapui  and webservices
Introduction to soapui and webservices
Anil Yadav
 
Multi-Cloud Micro-Services with CloudFoundry
Multi-Cloud Micro-Services with CloudFoundryMulti-Cloud Micro-Services with CloudFoundry
Multi-Cloud Micro-Services with CloudFoundry
geekclub888
 
Java Networking
Java NetworkingJava Networking
Java Networking
68SachinYadavSYCS
 
awsappmesh.pdf
awsappmesh.pdfawsappmesh.pdf
awsappmesh.pdf
Learn2Skills |
 
Inter process communication
Inter process communicationInter process communication
Inter process communication
Tamer Rezk
 
Whitepaper : Event Driven Micro Services
Whitepaper : Event Driven Micro ServicesWhitepaper : Event Driven Micro Services
Whitepaper : Event Driven Micro Services
Newt Global Consulting LLC
 

Similar to Ws discovery in wcf 4 (20)

MSB-Remote procedure call
MSB-Remote procedure callMSB-Remote procedure call
MSB-Remote procedure call
 
Real time app with SignalR
Real time app with SignalR Real time app with SignalR
Real time app with SignalR
 
Web service
Web serviceWeb service
Web service
 
WCF (Windows Communication Foundation)
WCF (Windows Communication Foundation)WCF (Windows Communication Foundation)
WCF (Windows Communication Foundation)
 
Dot Net Training Wcf Dot Net35
Dot Net Training Wcf Dot Net35Dot Net Training Wcf Dot Net35
Dot Net Training Wcf Dot Net35
 
Introduction to WAP
Introduction to WAPIntroduction to WAP
Introduction to WAP
 
web services-May 25.ppt
web services-May 25.pptweb services-May 25.ppt
web services-May 25.ppt
 
SOA web services concepts
SOA web services conceptsSOA web services concepts
SOA web services concepts
 
Web Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NETWeb Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NET
 
Spring cloud Service-Discovery
Spring cloud Service-DiscoverySpring cloud Service-Discovery
Spring cloud Service-Discovery
 
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUIAdvancio, Inc. Academy: Web Sevices, WCF & SOAPUI
Advancio, Inc. Academy: Web Sevices, WCF & SOAPUI
 
Real Time App with SignalR
Real Time App with SignalRReal Time App with SignalR
Real Time App with SignalR
 
Wcf faq
Wcf faqWcf faq
Wcf faq
 
Service workers and their role in PWAs
Service workers and their role in PWAsService workers and their role in PWAs
Service workers and their role in PWAs
 
Introduction to soapui and webservices
Introduction to soapui  and webservicesIntroduction to soapui  and webservices
Introduction to soapui and webservices
 
Multi-Cloud Micro-Services with CloudFoundry
Multi-Cloud Micro-Services with CloudFoundryMulti-Cloud Micro-Services with CloudFoundry
Multi-Cloud Micro-Services with CloudFoundry
 
Java Networking
Java NetworkingJava Networking
Java Networking
 
awsappmesh.pdf
awsappmesh.pdfawsappmesh.pdf
awsappmesh.pdf
 
Inter process communication
Inter process communicationInter process communication
Inter process communication
 
Whitepaper : Event Driven Micro Services
Whitepaper : Event Driven Micro ServicesWhitepaper : Event Driven Micro Services
Whitepaper : Event Driven Micro Services
 

Recently uploaded

Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 

Recently uploaded (20)

Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 

Ws discovery in wcf 4

  • 1. WS-Discovery in WCF 4.0 By SanketKulkarni
  • 2. Problem Statement Client of the service needs to know only End Point to consume the service. What if binding need to change at the service side from basic to WS over HTTP? This is very basic change but to accommodate this client has to update the service again. And this is very much error prone. It is very tedious task to update client about all the basic frequent change at the service side.
  • 3. Solution-End Point Discovery or Dynamic Service. This is a multicast protocol that issues SOAP message over UDP. This protocol helps for discovering the location endpoints of the service at runtime. The client application uses this protocol to probe the service endpoints and then using this endpoint address, the communication is established with the WCF service.
  • 5. WS –Discovery standard or protocol It is a Standard that defines a lightweight discovery mechanism for discovering services based on multicast messages. It enables a service to send a Hello announcement message when it is initialized and a Bye message when is removed from the network. Client can discover services by multicasting a Probe message to which a service can reply with a ProbeMatch message containing the information necessary to contact the service. Client can find services that have changed endpoint by issuing a Resolve message to which respond with a ResolveMatchmessage.
  • 6. WCF Service Discovery API This API helps to dynamically publish and discover of web service using WS –Discovery protocol. Modes : There are two modes Managed Mode Ad-Hoc Mode
  • 7. Managed Mode In managed mode there is a centralized server called a discovery proxy that services use to publish themselves and clients use to retrieve information about available services. When a new service starts up it sends an announcement message to the discovery proxy. When a clientmust search for a service it sends a Probe request to the discovery proxy and it determines whether any of the services that have been published match the request. If there are matches the discovery proxy sends a ProbeMatchresponse back to the client. The client can then contact the service directly using the service information returned from the proxy.
  • 8. Ad-Hoc Mode There is no centralized server. Service announcements and client requests are sent in a multicast fashion. Service on start up sends out Hello messages over multicast address using the UDP protocol. Clients have to actively listen for these announcements and process them accordingly. When a client issues a Probe request for a service it is also sent over the network using a multicast protocol. Each service that receives the request determines whether it matches the criteria in the Probe request and responds directly to the client with a ProbeMatch message if the service matches the criteria specified in the Probe request.
  • 9. Demo Application Step 1 : Create WCF service
  • 10. Demo Application Step 2 : Writing Host for the Service. add a new console application Add a reference to ‘System.ServiceModel’ and ‘System.ServiceModel.DIscovery’ in this project. In the project add a new ‘App.Config’ file.
  • 11. Demo Application ‘<serviceDiscovery>’, enables service discovery behavior. This also defines standard ‘udp’ discovery endpoints. The above ‘UDPEndpoint’ configuration makes the service discoverable over a local subnet.
  • 12. Demo Application Create client application Add a service reference to the WCF service project Add Web.Config file in the project
  • 14. Demo Application   DiscoveryClient: Allows client application to use available services. This uses udp discovery endpoint name to discover endpoint of the service.   FindCriteria: Represent criteria used for searching services. The criteria can be the service contract made available in the proxy.  FindResponse: This contains response from the find service.
  • 15. Thank You Reference http://msdn.microsoft.com/en-us/library/ee354381.aspx