Windows Communication Foundation. Agenda How We Got Here ASMX vs WCF Throwdown WCF Contracts Service Data Message Bindings Security Reliability Declarative.

Slides:



Advertisements
Similar presentations
Indigo Jonathan Turnbull Nick Cartwright Ivan Konontsev Chris Bright.
Advertisements

WCF Intro Scott Reed Owner - Brain Hz Software Instructor – DevelopMentor
SOAP.
SOAP Quang Vinh Pham Simon De Baets Université Libre de Bruxelles1.
May 2, 2006Shawn Mulkey - EECS Distributed Computing & Object Oriented Middleware: Part 2 Presented By Shawn Mulkey.
Aplicaciones Distribuidas Manuel Zegarra Sánchez Microsoft Certified Application Developer.
 Introduction  WCF Definition  WCF Architecture  Implementation  WCF Demo Overview.
Latest techniques and Applications in Interprocess Communication and Coordination Xiaoou Zhang.
Windows Communication Foundation and Web Services.
Copyright © 2007 CA. All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 5C The Plex SOA Strategy.
X.509 support in WCF Exploring support for X.509 Certificates in Microsoft’s Windows Communication Foundation Paul Cormier UCCS CS591 Fall 2009.
Adam Dille CS526 – Spring  Advances in Microsoft’s service offerings  ASMX vs. WCF  Latest WCF Improvements (.NET 4.0)  No in-depth study of.
The Microsoft Technical Roadshow 2006 Windows Communication Foundation Mike Taulty Developer & Platform Group Microsoft Ltd
Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd
Developing Asynchronous Database Applications with SQL Server 2005 Service Broker Noah Subrin Technical Lead SRA International.
Module 13: WCF Receive Adapters. Overview Lesson 1: Introduction to WCF Receive Adapters Lesson 2: Configuring a WCF Receive Adapter Lesson 3: Using the.
Getting Started with Windows Communication Foundation 4.5 Ed Jones, MCT, MCPD, MCTS Consultant RBA Inc.
WCF Services in Nutshell A Tutorial using WCF Mr. Michael Arnwine WCF using Service Oriented Architecture (SOA) and “Restful” Service.
Getting Started with WCF Windows Communication Foundation 4.0 Development Chapter 1.
Copyright ©2004 Virtusa Corporation | CONFIDENTIAL Introduction to Windows Communication Foundation Ruwan Wijesinghe.
[Title of the course] WCF
Data Parallel Application Development and Performance with Windows Azure Advisor : Professor Gagan Agrawal Present by : Yu Zhang.
.NET 3.0, 3.5, 4.0 WCF, WPF, WF, CardSpace, LINQ, Task Parallel.
Keith Elder Microsoft MVP INETA Speaker Blog: Demystifying Windows Communication Foundation.
Agenda What Is the Windows Communication Foundation? How Does It Work? How Do I Use and Deploy It? Bindings Addresses Contracts How to host WCF services.
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
Module 14: WCF Send Adapters. Overview Lesson 1: Introduction to WCF Send Adapters Lesson 2: Consuming a Web Service Lesson 3: Consuming Services from.
1 Windows Communication Foundation: Integrating COM+ and MSMQ Applications Andy Milligan COM305 Program Manager Microsoft Corporation.
Microsoft Visual Studio 2010 Muhammad Zubair MS (FAST-NU) Experience: 5+ Years Contact:- Cell#:
Microsoft Visual Studio 2010 Muhammad Zubair MS (FAST-NU) Experience: 5+ Years Contact:- Cell#:
Intro to WCF From the beginning and uses Steve AppRochester.
Random Logic l Forum.NET l Web Services Enhancements for Microsoft.NET (WSE) Forum.NET ● October 4th, 2006.
Developing Web Services Using ASP.NET and WSE That Interoperate with the Windows Communications Foundation ("Indigo") Mark Fussell COM432 Lead Program.
Virtual techdays INDIA │ august 2010 Deep Dive into WCF 4.0 Features Sarath S S V S │ Program Manager, BING, Microsoft India R&D.
.NET Enterprise Services COM+ 1.5 麥超俊 Bobby Mak 架構技術推廣經理開發工具暨平台推廣處台灣微軟股份有限公司.
Mahesh Krishnan, Senior Consultant, Readify Slide 1.
Telerik Software Academy Web Services & Cloud.
SCA Bindings Simon Holdsworth Piotr Przybylski. Agenda n SCA Bindings Overview l Bindings TC Charter n Bindings l Web Services Binding l JMS Binding l.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
INT-9: Implementing ESB Processes with OpenEdge ® and Sonic ™ David Cleary Principal Software Engineer.
Kemal Baykal Rasim Ismayilov
Windows Communication Foundation (“Indigo”): Writing Reliable and Transacted Distributed Applications Shy “BAD-P” Cohen COM307 Program Manager Connected.
Windows Communication Foundation David Anderson Independent Software Developer DCOM Productions.
Web Services Security with Visual Studio 2005 Muhammad Saqib Ilyas
Presentation 24: Windows Communication Foundation Introduced Objektorienteret Netværkskommunikation.
Agenda What Is the Windows Communication Foundation? How Does It Work? How Do I Use and Deploy It? Bindings Addresses Contracts How to host WCF services.
.NET Mobile Application Development XML Web Services.
Dhananjay Kumar MVP-Connected System 1. WCF  Agenda What is WCF ? Why WCF? Address, Binding, Contract End Points Hosting Message Patterns Programming.
Christian Weyer thinktecture.
Introduction to.NET FX 3.0 (+ sneak preview of.NET FX 3.5) Martin Parry Developer & Platform Group Microsoft Ltd
The SOAP Story Martin Parry Developer & Platform Group Microsoft Ltd
Windows Communication Foundation António Cruz Freelancer (SAPO/PT.COM)
Shani Raba Team Leader & Software Architect
OE-NIK HP Advanced Programming WCF WCF SOAP service, host, client Exception handling (NOT required)
Windows Communication Foundation Stipe Ivan Latković.
Nati Dobkin
O VERVIEW OF SOA AND WCF Jinaldesai.net – My Thouths And Learnings.
Windows Communication Foundation Part 1 You can reuse these slides but please mention the original source if you want to do so. Speaker: Nguyễn Bá Quang.
Windows Communication Foundation and Web Services
Windows Communication Foundation
Segments Introduction: slides 2–7 10 minutes
Windows Communication Foundation
Windows Communication Foundation
Window Communication Foundation
WCF.
Distribution of functionality Webservice using WCF
Windows Communication Foundation and Web Services
Windows Communication Foundation
.NET 3.0, 3.5, 4.0 WCF, WPF, WF, CardSpace, LINQ, Task Parallel
The SOAP Story Martin Parry Developer & Platform Group Microsoft Ltd
Presentation transcript:

Windows Communication Foundation

Agenda How We Got Here ASMX vs WCF Throwdown WCF Contracts Service Data Message Bindings Security Reliability Declarative Summary

From Objects to Services PolymorphismEncapsulationSubclassing Message-basedSchema+Contract Binding via Policy 1980s 2000s Interface-based Dynamic Loading Runtime Metadata 1990s Object-Oriented Service-Oriented Component-Based

The Challenge Radically Simplifying Distributed Application Development Development of connected systems remains costly and frustrating Different programming models for different tasks Need for security and reliable messaging Interoperability with applications on other platforms Productive service-oriented programming model needed

Windows Communication Foundation Unified framework for rapidly building service-oriented applications

What Does WCF Replace? ASMXWSE.NET Remoting COM+ (Enterprise Services) MSMQ

WCF……. allows to publish.NET classes as services import from services into.NET classes. includes interoperability code to handle service protocols, type conversion and value marshaling. Allows developers to easily connect their applications to web services.

WCF……. supports non-functional requirements (reliable calls, asynchronisity, transactionality, security) comes with predefined adapters can be extended with custom handlers for non-standard scenarios. classes reside mostly in the System.ServiceModel namespace is physically located in the System.ServiceModel.dll assembly.

UNDERSTANDING WCF PRINCIPLES

Services and Clients ClientService Message Message Uses to communicate between processes.

Endpoints ClientService Message EndpointEndpoint Endpoint

Address, Binding, Contract ClientService Message AddressBindingContract (Where)(How)(What) Endpoint ABCABC Endpoints ABC

WCF Architecture: Messaging Runtime TransportEncoderProtocol(s)TransportEncoderProtocol(s) Client Dispatcher Service Contract and Behaviors Binding Address

CONTRACTS The what

Three Types of Contracts Service Contract Defines Operations, Behaviors and Communication Shape What does your service do Data Contract Defines Schema and Versioning Strategies What obect data is used Message Contract Allows defining application- specific headers and unwrapped body content Allows control over the SOAP structure of messages

