مشخصات کتاب
-
Steven Cheng
-
2010
-
انگلیسی
-
3576
-
917
-
0
Microsoft Windows Communication Foundation 4.0 Cookbook for Developing SOA Applications
Chapter 1: Working with Contracts 7
Introduction 7
Defining a one-way Contract 8
Make DataContract forward-compatible 11
Generate DataContract from an XML Schema 13
Using XMLSerializer to control message serialization 16
Using MessageContract to control the SOAP message 19
Adding a custom SoapHeader via Contract 20
Return custom exception data through FaultContract 23
Chapter 2: Endpoint, Binding, and Behavior 27
Introduction 27
Configuring Default Endpoints 28
Setting up two-way communication over MSMQ 31
Building a Publish-Subscribe service with dual binding 35
Creating a multiple-endpoint service 40
Implementing a POX HTTP service 43
Defining a CustomBinding without a timestamp header 47
Suppressing mustUnderstand validation on unknown SoapHeaders 49
Sharing a physical address between multiple endpoints 52
Chapter 3: Hosting and Configuration 55
Introduction 55
Hosting a service in a console application 56
Hosting a service in Windows Service 59
Hosting a HTTP service with ASP.NET-compatible context 63
Hosting a non-HTTP service in IIS 7 67
Customizing IIS ServiceHost via ServiceHostFactory 70
Specifying a dedicated service instance for a singleton service 72
Hosting a service in WSS 3.0 76
Chapter 4: Service Discovery and Proxy Generation 83
Introduction 83
Creating a typed service client 84
Choosing a specific type for representing a collection parameter 88
Reusing types between service and client 90
Customizing an auto-generated service proxy class in Visual Studio 94
Building an ad-hoc auto-discoverable service 96
Using managed ServiceDiscovery 99
Generating a service proxy in code 106
Customizing auto-generated service metadata 109
Chapter 5: Channel and Messaging 113
Introduction 113
Using ChannelFactory to consume a WCF service 114
Invoking async operation via ChannelFactory 116
Creating a service via ChannelListener 118
Getting the IP address of a client consumer of a WCF service 121
Adding a dynamic SoapHeader into a message 122
Chapter 6: Dealing with Data in Service 125
Introduction 125
Binding a WPF element with data from a WCF service 126
Returning ReadOnlyCollection data 128
Using raw XML as an operation parameter 130
Returning a DataTable/DataSet in a service operation 132
Transferring binary data with MTOM encoding 134
Specifying ServiceKnownType information in a programmatic way 136
Using XmlSerializer for custom data serialization 139
Chapter 7: Security 143
Introduction 143
Setting up ad hoc Windows authentication over plain HTTP 144
Getting an authenticated client identity in a service operation 146
Using username authentication with an ASP.NET membership provider 148
Sending a clear text username token over unsecured HTTP transport 150
Using transport and message security at the same time 153
Authorizing through declarative role-based access control 155
Impersonating with a client caller identity 158
Adding multiple tokens in a service request (supportingToken) 161