SlideShare ist ein Scribd-Unternehmen logo
1 von 16
WCF
INTRODUCTION
• The latest Service Oriented Technology.
• Interoperability is the fundamental characteristic.
• Provides common platform for all .NET communication.
• Successor to all message distribution technologies.
• Used by developers to build Service Oriented Applications.
WCF vs. WEBSERVICE
      Features                   Web Service                                    WCF
                                                             It can be hosted in IIS, windows activation
Hosting          It can be hosted in IIS
                                                             service, Self-hosting, Windows service
                 One-way, Request- Response are the          One-Way, Request-Response, Duplex are
Operation        different operations supported in web       different type of operations supported in
                 service                                     WCF
                 XML 1.0, MTOM(Message Transmission
Encoding                                                     XML 1.0, MTOM, Binary, Custom
                 Optimization Mechanism), DIME, Custom

                                                             Can be accessed through HTTP, TCP,
Transports       Can be accessed through HTTP, TCP, Custom
                                                             Named pipes, MSMQ,P2P, Custom

Protocols        Security                                    Security, Reliable messaging, Transactions
END POINT
• WCF exposes collection of end points.
• End point is a portal for communicating with the world.
• End point consists of three components (ABC – Address(where?)-Binding(how?)-Contract(what?)).
       Address – It is a unique URL identifies the location of the service.
                   http://localhost:8080/ServiceSamples/MyService
                   [Transport]:// [Machine or Domain]: [Port number]/ [Path]
       Binding – It specifies the protocol to access the service and also an encoding method used to format
                  the message contents.
                  E.g. basicHttpBinding, wsHttpBinding . . etc.
       Contract - Collection of operation that specifies what the endpoint will communicate with outside
                  world.
END POINT USING
CONFIG FILE:
• WCF Endpoint can be created using configuration file.
END POINT USING
CODE:
• WCF Endpoint can be created using code.
BINDING
• Binding will describe how client will communicate with service.
• There are 9 standard bindings in WCF

       Name                                Transport           Encoding     Interoperable
       BasicHttpBinding                    HTTP/HTTPS          Text, MTOM   Yes
       NetTcpBinding                       TCP                 Binary       No
       NetPeerTcpBinding                   P2P                 Binary       No
       NetNamedPipeBinding                 IPC                 Binary       No
       WSHttpBinding                       HTTP/HTTPS          Text, MTOM   Yes
       WSFederationHttpBinding             HTTP/HTTPS          Text, MTOM   Yes
       WSDualHttpBinding                   HTTP                Text, MTOM   Yes
       NetMsmqBinding                      MSMQ                Binary       No
       MsmqIntegrationBinding              MSMQ                Binary       Yes
CHOOSING A BINDING:
• Have to know about client(WCF or NON-WCF) and service(WCF or NON-WCF) to choose binding.
BINDING CONFIGURATION USING CONFIG FILE:


• We have to add bindingConfiguration tag to
the end point section.


• We have to name a customized section in the
binding section of the config file.
BINDING CONFIGURATION
PROGRAMMATICALLY:
CONTRACTS
• Defines the Structure and Behavior of WCF Service.
• The 3 core contracts are:
     1.   Service Contract - Describe the operation that service can provide.
     2.   Data Contract - Describes the custom data type which is exposed to the client.
     3.   Message Contract – Describes the message format for communication during
          runtime.
SERVICE CONTRACT
• Services are group of operations, both classes and interfaces are used for grouping operations.
• Operations are defined by creating a method and marking it with OperationContractAttribute attribute.
• Service contract is defined by marking a class or interface that group operations(methods) with
ServiceContractAttribute attribute.


DATA CONTRACT
• It defines the data types that are passed to and from the WCF service.
• It defines how data is serialized and deserialized.
• By using Data Contracts we can make client to aware of custom created data types.
MESSAGE CONTRACT
 • Message is the packet data which contains information.
 • Message Contract is used to customize the message as per the requirement.
 • WCF uses SOAP(Simple Object Access Protocol) Message format for communication.
 • Message contract can be applied to type using MessageContract attribute.
 • Custom Header and Body can be included to message using 'MessageHeader' and 'MessageBodyMember‘
 attribute.

FAULT CONTRACT
 • WCF provides the option to handle and convey the error message to client from service using SOAP Fault
 contract.
 • Fault Contract provides documented view for error accorded in the service to client.
 • service defines its fault contracts using the FaultContractAttribute.
