Post on 13-Jan-2016
COM326: COM326: Web Services for XML Web Services for XML ProgrammersProgrammers
Doug PurdyDoug PurdyLead Program ManagerLead Program ManagerConnected Systems DivisionConnected Systems Division
Meta-TalkMeta-Talk
GoalsGoalsShow the wonderful XML support in WCFShow the wonderful XML support in WCF
Show how to support non-SOAP Show how to support non-SOAP protocolsprotocols
Show off XLinq in the context of WCFShow off XLinq in the context of WCF
Non-GoalsNon-GoalsShow WCF interoperability Show WCF interoperability (take our word (take our word for it)for it)
Drill into metadata extensibilityDrill into metadata extensibility
Demonstrate “pull-mode” messagingDemonstrate “pull-mode” messaging
Address Contract
WCF in a NutshellWCF in a Nutshell
ServiceServiceClientClient
MessageMessage
Where? How? What?
A B C A B C
Binding
Architectural Commitments
Common Language RuntimeCommon Language Runtime
Extensible Markup LanguageExtensible Markup Language
WCF Message & Typed WCF Message & Typed ViewsViews
Featuring some XLinq magic!Featuring some XLinq magic!
Type ValidationType Validation
There are two types of validationThere are two types of validationCLR: XmlFormatter/XmlSerializerCLR: XmlFormatter/XmlSerializer
XSD: XmlValidatingReader XSD: XmlValidatingReader
Serializers always do validationSerializers always do validationValidation is done against the CLR typeValidation is done against the CLR type
This is not the same as This is not the same as schema schema validationvalidation
WCF enables schema validationWCF enables schema validationAlthough you need to write some code… Although you need to write some code…
Schema ValidationSchema Validation
Hmm… Were you suppose to send Hmm… Were you suppose to send that?that?
Protocol IntegrationProtocol IntegrationWCF Concept
SOAP, WS-*, ...
Infrastructure Protocols
POX, RSS, ...
Application ProtocolsContracts
Addresses
Bindings
XML solves more problems then it causes XML solves more problems then it causes
Metadata allows better dev experienceMetadata allows better dev experience
SOAP enables rich extensibility & securitySOAP enables rich extensibility & security
Be pragmatic – use what you need!Be pragmatic – use what you need!
REST & POXREST & POX
WCF is a big, big tent – all XML WCF is a big, big tent – all XML welcomedwelcomed
TransformationTransformation
<person> <id>12</id> <street>Street</street> <zip>98052</zip></person>
Inbound Message
<person> <id>12</id> <address> <street>Street</street> <zip>98052</zip> </address></person>
Expected Message
Transformation
[DataContract]public class person {
[DataMember] int id;
[DataMember] Address address;}
public class Person {
int id;
string street;
int zip;
}
Serialize Deserialize
Optional – for you
TransformationTransformation
Can’t you just put this data in that type?Can’t you just put this data in that type?
Wrapping UpWrapping Up
Key TakeawaysKey TakeawaysWCF is WCF is thethe XML Communication XML Communication Platform!Platform!
AllAll protocols are welcomed! protocols are welcomed!
ResourcesResourcesmicrosoft.public.windows.developer.winfx.microsoft.public.windows.developer.winfx.indigoindigo
http://msdn.microsoft.com/webservices/http://msdn.microsoft.com/webservices/
douglasp@microsoft.comdouglasp@microsoft.com
http://http://douglasp.com/blogdouglasp.com/blog
© 2005 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.