Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Inside Microsoft Windows® Communication Foundation
SPECIAL OFFER: Upgrade this ebook with O’Reilly
Acknowledgments
Introduction
Who This Book Is For
How This Book Is Organized
Code Samples and System Requirements
Questions and Comments
I. Introduction to WCF
1. The Moon Is Blue
The Universal Requirement
The Universal Concept
The Business Example
Introducing Windows Communication Foundation (WCF)
Not Just Another API
WCF from 10,000 Feet
Beneath It All: Windows
Helpful Products: The Windows Server System
The Development Platform: The Microsoft .NET Framework
The Distributed Platform: WCF
Putting It All Together
WCF Features
Independent Versioning
Asynchronous One-Way Messaging
Platform Consolidation
Security
Reliability
Transactional Support
Interoperability
Performance
Extensibility
Configurability
Summary
2. Service Orientation
A Quick Definition of Service Orientation
Getting the Message
Messaging Participants
The Initial Sender
Intermediaries
The Ultimate Receiver
The Anatomy of a Message
Envelope
Header
Body
Message Transports
Message Encodings
The XML Infoset
SOAP and the XML Infoset
The Text Encoder
The Binary Encoder
The MTOM Encoder
Choosing the Right Encoding
Addressing the Message
In-Transport Addressing vs. In-Message Addressing
Specifying the Ultimate Receiver
Specifying the Initial Sender
Specifying Where to Send an Error
Identifying a Message
Relating Messages to Other Messages
Who Is Listening for a Response?
Specifying an Operation
The Need for Standard Header Blocks
WS-Addressing
Endpoint References
Message Information Headers
Message Information Header Block Dependencies
The Four Tenets of Service Orientation
Explicit Boundaries
Service Autonomy (Sort Of)
Contract Sharing
Compatibility Based on Policy
Putting It All Together
The Contract
Why SO Makes Sense
Versioning
Load Balancing
Platform Changes over Time
Content-Based Routing
End-to-End Security
Interoperability
Summary
3. Message Exchange Patterns, Topologies, and Choreographies
Message Exchange Patterns
The Datagram MEP
Datagrams and WSDL
Datagrams and WCF Contracts
Error Handling Considerations
HTTP and the Datagram MEP
The Request/Reply MEP
Request/Reply and WSDL
Request/Reply and WCF Contracts
Transport Considerations
The Duplex MEP
The Duplex MEP and WSDL
The Duplex MEP and WCF Contracts
Message Topologies
Point-to-Point
Forward-Only Point-to-Point
Brokered
Peer-to-Peer
Message Choreographies
Summary
4. WCF 101
WCF Quick Start
Defining the Service Contract
Defining the Address and the Binding
Creating an Endpoint and Starting to Listen
Mapping Received Messages to a HelloWCF Member
Compiling, Running, and Verifying the Receiver
Sending a Message to the Receiver
Compiling, Running, and Verifying the Sender
Looking at the Message
A Slight Change with a Major Impact
Exposing Metadata
Consuming Metadata
Generating the Proxy with Svcutil.exe
Coding HelloWCFSender with Svcutil.exe-Generated Types
WCF Gross Anatomy from the Outside
The Address
The Binding
The Contract
Service Contracts
Data Contracts
Message Contracts
WCF Gross Anatomy from the Inside
Summary
II. WCF in the Channel Layer
5. Messages
Introduction to the Message Type
The WCF XML Stack
The XmlDictionary Type
The XmlDictionaryWriter Type
Creating an XmlDictionaryWriter Object
The Write Methods
Writing with an XmlDictionary
The XmlDictionaryReader Type
Creating an XmlDictionaryReader Object
Round-Tripping XML with an XmlDictionary
Back to the Message
Creating a Message
A Word about Message Serialization and Deserialization
Message Versions
Serializing an Object Graph
Pulling Data from a Reader
Pushing Data into a Message with a BodyWriter
Messages and SOAP Faults
SOAP Fault Anatomy
The MessageFault Type
Buffered vs. Streamed Messages
Serializing a Message
Deserializing a Message
Checking Whether a Message Is a SOAP Fault
Message State
Working with Headers
The MessageHeader Type
Creating a MessageHeader Object
Serializing a MessageHeader Object
WS-Addressing Endpoint References
MessageHeader Miscellany
The MessageHeaders Type
Creating a MessageHeaders Object
Adding a MessageHeader
Getting the Value of a MessageHeader
Copying a MessageHeaders Object
Serializing a MessageHeaders Object
WS-Addressing and the MessageHeaders Type
The EndpointAddress Type
The AddressHeader Type
Serializing an EndpointAddress Object
Copying Messages
Message Cleanup
Summary
6. Channels
Channels in Perspective
Instantiating a Channel
The Channel State Machine
The ICommunicationObject Interface
The CommunicationObject Type
CommunicationObject-Derived Types
The Open and BeginOpen Methods
CommunicationObject: Check Whether State Transition to Open Is Permissible
CommunicationObject: If So, Transition State to Opening
MyCommunicationObject: OnOpening Virtual Method Invoked
CommunicationObject: Opening Event Raised, Delegates Invoked
MyCommunicationObject: OnOpen Virtual Method Invoked
MyCommunicationObject: OnOpened Virtual Method Invoked
CommunicationObject: State Transitions to Opened
CommunicationObject: Opened Event Raised, Delegates Invoked
The Close and Abort Methods
The Fault Method
About CommunicationObject Stacks
Introduction to Channel Shape
Channel Interfaces and Base Types
The IChannel Interface
Datagram Channels: IInputChannel and IOutputChannel
Sending: IOutputChannel
Receiving: IInputChannel
Request/Reply Channels: IRequestChannel and IReplyChannel
Sending: IRequestChannel
Receiving: IReplyChannel
Request/Reply Correlation: The RequestContext Type
Duplex Channels: IDuplexChannel
Sending and Receiving: IDuplexChannel
The IDefaultCommunicationTimeouts Interface
The ChannelBase Type
Channel Flavors
Transport Channels
Protocol Channels
Shaping Channels
Creating a Custom Channel
Creating the Base Type
Adding the Constructor
Adding the Channel State Machine
Creating the Datagram Channels
The Datagram Receiving Channel
The Datagram Sending Channel
The Duplex Channel
The Duplex Session Channel
Summary
7. Channel Managers
The Concept of a Channel Manager
The Receiver: Channel Listeners
The IChannelListener Interface
The IChannelListener<TChannel> Interface
The ChannelListenerBase Type
The ChannelListenerBase<TChannel> Type
Building a Custom Channel Listener
The Sender: Channel Factories
The IChannelFactory Interface
The IChannelFactory<TChannel> Interface
The ChannelFactoryBase Type
The ChannelFactoryBase<TChannel> Type
Building a Custom Channel Factory
Summary
III. WCF in the ServiceModel Layer
8. Bindings
The Binding Object Model
Binding Constructors
Binding Test Methods
Binding Factory Methods
Specifying the Listening Address
The GetProperty<T> Method
The MessageVersion Property
The Scheme Property
The CreateBindingElements Method
The BindingElement Type
Binding Element Constructors and the Clone Method
BindingElement Test Methods
BindingElement Query Mechanism
BindingElement Factory Methods
The TransportBindingElement Type
The BindingContext Type
BindingContext Factory Methods
Using a Binding
Creating Custom Bindings
Summary
9. Contracts
Contracts Defined
WCF Contract Gross Anatomy
Service Contracts
The ProtectionLevel Property
The SessionMode Property
Operations in a Service Contract
The AsyncPattern Property
The ProtectionLevel Property
The IsOneWay Property
The IsInitiating and IsTerminating Properties
The Name, Action, and ReplyAction Properties
Operation Method Arguments
Mapping a Service Contract to a Service Object
Data Contracts
The DataContractAttribute Type
The DataMemberAttribute Type
Message Contracts
Operation Compatibility
My Philosophy on Contracts
Avoid Defining Methods in Data Contracts and Message Contracts
Seal Contracts
Use Nullable Types
From Contract Definition to Contract Object
Summary
10. Dispatchers and Clients
Questions to Ask Yourself
The Dispatcher
ChannelDispatcher Anatomy
CommunicationObject Members
The ServiceThrottle Property
The ManualAddressing Property
The ErrorHandlers Collection
The Endpoints Property
EndpointDispatcher Anatomy
Filters
The DispatchRuntime Type
The InstanceContext Related Types
The MessageInspectors Property
The OperationSelector Property
The DispatchOperation Collection
The DispatchOperation Type
The ServiceHost Type
The Client
Summary
Index
SPECIAL OFFER: Upgrade this ebook with O’Reilly
← Prev
Back
Next →
← Prev
Back
Next →