SlideShare a Scribd company logo
1 of 54
WCF ROUTING


Krunal Trivedi
Corporate Trainer For DotNet,Silverlight,SPS 2010
MCT S For .NET Web Technology
MCTS For SharePoint Server 2010 Development
Co-Founder at Aavid Technologies
Email:krunaltrivedi@live.in
Contact : 09998472789
Client Details
• The Routing Service is a generic SOAP intermediary that acts
  as a message router.



• This router / or the SOAP intermediary act as a client to the
  real Service and it works as a Service to the real client



• System.ServiceModel.Routing namespace.
• One of the challenges in Intermediary scenarios is that the
  internal endpoints may have different transport or SOAP
  version requirements than the endpoint that messages are
  received on.
• To support this scenario , the Routing Service can bridge
  protocols.
Filtering
• The WCF filtering system can use declarative filters to match
  messages and make operational decisions.
• You can use filters to determine what to do with a message
  by examining part of the message.
• A queuing process can use Xpath 1.0 query to check the
  priority element of a known header to determine whether to
  move a message to the front of the queue.
• The filtering system is composed of a set of classes that can
  efficiently determine which of a set of filters are true for a
  particular WCF messages.
• The filtering system is a core component of WCF messaging; it
  is designed to be extremely fast.
• Each filter implementation has been optimized for a
  particular kind of matching against WCF messages.
• Filtering is performed after a message is received and is part
  of dispatching message to the proper application component.
Filters
• The filter engine has two primary components
     filters
     Filters tables
• A filter makes Boolean decisions about a message based on user-
  specified logical condition.
• Filters implement the MessageFilter class.
• The Match methods are used to determine if a message satisfies a
  filter.
• One of the methods tests the message’s header but cannot inspect
  the message body.
• The other method takes a message buffer as an input parameter
  and can inspect the message body.
• The several kinds of filters each specialize in matching on a
  particular kind of Boolean condition. Once you construct a filter,
  you cannot change the criteria that a filter uses; to modify a filter's
  criteria, construct a new one and delete the existing filter.
Filter Tables
• Filter tables are used to store key-value pairs, where a filter is
  the key and some associated data is the value.
• The filter data can be used to indicate what actions to take if
  a message matches the filter and the type of the filter data is
  the generic parameter for the filter table class.
• The filter data can consist of routing rules, session security
  state, listeners on a channel, and so on.
• The data can be used where data flow control is necessary.
• Filter tables implement the generic
  interface IMessageFilterTable.
• Filter tables have several methods that match a message
  against all the filters in the table and return an unordered
  collection of matching filters or data.
• Some of the match methods are multiple-match and return
  all matching items. Others are single-match, returning only
  one item, and throw a MultipleFilterMatchesException if
  more than one filter matches.
• Action Filters:
• The ActionMessageFilter contains a list of action strings.
• If any of the actions in the filter’s list matches the Action
  header in the message or message buffer, the Match method
  returns true.
• If the list is empty, the filter is considered a match-all filter
  and any message or message buffer matches
  and Match returns true.
• If none of the actions in the filter’s list matches the Action
  header in the message or message
  buffer, Match returns false.
• If there is no action in the message and the filter’s list is non-
  empty, then Match returnsfalse.
• XPathMessageFilter (XPath queries against incoming
  messages)
• EndpointAddressMessageFilter and
  PrefixEndpointAddressMessageFilter (match
  against endpoint address)
Protocol Bridging
Stage-1…WCF Configless File
Create a console application “MessageService”
Add an interface…also Add Reference of System.ServiceModel
and import the namespace also
Add the Implementation class and implement interface
ConfigLess Hosting….
Run your server(console application…).copy and paste URI to your
browser….get the following screen..notice that proxy creation is disabled…
Add Reference of System.ServiceModel…Also Import the namespace and copy
and paste interface there…
Create a object of ChannelFactory….using object of interface
create a new channel….
Run your Server First…Run your client…You will get the message on the
Server…..
Change the binding to the WSHttpBinnding on the client…run the server…run the
client…observer the result….RUN TIME ERROR….