HOSTING A WCF
SERVICE
• WCF service cannot exist on its own, it has to be hosted using a host process.
• There are mainly four different ways of hosting the WCF service.
      1.   IIS Hosting
      2.   Self Hosting
      3.   Windows Activation Service
      4.   Windows Service
IIS HOSTING                   SELF HOSTING                 WAS                          WINDOWS SERVICE
 IIS automatically launches   WCF provides the user to     Windows Activation           WCF Service starts when
the host process when it      host the service in any      service is a system          the system starts. All
gets the first client         application.                 service available with       versions of windows
request.                                                   Windows vista and            support WCF hosting.
                                                           windows server 2008, It
                                                           is also available with IIS
                                                           7.0
It uses the IIS features      Developer is responsible     Hosting WCF in               Process life time of the
such as process recycling,    for providing and            Activation service takes     service can be controlled
idle shutdown, process        managing the life cycle of   many advantages such         by Service Control
health monitoring and         the host process.            as process recycling,        Manager for windows
message based activation.                                  isolation, idle time         service
                                                           management and
                                                           common configuration
                                                           system.
It will only support HTTP     It will support almost all   It supports Http, TCP        It will support almost all
protocol.                     types of protocols.          and named pipes.             types of protocols.
THANK YOU

Weitere ähnliche Inhalte

Was ist angesagt?

REST, JSON and RSS with WCF 3.5
REST, JSON and RSS with WCF 3.5REST, JSON and RSS with WCF 3.5
REST, JSON and RSS with WCF 3.5Rob Windsor
 
10 Tricks and Tips for WCF
10 Tricks and Tips for WCF10 Tricks and Tips for WCF
10 Tricks and Tips for WCFBarry Dorrans
 
Interoperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) OverviewInteroperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) OverviewJorgen Thelin
 
Wcf architecture overview
Wcf architecture overviewWcf architecture overview
Wcf architecture overviewArbind Tiwari
 
Windows Communication Foundation (WCF) Service
Windows Communication Foundation (WCF) ServiceWindows Communication Foundation (WCF) Service
Windows Communication Foundation (WCF) ServiceSj Lim
 
Building RESTful Services with WCF 4.0
Building RESTful Services with WCF 4.0Building RESTful Services with WCF 4.0
Building RESTful Services with WCF 4.0Saltmarch Media
 
Beginning with wcf service
Beginning with wcf serviceBeginning with wcf service
Beginning with wcf serviceBinu Bhasuran
 
Introduction to WCF
Introduction to WCFIntroduction to WCF
Introduction to WCFybbest
 
introduction to Windows Comunication Foundation
introduction to Windows Comunication Foundationintroduction to Windows Comunication Foundation
introduction to Windows Comunication Foundationredaxe12
 
Windows Communication Foundation (WCF) Best Practices
Windows Communication Foundation (WCF) Best PracticesWindows Communication Foundation (WCF) Best Practices
Windows Communication Foundation (WCF) Best PracticesOrbit One - We create coherence
 
Session 1: The SOAP Story
Session 1: The SOAP StorySession 1: The SOAP Story
Session 1: The SOAP Storyukdpe
 
WCF tutorial
WCF tutorialWCF tutorial
WCF tutorialAbhi Arya
 
1. WCF Services - Exam 70-487
1. WCF Services - Exam 70-4871. WCF Services - Exam 70-487
1. WCF Services - Exam 70-487Bat Programmer
 
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 & SOAPUIAdvancio
 
Web services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows FormsWeb services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows FormsPeter Gfader
 
Session 1 Shanon Richards-Exposing Data Using WCF
Session 1 Shanon Richards-Exposing Data Using WCFSession 1 Shanon Richards-Exposing Data Using WCF
Session 1 Shanon Richards-Exposing Data Using WCFCode Mastery
 
Top wcf interview questions
Top wcf interview questionsTop wcf interview questions
Top wcf interview questionstongdang
 
Service Oriented Development With Windows Communication Foundation 2003
Service Oriented Development With Windows Communication Foundation 2003Service Oriented Development With Windows Communication Foundation 2003
Service Oriented Development With Windows Communication Foundation 2003Jason Townsend, MBA
 

Was ist angesagt? (20)

REST, JSON and RSS with WCF 3.5
REST, JSON and RSS with WCF 3.5REST, JSON and RSS with WCF 3.5
REST, JSON and RSS with WCF 3.5
 
10 Tricks and Tips for WCF
10 Tricks and Tips for WCF10 Tricks and Tips for WCF
10 Tricks and Tips for WCF
 
Interoperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) OverviewInteroperability and Windows Communication Foundation (WCF) Overview
Interoperability and Windows Communication Foundation (WCF) Overview
 
