Posts Tagged ‘MessageEncoder’

The WCF MessageEncoder Decoded 3

Class Requirements

Like Channels and other classes in WCF, when you build a MessageEncoder you also build an accompanying MessageEncodingBindingElement and MessageEncoderFactory. Also, as with other WCF classes, the binding class handles configuration and the factory class handles creation. Following is the class declaration for TestEncoderFactory.

public class TestEncoderFactory : MessageEncoderFactory
{

Following is the class declaration for TestEncoderBinding.

public class TestEncoderBindingElement :
MessageEncodingBindingElement
{

As stated earlier, normally the MessageEncoder resides inside the Transport Channel. My WCF Channels and Binding article illustrates how to incorporate a MessageEncoder in the binding and use a MessageEncoder inside a Transport Channel. Typically, the MessageEncoder is created by using the following function calls and properties.
(more…)

Posted by admin on May 19th, 2008 No Comments

The WCF MessageEncoder Decoded 1

The MessageEncoder

MessageEncoders typically inhabit Transport Channels, although MessageEncoders can be used elsewhere in the Channel Stack. Often, a MessageEncoder’s sole purpose is to turn the bytes coming over the wire into a WCF Message Class representation.

Typically, bytes on the wire are a Multipurpose Internet Mail Extensions (MIME) content type. MIME support is a WCF cornerstone. WCF is also built for SOAP-based interactions. In fact, WCF comes equipped to handle multiple SOAP versions and various forms of XML data. MessageEncoders shipping with WCF can build messages from various content and SOAP protocols.
(more…)

Posted by admin on May 12th, 2008 2 Comments