Limitation of ConfigLess WCF is..only for BasicHttpBinnding…not for
WSHttpBinding….That means config file is necessary for wsHttpBinding…configless
is not a Permanent solution.
• Stage-2…WCF Routing with Protocol Bridging
• Our objective is change BasicHttpBinding with WSHttpBinding
  on the server[so we have to drop configless setting].
• On server add new app.config file.Try to open it with
  Configuration Editor…but you can’t..so manually write
  configuration.
Add system.servicemodel
Add services tag
Add service tag inside services tag….add the attribute name where
name=MessageService.MessageServiceImpl(Namespace.ClassName)
Add endpoint inside service tag…which specifies address , binding,contract…
contract=MessageService.IProcessMessage(Namespace.Interface)
On the Server..modify main method…
On the Client…Make sure Binding is WSHttp…..
Run The Server…
Run the Client….
Need for Routing
Change address and binding on the server…
Note:We have address http://localhost:9000 and binding WSHttpBinding on the
client….Server side it is changed…so we required Routing…A Protocol Bridging




    Now ,if we run Server as well as Client application we get an error…the
    solution is SOAP Router….
Create a new console application…name it WCFRouter




                                            We want this to
                                            Listen to a certain endpoint
                                            And forward
                                            Over to the listener
Add reference of System.ServiceModel as well as
System.ServiceModel.Routing-----A Required NameSpace for Routing
RoutingService is responsible for routing messages between endpoints based on filter criteria.
ServiceHost provides a host for services….
Add app.config to the RouterProject
IRequestReplyRouter interface is required to process message from
Request-Reply channel

Address and Bindings are the same at the client—so this would be server for
client --Make sure on the server we have change d the address and binding
We are adding a Behavour
Filter tables are used to store key-value pairs, where a filter is the key and some
associated data is the value.
Gets or sets the name of the filter table used by this routing service for routing message




                                                  Behaviour section
Routing Section
Client Zone
Publish-Subscribe Mechanism
Copy-Paste MessageService and Rename it like MessageService2…
Modify app.config…observer address as well as service name
attribute
Open Server 1
Make Changes on the Client
Open WCF Router
Run Server1 , Run Server2, Run Router
        and Run Client Apps…

More Related Content

What's hot

What's hot (20)

Cache control directive
Cache control directiveCache control directive
Cache control directive
 
Introduce anypoint studio
Introduce anypoint studioIntroduce anypoint studio
Introduce anypoint studio
 
Session And Cookies In Servlets - Java
Session And Cookies In Servlets - JavaSession And Cookies In Servlets - Java
Session And Cookies In Servlets - Java
 
Web Hacking series part 2
Web Hacking series part 2Web Hacking series part 2
Web Hacking series part 2
 
2310 b 17
2310 b 172310 b 17
2310 b 17
 
Web Services Testing
Web Services TestingWeb Services Testing
Web Services Testing
 
2310 b 06
2310 b 062310 b 06
2310 b 06
 
Asp
AspAsp
Asp
 
Ajax part i
Ajax part iAjax part i
Ajax part i
 
Introduction to asp
Introduction to aspIntroduction to asp
Introduction to asp
 
Ch3 server controls
Ch3 server controlsCh3 server controls
Ch3 server controls
 
Webservices testing using SoapUI
Webservices testing using SoapUIWebservices testing using SoapUI
Webservices testing using SoapUI
 
Ajax
AjaxAjax
Ajax
 
Web Hacking Series Part 4
Web Hacking Series Part 4Web Hacking Series Part 4
Web Hacking Series Part 4
 
ASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server ControlsASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server Controls
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.Net
 
Controls
ControlsControls
Controls
 
Using ajax in mule
Using ajax in muleUsing ajax in mule
Using ajax in mule
 
Introduction To Asp.Net Ajax
Introduction To Asp.Net AjaxIntroduction To Asp.Net Ajax
Introduction To Asp.Net Ajax
 
Web services testing
Web services testingWeb services testing
Web services testing
 

Viewers also liked

Web Game Introduction
Web Game IntroductionWeb Game Introduction
Web Game IntroductionDied Liu
 
