The SOAP Story Martin Parry Developer & Platform Group Microsoft Ltd [email_address]   http://martinparry.com
Agenda <ul><li>Definitions </li></ul><ul><li>SOAP through the ages </li></ul><ul><li>SOAP and “standards” </li></ul><ul><l...
Definitions <ul><li>SOAP  </li></ul><ul><ul><li>Initially: Simple Object Access Protocol </li></ul></ul><ul><ul><li>It’s a...
SOAP on the Microsoft Platform <ul><li>SOAP Toolkit </li></ul><ul><ul><li>NT4, Windows 2000 </li></ul></ul><ul><ul><li>IIS...
SOAP on the Microsoft Platform <ul><li>SOAP Toolkit </li></ul><ul><ul><li>NT4, Windows 2000 </li></ul></ul><ul><ul><li>IIS...
SOAP on the Microsoft Platform <ul><li>SOAP Moniker </li></ul><ul><ul><li>Introduced in Windows XP Professional </li></ul>...
SOAP on the Microsoft Platform <ul><li>.NET Remoting </li></ul><ul><ul><li>Supports TCP and HTTP transports </li></ul></ul...
SOAP on the Microsoft Platform <ul><li>ASP.NET </li></ul><ul><ul><li>.asmx web services </li></ul></ul><ul><ul><li>“ add w...
SOAP on the Microsoft Platform <ul><li>Web Services Enhancements </li></ul><ul><ul><li>Now in v3.0 </li></ul></ul><ul><ul>...
SOAP on the Microsoft Platform <ul><li>Windows Communication Foundation </li></ul><ul><ul><li>Introduced in .NET FX 3.0 </...
“ Standards” <ul><li>WS-Security </li></ul><ul><ul><li>Message-level security </li></ul></ul><ul><li>WS-SecureConversation...
Approaches – Distributed Objects <ul><li>A long history on the Microsoft platform </li></ul><ul><ul><li>DCOM, .NET Remotin...
Approaches – Message Exchange <ul><li>Probably still use a proxy class </li></ul><ul><li>How is message body formed? </li>...
Approaches - SOA <ul><li>There are multiple definitions of SOA </li></ul><ul><ul><li>Not necessarily tied to web services ...
Interop with other platforms ASMX Attribute-  Based Programming Enterprise Services WS-* Protocol Support WSE Message- Ori...
Distributed Applications <ul><li>Services pass messages described by a contract </li></ul><ul><li>Service may provide meta...
Mechanics of Communication What do I send? Where do I send it? How should I send it? Contract Address Binding “ Service” “...
Mechanics of Communication “ Service” “ Client” Endpoint Contract Binding Address Endpoint Contract Binding Address Endpoi...
Contracts [ServiceContract] public interface INuggetAccess  { [OperationContract]   string[] GetTopics(); } .NET Interface...
Richness of metadata <ul><li>Service can advertise a lot of info to a client </li></ul><ul><ul><li>WSDL </li></ul></ul><ul...
Contract Details <ul><li>Message exchange might be: - </li></ul><ul><ul><li>One-way, Request/Response, Two-way (Duplex) </...
Hosting Services public class Service :  INuggetAccess {   string[] GetTopics() { } } IIS <%@ ServiceHost Service=“Service...
Windows Communication Foundation
WCF – sketched architecture Your code Your code Client Binding (ordered list of channel types & config) channel type N cha...
Standard Framework Bindings <ul><li>Pre-built set in the framework </li></ul><ul><ul><li>WS-I Basic Profile </li></ul></ul...
Instancing, Concurrency, Sessions <ul><li>Service classes can be instantiated: - </li></ul><ul><ul><li>Singleton, Per-Call...
Instancing, Concurrency, Sessions <ul><li>Service classes can be instantiated: - </li></ul><ul><ul><li>Singleton, Per-Call...
Instancing, Concurrency, Sessions <ul><li>Service classes can be instantiated: - </li></ul><ul><ul><li>Singleton, Per-Call...
Security in WCF – Out of the box <ul><li>Transport Level </li></ul><ul><ul><li>HTTPS </li></ul></ul><ul><ul><li>IIS authen...
Security in WCF - Extensibility <ul><li>Roll your own </li></ul><ul><ul><li>Username validator </li></ul></ul><ul><ul><li>...
Federated Security with WCF
WCF in .NET FX 3.5 <ul><li>Most of the new stuff isn’t SOAP </li></ul><ul><ul><li>We’ll see some of that in the next sessi...
Partial Trust <ul><li>Now possible to call through WCF proxies in a partial trust environment </li></ul><ul><li>Various ca...
Durable Services <ul><li>Provider-based framework for easily adding long-running abilities to WCF services </li></ul>clien...
Durable Services <ul><li>Provider-based framework for easily adding long-running abilities to WCF services </li></ul>clien...
Workflow <ul><li>WF is not strictly about services, or SOAP </li></ul><ul><li>In .NET FX 3.5, WF has some WCF integration ...
Services with WF
Summary <ul><li>The Microsoft platform has evolved along with SOAP and its accompanying standards </li></ul><ul><li>Culmin...
Additional Information <ul><li>MSDN Developer Center for Web Services </li></ul><ul><ul><li>http://msdn2.microsoft.com/en-...
MSDN in the UK <ul><li>Visit  http://msdn.co.uk   </li></ul><ul><ul><li>Newsletter </li></ul></ul><ul><ul><li>Events </li>...
 