Wcf architecture overview
Wcf architecture overviewWcf architecture overview
Wcf architecture overview
 
Windows Communication Foundation (WCF) Service
Windows Communication Foundation (WCF) ServiceWindows Communication Foundation (WCF) Service
Windows Communication Foundation (WCF) Service
 
Building RESTful Services with WCF 4.0
Building RESTful Services with WCF 4.0Building RESTful Services with WCF 4.0
Building RESTful Services with WCF 4.0
 
WCF And ASMX Web Services
WCF And ASMX Web ServicesWCF And ASMX Web Services
WCF And ASMX Web Services
 
Beginning with wcf service
Beginning with wcf serviceBeginning with wcf service
Beginning with wcf service
 
Introduction to WCF
Introduction to WCFIntroduction to WCF
Introduction to WCF
 
introduction to Windows Comunication Foundation
introduction to Windows Comunication Foundationintroduction to Windows Comunication Foundation
introduction to Windows Comunication Foundation
 
WCF for begineers
WCF  for begineersWCF  for begineers
WCF for begineers
 
Windows Communication Foundation (WCF) Best Practices
Windows Communication Foundation (WCF) Best PracticesWindows Communication Foundation (WCF) Best Practices
Windows Communication Foundation (WCF) Best Practices
 
Session 1: The SOAP Story
Session 1: The SOAP StorySession 1: The SOAP Story
Session 1: The SOAP Story
 
WCF tutorial
WCF tutorialWCF tutorial
WCF tutorial
 
1. WCF Services - Exam 70-487
1. WCF Services - Exam 70-4871. WCF Services - Exam 70-487
1. WCF Services - Exam 70-487
 
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
 
Web services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows FormsWeb services, WCF services and Multi Threading with Windows Forms
Web services, WCF services and Multi Threading with Windows Forms
 
Session 1 Shanon Richards-Exposing Data Using WCF
Session 1 Shanon Richards-Exposing Data Using WCFSession 1 Shanon Richards-Exposing Data Using WCF
Session 1 Shanon Richards-Exposing Data Using WCF
 
Top wcf interview questions
Top wcf interview questionsTop wcf interview questions
Top wcf interview questions
 
Service Oriented Development With Windows Communication Foundation 2003
Service Oriented Development With Windows Communication Foundation 2003Service Oriented Development With Windows Communication Foundation 2003
Service Oriented Development With Windows Communication Foundation 2003
 

Ähnlich wie Wcf

Web service, wcf, web api
Web service, wcf, web apiWeb service, wcf, web api
Web service, wcf, web apiAbdeliDhankot
 
Complete Architecture and Development Guide To Windows Communication Foundati...
Complete Architecture and Development Guide To Windows Communication Foundati...Complete Architecture and Development Guide To Windows Communication Foundati...
Complete Architecture and Development Guide To Windows Communication Foundati...Abdul Khan
 
Difference between wcf and asp.net web api
Difference between wcf and asp.net web apiDifference between wcf and asp.net web api
Difference between wcf and asp.net web apiUmar Ali
 
A presentation on WCF & REST
A presentation on WCF & RESTA presentation on WCF & REST
A presentation on WCF & RESTSanthu Rao
 
Windows Communication Foundation
Windows Communication FoundationWindows Communication Foundation
Windows Communication FoundationMahmoud Tolba
 
Dot Net Training Wcf Dot Net35
Dot Net Training Wcf Dot Net35Dot Net Training Wcf Dot Net35
Dot Net Training Wcf Dot Net35Subodh Pushpak
 
Wcf Overview
Wcf OverviewWcf Overview
Wcf OverviewAmit Narula
 
Understanding Web Services by software outsourcing company india
Understanding Web Services by software outsourcing company indiaUnderstanding Web Services by software outsourcing company india
Understanding Web Services by software outsourcing company indiaJignesh Aakoliya
 
Web services
Web servicesWeb services
Web servicesAnkit Jain
 
Windows Communication Foundation
Windows Communication FoundationWindows Communication Foundation
Windows Communication FoundationVijay Krishna Parasi
 
Basics of WCF and its Security
Basics of WCF and its SecurityBasics of WCF and its Security
Basics of WCF and its SecurityMindfire Solutions
 
07 advanced topics
07 advanced topics07 advanced topics
07 advanced topicsBat Programmer
 
Wcf faq
Wcf faqWcf faq
Wcf faqRajoo Jha
 