Facebook marknadsföring -webbinarium
Facebook marknadsföring -webbinariumFacebook marknadsföring -webbinarium
Facebook marknadsföring -webbinariumGuava Sweden
 
The of Social Media - Women in Management
The of Social Media - Women in ManagementThe of Social Media - Women in Management
The of Social Media - Women in ManagementThomas Clifford
 
2012 q1 vujade_shifthappened
2012 q1 vujade_shifthappened2012 q1 vujade_shifthappened
2012 q1 vujade_shifthappenedVujàdé
 
Client Side Optimization
Client Side OptimizationClient Side Optimization
Client Side OptimizationPatrick Huesler
 
Report In C M S C 410( Mac O S System Software 2)
Report In  C M S C 410( Mac  O S System Software 2)Report In  C M S C 410( Mac  O S System Software 2)
Report In C M S C 410( Mac O S System Software 2)momoja21
 
Top Flex 7 Unit One- phrasal verbs
Top Flex 7 Unit One- phrasal verbsTop Flex 7 Unit One- phrasal verbs
Top Flex 7 Unit One- phrasal verbsDaniela Lyra Cardoso
 
Pride before the fall – Joshua 7 & 8
Pride before the fall – Joshua 7 & 8Pride before the fall – Joshua 7 & 8
Pride before the fall – Joshua 7 & 8Ehab Roufail
 
7jan N As
7jan N As7jan N As
7jan N Asepaper
 
Bab 7 Perhubungan Luar
Bab 7 Perhubungan LuarBab 7 Perhubungan Luar
Bab 7 Perhubungan Luarzafeen zafeen
 
Apresentação conferência citi (somente em inglês)
Apresentação conferência citi (somente em inglês)Apresentação conferência citi (somente em inglês)
Apresentação conferência citi (somente em inglês)TIM RI
 
Meeting with investors of may 2013
Meeting with investors of may 2013Meeting with investors of may 2013
Meeting with investors of may 2013TIM RI
 
17jun nas
17jun nas17jun nas
17jun nasepaper
 
Edisi 12 Medan
Edisi 12 MedanEdisi 12 Medan
Edisi 12 Medanepaper
 
Edisi 1 Maret Medan
Edisi 1 Maret MedanEdisi 1 Maret Medan
Edisi 1 Maret Medanepaper
 

Viewers also liked (20)

Article
ArticleArticle
Article
 
Web Game Introduction
Web Game IntroductionWeb Game Introduction
Web Game Introduction
 
Facebook marknadsföring -webbinarium
Facebook marknadsföring -webbinariumFacebook marknadsföring -webbinarium
Facebook marknadsföring -webbinarium
 
The of Social Media - Women in Management
The of Social Media - Women in ManagementThe of Social Media - Women in Management
The of Social Media - Women in Management
 
2012 q1 vujade_shifthappened
2012 q1 vujade_shifthappened2012 q1 vujade_shifthappened
2012 q1 vujade_shifthappened
 
Stres
StresStres
Stres
 
Client Side Optimization
Client Side OptimizationClient Side Optimization
Client Side Optimization
 
Report In C M S C 410( Mac O S System Software 2)
Report In  C M S C 410( Mac  O S System Software 2)Report In  C M S C 410( Mac  O S System Software 2)
Report In C M S C 410( Mac O S System Software 2)
 
Local Activity Center (Lac)
Local Activity Center (Lac)Local Activity Center (Lac)
Local Activity Center (Lac)
 
Top Flex 7 Unit One- phrasal verbs
Top Flex 7 Unit One- phrasal verbsTop Flex 7 Unit One- phrasal verbs
Top Flex 7 Unit One- phrasal verbs
 
Pride before the fall – Joshua 7 & 8
Pride before the fall – Joshua 7 & 8Pride before the fall – Joshua 7 & 8
Pride before the fall – Joshua 7 & 8
 
Thermal
ThermalThermal
Thermal
 
7jan N As
7jan N As7jan N As
7jan N As
 
Uniglass lifeguard tower_update
Uniglass lifeguard tower_updateUniglass lifeguard tower_update
Uniglass lifeguard tower_update
 
