MTOM documents in WCF

M

Mike Schilling

In WSE 3.0, the XopDocument class is used to represent a DOM constructed
from an MTOM message. What is the equivalent of this in .NET 3.0 (WCF)?

More generally, which of the system classes in .NET 3.0 comprise WCF? That
is, where would you look to learn about the classes added in .NET 3.0?
 
N

Nicholas Paldino [.NET/C# MVP]

Mike,

The general namespace for the classes that comprise WCF are in the
System.ServiceModel namespace.

As for encoding the message using MTOM, you have to set it on the
binding. The bindings that support MTOM out of the box are the
BasicHttpBinding, the WSHttpBinding and the WSFederationHttpBinding
bindings. You have to set the MessageEncoding property on those classes to
WSMessageEncoding.Mtom. You can also do this through configuration files.

If you need to use MTOM encoding on a custom binding, then you have to
compose the CustomBinding instance with the
MtomMessageEncodingBindingElement class.

For more information, see the document in the MSDN documentation titled
"Large Data and Streaming", located at:

http://msdn2.microsoft.com/en-us/library/ms733742.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top