Alex Rivera | Logout

What type of serialization uses Wcf behind the scenes?

Asked 2011-09-03T08:26:31.773
9

I know there's 3 type s of serialization in .net :

Soap , Xml , Binary.

Wcf instructed the DataContract attribute which also serialize ... but via what ?

Binary is not - i know.

So by which mechanism ?

wcf
Edit
Report

1 Answer

15

You are messing two techniques together.

  • Serialization - how objects are converted to messages - we have XML and JSON formatters available out of the box (DataContractSerializer, DataContractJsonSerializer, XmlSerializer)
  • Encoding - how the message is transferred - we have three encoders out of the box
    • TextMessageEncoder - for SOAP messages transferred as text - also supports MTOM and POX (Plain old XML) if message version is set to None
    • BinaryMessageEncoder - for XML/SOAP messages transferred as binary data
    • WebMessageEncoder - for XML and JSON messages in REST services

These features are used by standard bindings. WCF support as many serializations and encoding as you want => you can build your own.

answered 2011-09-03T08:45:37.770

Your Answer