Bab 7 Perhubungan Luar
Bab 7 Perhubungan LuarBab 7 Perhubungan Luar
Bab 7 Perhubungan Luar
 
Apresentação conferência citi (somente em inglês)
Apresentação conferência citi (somente em inglês)Apresentação conferência citi (somente em inglês)
Apresentação conferência citi (somente em inglês)
 
Meeting with investors of may 2013
Meeting with investors of may 2013Meeting with investors of may 2013
Meeting with investors of may 2013
 
17jun nas
17jun nas17jun nas
17jun nas
 
Edisi 12 Medan
Edisi 12 MedanEdisi 12 Medan
Edisi 12 Medan
 
Edisi 1 Maret Medan
Edisi 1 Maret MedanEdisi 1 Maret Medan
Edisi 1 Maret Medan
 

Similar to WCF Routing and Protocol Bridging

Similar to WCF Routing and Protocol Bridging (20)

Mule esb and_relevant_components
Mule esb and_relevant_componentsMule esb and_relevant_components
Mule esb and_relevant_components
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptx
 
Exchange 2013 Architecture Poster
Exchange 2013 Architecture PosterExchange 2013 Architecture Poster
Exchange 2013 Architecture Poster
 
10135 a 11
10135 a 1110135 a 11
10135 a 11
 
Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)
 
Web services-Notes
Web services-NotesWeb services-Notes
Web services-Notes
 
SOA Design Patterns
SOA Design PatternsSOA Design Patterns
SOA Design Patterns
 
Soa 31 jax ws server side development architecture
Soa 31 jax ws server side development architectureSoa 31 jax ws server side development architecture
Soa 31 jax ws server side development architecture
 
Axis2
Axis2Axis2
Axis2
 
Servlet.ppt
Servlet.pptServlet.ppt
Servlet.ppt
 
Servlet.ppt
Servlet.pptServlet.ppt
Servlet.ppt
 
Servlet1.ppt
Servlet1.pptServlet1.ppt
Servlet1.ppt
 
Mule ESB Interview or Certification questions
Mule ESB Interview or Certification questionsMule ESB Interview or Certification questions
Mule ESB Interview or Certification questions
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 9...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 9... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 9...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 9...
 
M filtering
M filteringM filtering
M filtering
 
Types of MessageRouting in Mule
Types of MessageRouting in MuleTypes of MessageRouting in Mule
Types of MessageRouting in Mule
 
SOA UNIT-IV.pdfSOA UNIT-IV.pdfSOA UNIT-IV.pdf
SOA UNIT-IV.pdfSOA UNIT-IV.pdfSOA UNIT-IV.pdfSOA UNIT-IV.pdfSOA UNIT-IV.pdfSOA UNIT-IV.pdf
SOA UNIT-IV.pdfSOA UNIT-IV.pdfSOA UNIT-IV.pdf
 
Routing in mule
Routing in muleRouting in mule
Routing in mule
 
10135 a 05
10135 a 0510135 a 05
10135 a 05
 
How muleworks
How muleworksHow muleworks
How muleworks
 

More from Krunal Trivedi

Certifications for Azure Developers
Certifications for Azure DevelopersCertifications for Azure Developers
Certifications for Azure DevelopersKrunal Trivedi
 
Azure Functions - Serverless Computing
Azure Functions - Serverless ComputingAzure Functions - Serverless Computing
Azure Functions - Serverless ComputingKrunal Trivedi
 
Azure App Service for Windows Container
Azure App Service for Windows ContainerAzure App Service for Windows Container
Azure App Service for Windows ContainerKrunal Trivedi
 
Chat application with Azure SignalR Service
Chat application with Azure SignalR ServiceChat application with Azure SignalR Service
Chat application with Azure SignalR ServiceKrunal Trivedi
 
Implementing enterprise cloud scenarios with Microsoft cloud services and pla...
Implementing enterprise cloud scenarios with Microsoft cloud services and pla...Implementing enterprise cloud scenarios with Microsoft cloud services and pla...
Implementing enterprise cloud scenarios with Microsoft cloud services and pla...Krunal Trivedi
 