Ways to Talk One Way: Datagram-style delivery Request-Reply Immediate Reply on same logical thread Duplex Reply “later” and on backchannel (callback-style) ClientService One Way Request-Reply Duplex (Dual)

SERVICE CONTRACTS What does your service do?

Service Contract using System.ServiceModel; [ServiceContract] public interface ICalculate { [OperationContract] double Add( double a, double b); [OperationContract] double Subtract( double a, double b); }

Service Contract: OneWay [ServiceContract] public interface IOneWayCalculator { [OperationContract(IsOneWay=true)] void StoreProblem (ComplexProblem p); }

Service Contract: Duplex Asymmetric [ServiceContract(Session=true, CallbackContract=typeof(ICalculatorResults)] public interface ICalculatorProblems { [OperationContract(IsOneWay=true)] void SolveProblem (ComplexProblem p); } public interface ICalculatorResults { [OperationContract(IsOneWay=true)] void Results(ComplexProblem p); }

Service Contract: Duplex Symmetric [ServiceContract(Session=true, CallbackContract=typeof(IChat)] public interface IChat { [OperationContract(IsOneWay=true)] void Talk(string text); }

DATA CONTRACTS What object data needs to flow back and forth? This Contract defines the data types that passed in and out to the service.

Data Contract [DataContract] public class ComplexNumber { [DataMember] public double Real = 0.0D; [DataMember] public double Imaginary = 0.0D; public ComplexNumber(double r, double i) { this.Real = r; this.Imaginary = i; } }

MESSAGE CONTRACTS Defines the mapping between the type and a SOAP envelope

MESSAGE CONTRACT SOAP message structure automatically generated by WCF. But Message contracts provide the ultimate control over the formatting of the SOAP messages.(I.e Message Header and Message body). Probably the biggest reason you would need to obtain this level of control is interoperability and controlling security issues. Message contracts are defined by applying the [MessageContract] attribute. You then specify specifics for each message using the [MessageBodyMember] and [MessageHeader] attributes. The following example illustrates these three attributes by defining a simple message contract:

Message Contract [MessageContract( HasProtectionLevel=true; IsWrapped = True; ProtectionLevel = ProtectionLevel.None; WrapperName=”Order”) ] public class UserMyMessage { [MessageHeader] public int UserID; [MessageBody] public string UserName; [MessageBody] public string UserPassword; [MessageBody( Name=; Order=;) ] public string UserRole; // Constructors… } It is Strongly Typed Class that is associated with a SOAP message Attribute maps a SOAP Message Header SOAP body element

BINDINGS

Bindings & Binding Elements Transport IPCMSMQ Custom TCPHTTP Protocol Encoders.NETTX Custom SecurityReliability Binding HTTPTXSecurityReliabilityText Binary Custom

Standard Bindings BindingInteropSecuritySessionTXDuplex BasicHttpBindingBP 1.1N, TNNn/a WSHttpBindingWSM, T, XN, T, RSN, Yesn/a WSDualHttpBindingWSMRSN, YesYes WSFederationBindingFederationMN, RSN, YesNo NetTcpBinding.NETT, MT,RSN, YesYes NetNamedPipeBinding.NETTT, NN, YesYes NetPeerTcpBindingPeerTNNYes NetMsmqBinding.NETT, M, XNN, YesNo MsmqIntegrationBindingMSMQTNN, Yesn/a N = None | T = Transport | M = Message | B = Both | RS = Reliable Sessions

Bindings & Behaviors: Security Service CBA CBA Client A BC CBA Be Bindings Insert Claims in Messages Behaviors Implement Security Gates

Defining Endpoints <endpoint address="Calculator" bindingSectionName="basicProfileBinding" contractType="ICalculator" />

Configuring Bindings

Custom Bindings

Application Service Model Messaging HostingEnvironments ASP.NETASP.NETWPFWPFWinFormWinForm NT Service COM+COM+ TCPChannelTCPChannel HTTPChannelHTTPChannel QueueChannelQueueChannel Secure Channel Secure Channel ReliableChannelReliableChannel Instance Behavior Throttling Behavior Type Integ. Behavior Behavior Transaction Behavior Concurrency Behavior Error Behavior Metadata Behavior BinaryEncoderBinaryEncoder Text/XMLEncoderText/XMLEncoder …… … … …… WCF Summary WASWAS

What we cover Message Contract

Message Contract:- Default SOAP message format is provided by the WCF runtime for communication between client and service. If it is not meeting your requirements then we can create out own message format. This can be achieved by using “Message Contract Attribute”. Exposing services on a network even an internal network requires security (This is windows!)