BizTalk Utilities CV ,   Jobs ,   Code library
 
Go to the front page to continue learning about XML or select below:

Contents

ReBlogger Contents

Previous posts in WSCF/WCF

 
 
Page 11131 of 19626

Washing the SOAP from Messages

Blogger : kennyw.com
All posts : All posts by kennyw.com
Category : WSCF/WCF
Blogged date : 2006 Jul 25

Now that the July CTP is public, I can divulge the details of a feature that I added to WCF in April.

In PDC ‘05 we showed how you can use WCF extensibility to send “POX” (Plain Old Xml) Messages via our runtime. However, it took some magical incantations to enable. These including setting HttpMappingMode on the HttpTransportBindingElement, and writing a custom encoder that only writes out the body of the Message.

In July CTP, you now get 1st class support for POX-style Messages. To accomplish this, we added new Addressing and Envelope Versions (AddressingVersion.None and EnvelopeVersion.None). I’m also happy to report the obsolescence and removal of HttpMappingMode (nee MapAddressingHeadersToHttpHeaders for those former Beta 1 users who have been following along).

AddressingVersion.None means that your addressing information (To, Action, etc) is transmitted out of band from the Envelope. One example of this type of addressing is BasicHttpBinding — the is sent as the HTTP Request-Uri, and the is sent out as either the SOAP-Action (in SOAP 1.1), or as a parameter to the content-type (in SOAP 1.2). If a particular binding requires WS-Addressing, then they can throw on Send() for Messages with AddressingVersion.None

EnvelopeVersion applies to the basic structure of the Message. This is where SOAP can come in to play. By default, the EnvelopeVersion of a Message is EnvelopeVersion.Soap12. SOAP 1.2 includes (among other things), support for Headers, and an outer tag. To “wash off” the SOAP from the Message (thanks Don), you should create a Message with EnvelopeVersion.None. When using such Messages, you cannot add any Headers other than and . and are “special” since they are intrinsics used by the runtime system. is used by default for addressing dispatch, and is used by default for Operation dispatch. Some transports (such as our HTTP Transport) will strip these header values out and lift them into their “framing layer” (i.e. the goo we put around a Message to conform to the HTTP protocol).

For our programming model, AddressingVersion and EnvelopeVersion are packaged together into a single MessageVersion that is assigned to a Message or a Binding. Enabling simple POX messaging is now simply a matter of setting up an HTTP binding on your service with a TextEncoder that uses MessageVersion.None (or messageVersion=”none” in config-speak). Viola! No SOAP!


Read comments or post a reply to : Washing the SOAP from Messages
Page 11131 of 19626

Newest posts
 

    Email TopXML