Upcoming SlideShare
Loading in...5
×

Session 1: The SOAP Story

2,020

Published on


Building Services: .NET FX 3.5, SOAP, REST, and Beyond

Most developers will be aware of various Microsoft technologies to help build SOAP services, the latest of which are WCF and WF in .NET FX 3.5, but there’s another world of services outside SOAP. Recently Microsoft has been very active in its support for, and use of, REST as a mechanism for implementing services. This event will cover recent and forthcoming technologies for building services with SOAP and REST, and we’ll explain REST for the uninitiated.

Agenda:

Session 1: The SOAP Story
In this session we’ll do a lighting quick re-cap of what SOAP is, what specs surround it before looking at how far the SOAP programming model has come in Microsoft’s latest-and-greatest stack – Windows Communication Foundation (WCF) V3.5. We’ll talk about different approaches to building services and we’ll take a good look at the integration between WCF V3.5 and Windows Workflow Foundation (WF) V3.5 which opens up a whole new way of implementing services.

Session 2: Time for a REST
Web applications have evolved; using technologies like AJAX and Silverlight they have rich client-side code that wants to consume services, but they prefer JSON, “plain xml” and REST. In this session we’ll introduce REST for the uninitiated, and we’ll demonstrate some of the new and forthcoming technology that Microsoft has for working with REST: WCF 3.5, Web3S, Windows Live Data, and Codename “Astoria”.