Windows communication foundation ii
Windows communication foundation iiWindows communication foundation ii
Windows communication foundation iiSwamy Gowtham
 
D1-3-Signaling
D1-3-SignalingD1-3-Signaling
D1-3-SignalingOleg Levy
 
SOA Difference FAQs
SOA Difference FAQsSOA Difference FAQs
SOA Difference FAQsUmar Ali
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptxPreston Flossy
 
Introduction to WAP
Introduction to WAPIntroduction to WAP
Introduction to WAPNitin Saswade
 

Ähnlich wie Wcf (20)

Web service, wcf, web api
Web service, wcf, web apiWeb service, wcf, web api
Web service, wcf, web api
 
Complete Architecture and Development Guide To Windows Communication Foundati...
Complete Architecture and Development Guide To Windows Communication Foundati...Complete Architecture and Development Guide To Windows Communication Foundati...
Complete Architecture and Development Guide To Windows Communication Foundati...
 
Web Service Security
Web Service SecurityWeb Service Security
Web Service Security
 
web programming
web programmingweb programming
web programming
 
Difference between wcf and asp.net web api
Difference between wcf and asp.net web apiDifference between wcf and asp.net web api
Difference between wcf and asp.net web api
 
A presentation on WCF & REST
A presentation on WCF & RESTA presentation on WCF & REST
A presentation on WCF & REST
 
Windows Communication Foundation
Windows Communication FoundationWindows Communication Foundation
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
 
Wcf Overview
Wcf OverviewWcf Overview
Wcf Overview
 
Understanding Web Services by software outsourcing company india
Understanding Web Services by software outsourcing company indiaUnderstanding Web Services by software outsourcing company india
Understanding Web Services by software outsourcing company india
 
Web services
Web servicesWeb services
Web services
 
Windows Communication Foundation
Windows Communication FoundationWindows Communication Foundation
Windows Communication Foundation
 
Basics of WCF and its Security
Basics of WCF and its SecurityBasics of WCF and its Security
Basics of WCF and its Security
 
07 advanced topics
07 advanced topics07 advanced topics
07 advanced topics
 
Wcf faq
Wcf faqWcf faq
Wcf faq
 
Windows communication foundation ii
Windows communication foundation iiWindows communication foundation ii
Windows communication foundation ii
 
D1-3-Signaling
D1-3-SignalingD1-3-Signaling
D1-3-Signaling
 
SOA Difference FAQs
SOA Difference FAQsSOA Difference FAQs
SOA Difference FAQs
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
Introduction to WAP
Introduction to WAPIntroduction to WAP
Introduction to WAP
 

Mehr von Anand Kumar Rajana

Mehr von Anand Kumar Rajana (13)

Interface Vs Abstact
Interface Vs AbstactInterface Vs Abstact
Interface Vs Abstact
 
Anand's Leadership Assessment
Anand's Leadership AssessmentAnand's Leadership Assessment
Anand's Leadership Assessment
 
Understanding linq
Understanding linqUnderstanding linq
Understanding linq
 
Rhino Mocks
Rhino MocksRhino Mocks
Rhino Mocks
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
The Seven Pillars Of Asp.Net
The Seven Pillars Of Asp.NetThe Seven Pillars Of Asp.Net
The Seven Pillars Of Asp.Net
 
What Do You Mean By NUnit
What Do You Mean By NUnitWhat Do You Mean By NUnit
What Do You Mean By NUnit
 
Sql Server 2012 Installation..
Sql Server 2012 Installation..Sql Server 2012 Installation..
Sql Server 2012 Installation..
 
Json
JsonJson
Json
 
Jquery Ajax
Jquery AjaxJquery Ajax
Jquery Ajax
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
 
jQuery Ajax
jQuery AjaxjQuery Ajax
jQuery Ajax
 
J Query Introduction And JQuery Selectors
J Query Introduction And JQuery SelectorsJ Query Introduction And JQuery Selectors
J Query Introduction And JQuery Selectors
 

KĂźrzlich hochgeladen

APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
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
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
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
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
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
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 

KĂźrzlich hochgeladen (20)

E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
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
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
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
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 