High Availability in Microsoft Azure
High Availability in Microsoft AzureHigh Availability in Microsoft Azure
High Availability in Microsoft AzureKrunal Trivedi
 
Windows azure active directory
Windows azure active directoryWindows azure active directory
Windows azure active directoryKrunal Trivedi
 
Windows Azure Active Directory
Windows Azure Active DirectoryWindows Azure Active Directory
Windows Azure Active DirectoryKrunal Trivedi
 
Mef with meta data and lazy loading
Mef with meta data and lazy loadingMef with meta data and lazy loading
Mef with meta data and lazy loadingKrunal Trivedi
 

More from Krunal Trivedi (9)

Certifications for Azure Developers
Certifications for Azure DevelopersCertifications for Azure Developers
Certifications for Azure Developers
 
Azure Functions - Serverless Computing
Azure Functions - Serverless ComputingAzure Functions - Serverless Computing
Azure Functions - Serverless Computing
 
Azure App Service for Windows Container
Azure App Service for Windows ContainerAzure App Service for Windows Container
Azure App Service for Windows Container
 
Chat application with Azure SignalR Service
Chat application with Azure SignalR ServiceChat application with Azure SignalR Service
Chat application with Azure SignalR Service
 
Implementing enterprise cloud scenarios with Microsoft cloud services and pla...
Implementing enterprise cloud scenarios with Microsoft cloud services and pla...Implementing enterprise cloud scenarios with Microsoft cloud services and pla...
Implementing enterprise cloud scenarios with Microsoft cloud services and pla...
 
High Availability in Microsoft Azure
High Availability in Microsoft AzureHigh Availability in Microsoft Azure
High Availability in Microsoft Azure
 
Windows azure active directory
Windows azure active directoryWindows azure active directory
Windows azure active directory
 
Windows Azure Active Directory
Windows Azure Active DirectoryWindows Azure Active Directory
Windows Azure Active Directory
 
Mef with meta data and lazy loading
Mef with meta data and lazy loadingMef with meta data and lazy loading
Mef with meta data and lazy loading
 

Recently uploaded

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