For more details and the original slidedeck visit http://www.microsoft.com/uk/msdn/events/new/Detail.aspx?id=316

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,020
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
68
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Session 1: The SOAP Story

    1. 1. The SOAP Story Martin Parry Developer & Platform Group Microsoft Ltd [email_address] http://martinparry.com
    2. 2. Agenda <ul><li>Definitions </li></ul><ul><li>SOAP through the ages </li></ul><ul><li>SOAP and “standards” </li></ul><ul><li>Approaches to building and using services </li></ul><ul><li>SOAP Services with WCF </li></ul><ul><li>Services and the Workflow Foundation </li></ul>
    3. 3. Definitions <ul><li>SOAP </li></ul><ul><ul><li>Initially: Simple Object Access Protocol </li></ul></ul><ul><ul><li>It’s about services that exchange messages </li></ul></ul><ul><ul><li>The messages are formed from XML </li></ul></ul><ul><ul><li>Each message has headers plus a body </li></ul></ul><ul><li>WSDL </li></ul><ul><ul><li>Describes services and their operations </li></ul></ul><ul><ul><li>Uses XML and schema to describe messages </li></ul></ul>
    4. 4. SOAP on the Microsoft Platform <ul><li>SOAP Toolkit </li></ul><ul><ul><li>NT4, Windows 2000 </li></ul></ul><ul><ul><li>IIS4 or IIS5 </li></ul></ul><ul><ul><li>Based around COM </li></ul></ul><ul><ul><li>Used ISAPI filter </li></ul></ul><ul><ul><li>No longer in mainstream support </li></ul></ul><ul><ul><li>Extended support expires in March 2008 </li></ul></ul>
    5. 5. SOAP on the Microsoft Platform <ul><li>SOAP Toolkit </li></ul><ul><ul><li>NT4, Windows 2000 </li></ul></ul><ul><ul><li>IIS4 or IIS5 </li></ul></ul><ul><ul><li>Based around COM </li></ul></ul><ul><ul><li>Used ISAPI filter </li></ul></ul><ul><ul><li>No longer in mainstream support </li></ul></ul><ul><ul><li>Extended support expires in March 2008 </li></ul></ul>
    6. 6. SOAP on the Microsoft Platform <ul><li>SOAP Moniker </li></ul><ul><ul><li>Introduced in Windows XP Professional </li></ul></ul><ul><ul><li>Scriptable mechanism for invoking web services </li></ul></ul><ul><ul><li>Example vbscript... </li></ul></ul><ul><ul><ul><li>Dim proxy </li></ul></ul></ul><ul><ul><ul><li>Set proxy = GetObject(“soap:wsdl=http://....”) </li></ul></ul></ul>
    7. 7. SOAP on the Microsoft Platform <ul><li>.NET Remoting </li></ul><ul><ul><li>Supports TCP and HTTP transports </li></ul></ul><ul><ul><li>Can use IIS, or not </li></ul></ul><ul><ul><li>Supports SOAP formatting, or binary </li></ul></ul><ul><ul><li>Significant difference: - </li></ul></ul><ul><ul><ul><li>Distributed Object programming paradigm </li></ul></ul></ul><ul><ul><ul><li>As opposed to message passing </li></ul></ul></ul>
    8. 8. SOAP on the Microsoft Platform <ul><li>ASP.NET </li></ul><ul><ul><li>.asmx web services </li></ul></ul><ul><ul><li>“ add web reference” </li></ul></ul><ul><ul><li>Still relies on IIS </li></ul></ul><ul><ul><li>Support in v2.0 for WS-I Basic Profile </li></ul></ul><ul><ul><li>No other “standards” support is built-in </li></ul></ul>
    9. 9. SOAP on the Microsoft Platform <ul><li>Web Services Enhancements </li></ul><ul><ul><li>Now in v3.0 </li></ul></ul><ul><ul><li>Adds support for some WS-* protocols </li></ul></ul><ul><ul><li>Allows non-IIS services </li></ul></ul><ul><ul><li>Allows non-HTTP transport </li></ul></ul>
    10. 10. SOAP on the Microsoft Platform <ul><li>Windows Communication Foundation </li></ul><ul><ul><li>Introduced in .NET FX 3.0 </li></ul></ul><ul><ul><li>Entirely new communications API </li></ul></ul><ul><ul><li>Allows for changes in transports and protocols </li></ul></ul><ul><ul><li>Very extensible </li></ul></ul><ul><ul><li>Can use IIS, or not </li></ul></ul><ul><ul><li>Can use HTTP, or not </li></ul></ul><ul><ul><ul><li>Ships with named pipes, TCP, MSMQ, P2P </li></ul></ul></ul>
    11. 11. “ Standards” <ul><li>WS-Security </li></ul><ul><ul><li>Message-level security </li></ul></ul><ul><li>WS-SecureConversation </li></ul><ul><ul><li>Optimisation for WS-Security </li></ul></ul><ul><li>WS-Policy </li></ul><ul><ul><li>Contractual info not contained in WSDL </li></ul></ul><ul><li>WS-SecurityPolicy </li></ul><ul><ul><li>Policy rules that are specific to security </li></ul></ul><ul><li>WS-Trust </li></ul><ul><ul><li>Defines STS </li></ul></ul>
    12. 12. Approaches – Distributed Objects <ul><li>A long history on the Microsoft platform </li></ul><ul><ul><li>DCOM, .NET Remoting </li></ul></ul><ul><li>Difficulty in managing object lifetimes </li></ul><ul><li>Wisdom of making network transparent? </li></ul><ul><ul><li>Perhaps the developer needs to know? </li></ul></ul><ul><li>Simple, OO paradigm – easy to code against </li></ul>
    13. 13. Approaches – Message Exchange <ul><li>Probably still use a proxy class </li></ul><ul><li>How is message body formed? </li></ul><ul><ul><li>Serialized object graph, or </li></ul></ul><ul><ul><li>Application code emits XML content directly </li></ul></ul><ul><li>SOAP is all about message exchange really </li></ul><ul><ul><li>Just a question of how this appears to the application developer </li></ul></ul><ul><li>Different exchange patterns </li></ul><ul><ul><li>Request/response, one-way, duplex, intermediaries </li></ul></ul>
    14. 14. Approaches - SOA <ul><li>There are multiple definitions of SOA </li></ul><ul><ul><li>Not necessarily tied to web services </li></ul></ul><ul><li>A service performs one standalone piece of the business process </li></ul><ul><ul><li>Participates in message exchange </li></ul></ul><ul><ul><li>No notion of data + behaviour, as in OO </li></ul></ul><ul><ul><li>Should use contract + policy so that clients can be built correctly </li></ul></ul><ul><ul><li>Sometimes see “service brokers” </li></ul></ul>
    15. 15. Interop with other platforms ASMX Attribute- Based Programming Enterprise Services WS-* Protocol Support WSE Message- Oriented Programming System.Messaging Extensibility Location transparency .NET Remoting
    16. 16. Distributed Applications <ul><li>Services pass messages described by a contract </li></ul><ul><li>Service may provide metadata, describing: - </li></ul><ul><ul><li>The contract </li></ul></ul><ul><ul><li>The policy applied to communication </li></ul></ul>“ Client” Message Message “ Service” Metadata Message (SOAP) Headers: Addressing, Security, etc. Body: Payload
    17. 17. Mechanics of Communication What do I send? Where do I send it? How should I send it? Contract Address Binding “ Service” “ Client” Transport? Encoding? Security?
    18. 18. Mechanics of Communication “ Service” “ Client” Endpoint Contract Binding Address Endpoint Contract Binding Address Endpoint Contract Binding Address
    19. 19. Contracts [ServiceContract] public interface INuggetAccess { [OperationContract] string[] GetTopics(); } .NET Interface “ Service” “ Client” <definitions> … <portType> <operation name=“GetTopics”> … </portType> </definitions> WSDL svcutil.exe [ServiceContract] public interface INuggetAccess { [OperationContract] string[] GetTopics(); } public class NuggetAccessService : INuggetAccess { string[] GetTopics() { } } Implements Consumes request metadata (WSDL)
    20. 20. Richness of metadata <ul><li>Service can advertise a lot of info to a client </li></ul><ul><ul><li>WSDL </li></ul></ul><ul><ul><li>WS-Policy (security etc) </li></ul></ul><ul><li>Can do so over </li></ul><ul><ul><li>HTTP </li></ul></ul><ul><ul><li>WS- MetadataExchange </li></ul></ul><ul><li>Makes building “clients” a lot simpler </li></ul>Contracts Endpoints Service
    21. 21. Contract Details <ul><li>Message exchange might be: - </li></ul><ul><ul><li>One-way, Request/Response, Two-way (Duplex) </li></ul></ul><ul><li>WCF also supports serialization models from .NET 2.0 </li></ul><ul><ul><li>System.Xml.XmlSerialization, System.Runtime.Serialization </li></ul></ul>[ ServiceContract ] public interface INuggetAccess { [ OperationContract ] List<TopicInfo> GetTopics(); } Service [ DataContract (Namespace=…)] public class TopicInfo { [ DataMember ] public int Id } Data [ MessageContract ] public class TypedMessage { [ MessageBody ] [ MessageHeader ] } Message
    22. 22. Hosting Services public class Service : INuggetAccess { string[] GetTopics() { } } IIS <%@ ServiceHost Service=“Service&quot; %> NuggetAccessService.svc References <ul><li>ServiceHost is the key class for hosting </li></ul><ul><ul><li>Needs manual steps in your host application </li></ul></ul><ul><ul><li>Automatically done by IIS when provided with a .svc file </li></ul></ul><ul><li>IIS handles additional transports in v7.0 </li></ul>MyApp.exe ServiceHost host = new ServiceHost(); host.Open();
    23. 23. Windows Communication Foundation
    24. 24. WCF – sketched architecture Your code Your code Client Binding (ordered list of channel types & config) channel type N channel type 2 channel type 1 config config config Service Metadata formatting channel channel channel Transport Channel (HTTP, TCP, MSMQ, Pipes, Peer) channel channel channel decoding encoding behaviours behaviours
    25. 25. Standard Framework Bindings <ul><li>Pre-built set in the framework </li></ul><ul><ul><li>WS-I Basic Profile </li></ul></ul><ul><ul><li>WS-* on HTTP </li></ul></ul><ul><ul><li>TCP </li></ul></ul><ul><ul><li>Named Pipes </li></ul></ul><ul><ul><li>MSMQ </li></ul></ul><ul><ul><li>Peer </li></ul></ul><ul><li>Configure/code your own as a &quot;custom&quot; binding </li></ul>Binding Transactions Reliability Security channels Configuration Configuration Configuration Transport Configuration
    26. 26. Instancing, Concurrency, Sessions <ul><li>Service classes can be instantiated: - </li></ul><ul><ul><li>Singleton, Per-Call, Per-Session, Shareable </li></ul></ul><ul><li>Service code can be either: - </li></ul><ul><ul><li>Single threaded, Re-entrant or Multi-threaded </li></ul></ul>Client Service Singleton Message B Message C Message A
    27. 27. Instancing, Concurrency, Sessions <ul><li>Service classes can be instantiated: - </li></ul><ul><ul><li>Singleton, Per-Call, Per-Session, Shareable </li></ul></ul><ul><li>Service code can be either: - </li></ul><ul><ul><li>Single threaded, Re-entrant or Multi-threaded </li></ul></ul>Client Service Single Call Single Call Single Call Message B Message C Message A
    28. 28. Instancing, Concurrency, Sessions <ul><li>Service classes can be instantiated: - </li></ul><ul><ul><li>Singleton, Per-Call, Per-Session, Shareable </li></ul></ul><ul><li>Service code can be either: - </li></ul><ul><ul><li>Single threaded, Re-entrant or Multi-threaded </li></ul></ul>Client Service Per Session Message B Message A session Per Session Message C
    29. 29. Security in WCF – Out of the box <ul><li>Transport Level </li></ul><ul><ul><li>HTTPS </li></ul></ul><ul><ul><li>IIS authentication modes </li></ul></ul><ul><li>Message Level </li></ul><ul><ul><li>UserName, X.509 Certificate, Windows </li></ul></ul><ul><ul><li>IssuedToken – that is, federated security </li></ul></ul><ul><li>ASP.NET membership and role providers </li></ul>
    30. 30. Security in WCF - Extensibility <ul><li>Roll your own </li></ul><ul><ul><li>Username validator </li></ul></ul><ul><ul><li>Token validator </li></ul></ul><ul><ul><li>Credential types </li></ul></ul><ul><ul><li>Security Token Service </li></ul></ul><ul><ul><li>SAML claims </li></ul></ul><ul><ul><li>Etc... </li></ul></ul>
    31. 31. Federated Security with WCF
    32. 32. WCF in .NET FX 3.5 <ul><li>Most of the new stuff isn’t SOAP </li></ul><ul><ul><li>We’ll see some of that in the next session </li></ul></ul><ul><li>Client proxies and partial trust environments </li></ul><ul><li>Durable services </li></ul><ul><li>Coming together with Workflow </li></ul>
    33. 33. Partial Trust <ul><li>Now possible to call through WCF proxies in a partial trust environment </li></ul><ul><li>Various caveats </li></ul><ul><ul><li>Transport is HTTP only, Security is HTTPS only </li></ul></ul><ul><ul><li>Encodings is all except MTOM </li></ul></ul><ul><ul><li>Bindings are BasicHttpBinding, WsHttpBinding, WebHttpBinding* </li></ul></ul><ul><ul><li>Other limitations </li></ul></ul><ul><ul><ul><li>No Reliable Messaging, Transactions, Secure Conversation </li></ul></ul></ul>
    34. 34. Durable Services <ul><li>Provider-based framework for easily adding long-running abilities to WCF services </li></ul>client Host (e.g. IIS) implementation state response + token initial call serialize and store state token
    35. 35. Durable Services <ul><li>Provider-based framework for easily adding long-running abilities to WCF services </li></ul>client Host (e.g. IIS) implementation state second call + token load and deserialize state token
    36. 36. Workflow <ul><li>WF is not strictly about services, or SOAP </li></ul><ul><li>In .NET FX 3.5, WF has some WCF integration </li></ul><ul><li>A workflow can consume services </li></ul><ul><li>We can implement a service as a workflow </li></ul>
    37. 37. Services with WF
    38. 38. Summary <ul><li>The Microsoft platform has evolved along with SOAP and its accompanying standards </li></ul><ul><li>Culminating in WCF </li></ul><ul><ul><li>The most flexible, extensible communications stack we’ve ever produced </li></ul></ul>
    39. 39. Additional Information <ul><li>MSDN Developer Center for Web Services </li></ul><ul><ul><li>http://msdn2.microsoft.com/en-gb/webservices/default.aspx </li></ul></ul><ul><li>“ Standards” </li></ul><ul><ul><li>http://www.w3.org </li></ul></ul><ul><ul><li>http://www.ws-i.org </li></ul></ul><ul><ul><li>http://www.oasis-open.org </li></ul></ul><ul><li>SOA </li></ul><ul><ul><li>http://www.opengroup.org/projects/soa </li></ul></ul><ul><ul><li>http://wiki.oasis-open.org/soa-rm </li></ul></ul><ul><li>WCF </li></ul><ul><ul><li>http://netfx3.com/content/WCFHome.aspx </li></ul></ul><ul><li>WF </li></ul><ul><ul><li>http://netfx3.com/content/WFHome.aspx </li></ul></ul>
    40. 40. MSDN in the UK <ul><li>Visit http://msdn.co.uk </li></ul><ul><ul><li>Newsletter </li></ul></ul><ul><ul><li>Events </li></ul></ul><ul><ul><li>Screencasts </li></ul></ul><ul><ul><li>Blogs </li></ul></ul>
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×