Welcome to MSDN Blogs Sign in | Join | Help

XML Support

What kinds of XML do messages support?

This isn't a simple question because, like many parts of a framework, it's important to distinguish what could possibly be done given enough time versus what could easily be done given the components that ship in the box. With the components that ship in the box, you can read and write XML 1.0 documents plus the binary XML format that we include as well. All of this support is through classes for defining XML readers and writers. You can define your own readers and writers with this model. For example, it should be possible to build a message implementation that supports XML 1.1 documents, although I have never tried this to see if it would work. You can even work with documents that are not recognizable as XML in any form using the same approach as long as there is some way to project that external document to an XML InfoSet temporarily during message processing.

Next time: Security and Streaming

Published Wednesday, August 15, 2007 5:00 AM by Nicholas Allen
Filed under: , ,

Comments

Wednesday, August 15, 2007 10:43 AM by Jason Kemp

# re: XML Support

Let's say I wanted to send JSON, what classes would I have to extend and plug in to WCF to make that work? In 3.0, not 3.5.

Would I have to write a JsonWriter class that extends XmlDictionaryWriter? How would I insert that class into the framework so that it uses that particular class for all serialization?

Thanks,

Jason

Wednesday, August 15, 2007 1:44 PM by Nicholas Allen's Indigo Blog

# Creating Sessions over HTTP

I've got a sessionful contract that I want to use with HTTP. How do I get the HTTP transport to produce

Wednesday, August 15, 2007 9:32 PM by Nicholas Allen

# re: XML Support

Hi Jason,

A MessageEncoder is the standard mechanism used to introduce new readers and writers.  The encoder produces Message instances that use your readers.  The implementation is probably a bit easier if you also introduce a custom message formatter.  A formatter performs the translation from the messages to CLR types.

Thursday, August 16, 2007 8:38 AM by Jason Kemp

# re: XML Support

Great! Thanks!

I'll start looking there.

New Comments to this post are disabled
 
Page view tracker