WCF Routing and Protocol Bridging

  • 1. WCF ROUTING Krunal Trivedi Corporate Trainer For DotNet,Silverlight,SPS 2010 MCT S For .NET Web Technology MCTS For SharePoint Server 2010 Development Co-Founder at Aavid Technologies Email:krunaltrivedi@live.in Contact : 09998472789
  • 3.
  • 4. • The Routing Service is a generic SOAP intermediary that acts as a message router. • This router / or the SOAP intermediary act as a client to the real Service and it works as a Service to the real client • System.ServiceModel.Routing namespace.
  • 5. • One of the challenges in Intermediary scenarios is that the internal endpoints may have different transport or SOAP version requirements than the endpoint that messages are received on. • To support this scenario , the Routing Service can bridge protocols.
  • 6. Filtering • The WCF filtering system can use declarative filters to match messages and make operational decisions. • You can use filters to determine what to do with a message by examining part of the message. • A queuing process can use Xpath 1.0 query to check the priority element of a known header to determine whether to move a message to the front of the queue. • The filtering system is composed of a set of classes that can efficiently determine which of a set of filters are true for a particular WCF messages.
  • 7. • The filtering system is a core component of WCF messaging; it is designed to be extremely fast. • Each filter implementation has been optimized for a particular kind of matching against WCF messages. • Filtering is performed after a message is received and is part of dispatching message to the proper application component.
  • 8. Filters • The filter engine has two primary components filters Filters tables
  • 9. • A filter makes Boolean decisions about a message based on user- specified logical condition. • Filters implement the MessageFilter class. • The Match methods are used to determine if a message satisfies a filter. • One of the methods tests the message’s header but cannot inspect the message body. • The other method takes a message buffer as an input parameter and can inspect the message body. • The several kinds of filters each specialize in matching on a particular kind of Boolean condition. Once you construct a filter, you cannot change the criteria that a filter uses; to modify a filter's criteria, construct a new one and delete the existing filter.
  • 10. Filter Tables • Filter tables are used to store key-value pairs, where a filter is the key and some associated data is the value. • The filter data can be used to indicate what actions to take if a message matches the filter and the type of the filter data is the generic parameter for the filter table class. • The filter data can consist of routing rules, session security state, listeners on a channel, and so on. • The data can be used where data flow control is necessary. • Filter tables implement the generic interface IMessageFilterTable.
  • 11. • Filter tables have several methods that match a message against all the filters in the table and return an unordered collection of matching filters or data. • Some of the match methods are multiple-match and return all matching items. Others are single-match, returning only one item, and throw a MultipleFilterMatchesException if more than one filter matches.
  • 12. • Action Filters: • The ActionMessageFilter contains a list of action strings. • If any of the actions in the filter’s list matches the Action header in the message or message buffer, the Match method returns true. • If the list is empty, the filter is considered a match-all filter and any message or message buffer matches and Match returns true. • If none of the actions in the filter’s list matches the Action header in the message or message buffer, Match returns false. • If there is no action in the message and the filter’s list is non- empty, then Match returnsfalse.
  • 13. • XPathMessageFilter (XPath queries against incoming messages) • EndpointAddressMessageFilter and PrefixEndpointAddressMessageFilter (match against endpoint address)
  • 16. Create a console application “MessageService”
  • 17. Add an interface…also Add Reference of System.ServiceModel and import the namespace also
  • 18. Add the Implementation class and implement interface
  • 20. Run your server(console application…).copy and paste URI to your browser….get the following screen..notice that proxy creation is disabled…
  • 21. Add Reference of System.ServiceModel…Also Import the namespace and copy and paste interface there…
  • 22. Create a object of ChannelFactory….using object of interface create a new channel….
  • 23. Run your Server First…Run your client…You will get the message on the Server…..
  • 24. Change the binding to the WSHttpBinnding on the client…run the server…run the client…observer the result….RUN TIME ERROR…. Limitation of ConfigLess WCF is..only for BasicHttpBinnding…not for WSHttpBinding….That means config file is necessary for wsHttpBinding…configless is not a Permanent solution.
  • 25. • Stage-2…WCF Routing with Protocol Bridging
  • 26. • Our objective is change BasicHttpBinding with WSHttpBinding on the server[so we have to drop configless setting]. • On server add new app.config file.Try to open it with Configuration Editor…but you can’t..so manually write configuration.
  • 27.
  • 30. Add service tag inside services tag….add the attribute name where name=MessageService.MessageServiceImpl(Namespace.ClassName)
  • 31. Add endpoint inside service tag…which specifies address , binding,contract… contract=MessageService.IProcessMessage(Namespace.Interface)
  • 32. On the Server..modify main method…
  • 33. On the Client…Make sure Binding is WSHttp…..
  • 34. Run The Server… Run the Client….
  • 35. Need for Routing Change address and binding on the server… Note:We have address http://localhost:9000 and binding WSHttpBinding on the client….Server side it is changed…so we required Routing…A Protocol Bridging Now ,if we run Server as well as Client application we get an error…the solution is SOAP Router….
  • 36. Create a new console application…name it WCFRouter We want this to Listen to a certain endpoint And forward Over to the listener
  • 37. Add reference of System.ServiceModel as well as System.ServiceModel.Routing-----A Required NameSpace for Routing
  • 38. RoutingService is responsible for routing messages between endpoints based on filter criteria. ServiceHost provides a host for services….
  • 39. Add app.config to the RouterProject
  • 40. IRequestReplyRouter interface is required to process message from Request-Reply channel Address and Bindings are the same at the client—so this would be server for client --Make sure on the server we have change d the address and binding
  • 41. We are adding a Behavour
  • 42. Filter tables are used to store key-value pairs, where a filter is the key and some associated data is the value. Gets or sets the name of the filter table used by this routing service for routing message Behaviour section
  • 45.
  • 46.
  • 47.
  • 48.
  • 49. Publish-Subscribe Mechanism Copy-Paste MessageService and Rename it like MessageService2…
  • 50. Modify app.config…observer address as well as service name attribute
  • 52. Make Changes on the Client
  • 54. Run Server1 , Run Server2, Run Router and Run Client Apps…