Live Blog - Day 1 Pluralsight BizTalk Course - WCF for BizTalk Developers Continued
- DataContract
- Attribute which controls serialization/deserialization between .NET and XML
- New serialization layer
- Hmm, ClientViaBehavior allows us to use tracing tools like TcpTrace and make it cool with WS-Addressing (didn't know about this)
- Behaviors
- Objects that change the semantics of the *service* or *client* not the contract
- Don't affect what is on the wire
- Must be consistent with the bindings
- Hosting
- A WCF Service can be hosted in any .NET app
- ServiceHost/ServiceHostFactory can be used to simplify hosting layer
- IIS/WAS integration allows robust auto-execution hosting environment (uses ServiceHost implicitly)
- Tools
- Building the Client
- WCF/BizTalk
- BT's integration with WCF in R2 surfaces some interesting WCF features
- Features in question:
- XmlFormatter (Xml Serialization support)
- Generic messaging contracts
- Serialization
- DataContract is WCF's "native" serializer
- Limited to subset of XML schema spec
- E.g. elementFormDefault = unqualified not supported
- WCF also supports XmlSerializer
- Necessary for many interop scenarios
- Using the XmlSerializer
- XmlSerializerFormat can be applied to a ServiceContract or OperationContract
- Operations inherit from Service
- MessageContract
- Using MessageContract instead of DataContact gives yopu more control over the complete SOAP message
- Some serialization rules apply
- Can add Custom SOAP Headers
- Can control write format (Wrapped versus Unwrapped)
- Helps get rid of "innate RPCness in WCF"
- With data contract, get the name of a method as the root element of the XML!
- Want <HelloMessage>
- Using just "Message"
- System.ServiceModel.Channels.Message is the low-level type that WCF uses for communication
Technorati Tags:
BizTalk Server,
WCF
Comments