11.07.2015 Views

y - Net Developer

y - Net Developer

y - Net Developer

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 3 ■ EXPLORING THE WCF PROGRAMMING MODEL 67ramrameshreddy.blog.comClientBindingFactoryChannelFigure 3-6. WCF messaging stackThe binding is the mechanism to control the channel stack. When you pick one of the predefinedbindings mentioned earlier, you are picking, in essence, specific channels. Looking atthe bottom of Figure 3-6, you can see the channels are responsible for transferring a messagefrom the client side to the service side, and vice versa, depending on the messaging exchangepattern used. Obviously for this to work, the client side and the service side should be consistentto be able to exchange messages. In other words, they have to understand the messagingpattern, the transport, the protocols, and the encoding. On the client side, channels are createdby factories to be able to talk to the service side across a specific channel or a set of channels.On the service side, listeners accept messages from channels.Channels have input and output handlers that are responsible for consuming messages.Consuming messages can mean forwarding the messages across a certain transport or receivingmessages across a certain transport through a specific messaging exchange pattern. Thechannel also applies security and performs validations. In the default WCF set of bindings, thisresults in support for the WS-* specifications. Channels can be connected to each other in apipeline. Therefore, you don’t have to rebuild security, reliability, or session state capabilitiesinside your channels for every transport. Bindings make it much easier to have the client sideand the service side work together. The information about the binding is described by the policyin the metadata of the service, and as such you can rely on this information to align theinformation by means of imperative code or the more usual configuration. The metadata thatis exposed based on the binding allows you to generate proxy code for use on the client side.Shapes of ChannelsMessageServiceBindingListenerChannelramrameshreddyramrameshreddyChannels come in three shapes that correspond to the messaging exchange patternsdescribed earlier. Channels are a way for WCF to separate these messaging exchange patterns

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!