Wcf

  • 1. WCF
  • 2. INTRODUCTION • The latest Service Oriented Technology. • Interoperability is the fundamental characteristic. • Provides common platform for all .NET communication. • Successor to all message distribution technologies. • Used by developers to build Service Oriented Applications.
  • 3. WCF vs. WEBSERVICE Features Web Service WCF It can be hosted in IIS, windows activation Hosting It can be hosted in IIS service, Self-hosting, Windows service One-way, Request- Response are the One-Way, Request-Response, Duplex are Operation different operations supported in web different type of operations supported in service WCF XML 1.0, MTOM(Message Transmission Encoding XML 1.0, MTOM, Binary, Custom Optimization Mechanism), DIME, Custom Can be accessed through HTTP, TCP, Transports Can be accessed through HTTP, TCP, Custom Named pipes, MSMQ,P2P, Custom Protocols Security Security, Reliable messaging, Transactions
  • 4. END POINT • WCF exposes collection of end points. • End point is a portal for communicating with the world. • End point consists of three components (ABC – Address(where?)-Binding(how?)-Contract(what?)).  Address – It is a unique URL identifies the location of the service. http://localhost:8080/ServiceSamples/MyService [Transport]:// [Machine or Domain]: [Port number]/ [Path]  Binding – It specifies the protocol to access the service and also an encoding method used to format the message contents. E.g. basicHttpBinding, wsHttpBinding . . etc.  Contract - Collection of operation that specifies what the endpoint will communicate with outside world.
  • 5. END POINT USING CONFIG FILE: • WCF Endpoint can be created using configuration file.
  • 6. END POINT USING CODE: • WCF Endpoint can be created using code.
  • 7. BINDING • Binding will describe how client will communicate with service. • There are 9 standard bindings in WCF Name Transport Encoding Interoperable BasicHttpBinding HTTP/HTTPS Text, MTOM Yes NetTcpBinding TCP Binary No NetPeerTcpBinding P2P Binary No NetNamedPipeBinding IPC Binary No WSHttpBinding HTTP/HTTPS Text, MTOM Yes WSFederationHttpBinding HTTP/HTTPS Text, MTOM Yes WSDualHttpBinding HTTP Text, MTOM Yes NetMsmqBinding MSMQ Binary No MsmqIntegrationBinding MSMQ Binary Yes
  • 8. CHOOSING A BINDING: • Have to know about client(WCF or NON-WCF) and service(WCF or NON-WCF) to choose binding.
  • 9. BINDING CONFIGURATION USING CONFIG FILE: • We have to add bindingConfiguration tag to the end point section. • We have to name a customized section in the binding section of the config file.
  • 11. CONTRACTS • Defines the Structure and Behavior of WCF Service. • The 3 core contracts are: 1. Service Contract - Describe the operation that service can provide. 2. Data Contract - Describes the custom data type which is exposed to the client. 3. Message Contract – Describes the message format for communication during runtime.
  • 12. SERVICE CONTRACT • Services are group of operations, both classes and interfaces are used for grouping operations. • Operations are defined by creating a method and marking it with OperationContractAttribute attribute. • Service contract is defined by marking a class or interface that group operations(methods) with ServiceContractAttribute attribute. DATA CONTRACT • It defines the data types that are passed to and from the WCF service. • It defines how data is serialized and deserialized. • By using Data Contracts we can make client to aware of custom created data types.
  • 13. MESSAGE CONTRACT • Message is the packet data which contains information. • Message Contract is used to customize the message as per the requirement. • WCF uses SOAP(Simple Object Access Protocol) Message format for communication. • Message contract can be applied to type using MessageContract attribute. • Custom Header and Body can be included to message using 'MessageHeader' and 'MessageBodyMember‘ attribute. FAULT CONTRACT • WCF provides the option to handle and convey the error message to client from service using SOAP Fault contract. • Fault Contract provides documented view for error accorded in the service to client. • service defines its fault contracts using the FaultContractAttribute.
  • 14. HOSTING A WCF SERVICE • WCF service cannot exist on its own, it has to be hosted using a host process. • There are mainly four different ways of hosting the WCF service. 1. IIS Hosting 2. Self Hosting 3. Windows Activation Service 4. Windows Service
  • 15. IIS HOSTING SELF HOSTING WAS WINDOWS SERVICE IIS automatically launches WCF provides the user to Windows Activation WCF Service starts when the host process when it host the service in any service is a system the system starts. All gets the first client application. service available with versions of windows request. Windows vista and support WCF hosting. windows server 2008, It is also available with IIS 7.0 It uses the IIS features Developer is responsible Hosting WCF in Process life time of the such as process recycling, for providing and Activation service takes service can be controlled idle shutdown, process managing the life cycle of many advantages such by Service Control health monitoring and the host process. as process recycling, Manager for windows message based activation. isolation, idle time service management and common configuration system. It will only support HTTP It will support almost all It supports Http, TCP It will support almost all protocol. types of protocols. and named pipes. types of protocols.