web services deep dive - yuridownload.microsoft.com/.../web_services_deep_dive.pdfenterprise...
TRANSCRIPT
Web Services Deep DiveWeb Services Deep Dive
Yuri Misnik
Developer and Platform Advisor
Microsoft Asia Pacific
Session ObjectivesSession Objectives
�Motivation of web services
�Web services basic: SOAP, WSDL, UDDI
�Web services specifications
�Microsoft’s web service implementations
� Microsoft Web Service Roadmap
� Web Services Toolkit: Web Service Enhancement 2.0
� Indigo Web Service Stack
The The ““RealityReality”” EnterpriseEnterprise
Customer Service
Supply Chain
ERP Human Resource
Financial Services
Customers Partners Employees
Key to integration nightmare is loose Key to integration nightmare is loose
coupling coupling
Messages
Agreements
Programming
Language
Object Model
Application
Server
Database
Operating
System
Database
Operating
System
Programming
Language
Object Model
Application
Server
Application 1 Application 2
Example of a tightly coupled solutionService Oriented Architecture
Session ObjectivesSession Objectives
�Motivation of Web Service
�Web Services Basic: SOAP, WSDL, UDDI
�Web Services Specifications
�Microsoft Web Service Implementations
� Microsoft Web Service Roadmap
� Web Services Toolkit: Web Service Enhancement 2.0
� Indigo Web Service Stack
So what really is web servicesSo what really is web services
LogicLogic
StateState
ServiceService
LogicLogic
StateState
MessageMessage
PolicyPolicy
Unit of information Unit of information
transmitted from one transmitted from one
service to another.service to another.
Binding agreement on the Binding agreement on the
format & how is sent.format & how is sent.
Rules that governs the Rules that governs the
runrun--time behavior of time behavior of
servicesservices
Data at the current point in Data at the current point in
timetime..
ContractContract
consumerconsumer
Behaviour of the Behaviour of the
serviceservice
So what really are Web ServicesSo what really are Web Services
Network and Transport Protocols
TCP/IP, HTTP, HTTPS, FTP, SMTP
Data Representation
XML
Service Description
WSDL
Discovery and Publication
UDDI
Data Exchange Protocols
SOAP
Network and Transport Protocols
TCP/IP, HTTP, HTTPS, FTP, SMTP
Data Representation
XML
Service Description
WSDLDiscovery and Publication
UDDI
Data Exchange Protocols
SOAP
Service Description
Describes a particular Web Service.
WSDL (Web Services Description Language pronounced ‘Wizdl’)
is a language within which web services can define themselves,
and is the key to service description.
WSDL uses XML (Extensible Markup Language) to fully describe
a Web service, including response expectations, transport
protocols, and the Web address.
Discovery and Publication
As we have seen a Web service listing. It is then sent to a
registry for registration as an ‘available service’. A means of
publishing, discovering and integrating a Web service. is
achieved through UDDI (Universal Description, Discovery and
Integration), an industry-standard, centralized directory
service that enables searching for Web services using a
number of criteria
Data Exchange
Protocols
To enable
communication
between Web
Services in a
common manner,
SOAP (Simple
Object Access
Protocol) is used.
SOAP structures the
interaction between
Web Services, and
is the key to making
them work.
Data
Representation
Possible through,
XML, which provides
a common language
enabling information
to be shared without
forcing a single,
standard format.
XML is at the core of
Web Services,
enabling the pieces
to work together an
open and non-
proprietary manner.
Network and Transport Protocols
Data has to ‘physically’ move from one system to another. This is done through a transport protocol. The transport protocol resides on
a network protocol, which can be thought of as the medium through which the transport protocol Today, Internet protocols such as
HTTP and SMTP are proven, effective, and accepted, as are the network protocols such as TCP/IP on which they travel.
SOAP (Simple Object Access Protocol)SOAP (Simple Object Access Protocol)Defining the message structureDefining the message structure
� SOAP is a lightweight protocol intended for
exchanging structured information in a
decentralized, distributed environment.
� SOAP uses XML technologies to define an
extensible messaging framework, which provides
a message construct that can be exchanged over
a variety of underlying protocols.� E.g. of underlying protocols are HTTP & SMTP
SOAP Message The complete SOAP MessageThe complete SOAP Message
SOAP Envelope <Envelope> encloses payload<Envelope> encloses payload
SOAP Header <Header> encloses headers<Header> encloses headers
SOAP Body<Body> contains SOAP<Body> contains SOAP
Message Name & DataMessage Name & Data
Message Name & Data XML Encoded SOAPXML Encoded SOAP
Message Name & DataMessage Name & Data
Headers Individual headersIndividual headers
Protocol Headers Standard Protocol (HTTP, SMTP, etc.)Standard Protocol (HTTP, SMTP, etc.)
SOAP Message EnvelopeSOAP Message Envelope
SOAP MessagingSOAP Messaging
XML
Message
SOAP Client
Proxy
“Client” “Server”
SOAP
Server
Listener
WSDL (Web Services Descriptive Language)WSDL (Web Services Descriptive Language)Describes message interface and parameters Describes message interface and parameters
acceptable by web serviceacceptable by web service
� The Web Services Description Language (WSDL) is an XML
format for describing the network services offered by the
server.
� Describe the incoming and outgoing messages’ interface
and parameters acceptable by the web services
UDDI (Universal Description & Discovery UDDI (Universal Description & Discovery
Interface)Interface)Defines how to publish & find web servicesDefines how to publish & find web services
� UDDI is a public registry designed to house/organize information about businesses and their services in a structured way.
� Through UDDI, one can publish and discover information about a business and its Web Services.
� UDDI Server provides the following web services
� Publish web services
� Find web services
Creating ASPX Web Services Creating ASPX Web Services using VS.NETusing VS.NET
demodemo
Session ObjectivesSession Objectives
�Motivation of Web Service
�Web Services Basic: SOAP, WSDL, UDDI
�Web Services Specifications
�Microsoft Web Service Implementations
� Microsoft Web Service Roadmap
� Web Services Toolkit: Web Service Enhancement 2.0
� Indigo Web Service Stack
Moving beyond the basic..Moving beyond the basic..
SecuritySecurity
Reliable MessagingReliable Messaging
SOAP MessagesSOAP Messages
RoutingRouting
TransactionsTransactions
ServiceService
Web Services ArchitectureWeb Services Architecture
Foundation
Applications
& Application
Infrastructure
Transports
Connected Connected
ApplicationsApplications ManagementManagementBusinessBusiness
ProcessProcess……
SecuritySecurity ReliabilityReliability TransactionsTransactions
MessagingMessaging
XMLXML
Metadata
Metadata
HTTPHTTP TCPTCP SMTPSMTP ……
WSWS--* Specification Process* Specification Process
Specification
Published
Feedback and
Interop
Workshops
Revise spec Standards Org WS-I
Comprehensive end-to-end approach
Process reconciles conflicting goals
• Quality of engineering
• Time to market
• Breadth of industry support
WSWS--* Workshops Status* Workshops Status
2H 2004 *WMX
2H 2004 *15Nov-03WS-Federation Active Profile
2H 2004 *Devices Profile
4Nov-03
2H 2004 *
15
14
Feb-03
Mar-03
WS-Trust
2H 2004 *16Mar-04WS-Transactions
4Nov-03
2H 2004 *
15Feb-03WS-Secure Conversation
7
4
Oct-03
May-04
11Jul-03WS-Reliable Messaging
2H 2004 *15
14
Feb-03
Mar-03
WS-Policy
7Mar-0415Nov-03WS-Federation Passive Profile
7Apr-0418Feb-04WS-Eventing
2H 2004 *12May-04WS-Discovery
ImplementationsImplementationsImplementationsImplementations
InteroperabilityInteroperabilityInteroperabilityInteroperability
WorkshopsWorkshopsWorkshopsWorkshopsCompaniesCompaniesCompaniesCompanies
FeedbackFeedbackFeedbackFeedback
WorkshopsWorkshopsWorkshopsWorkshopsSpecSpecSpecSpec
* Expected
http://msdn.microsoft.com/webservices/community/workshops/
Session ObjectivesSession Objectives
�Motivation of Web Service
�Web Services Basic: SOAP, WSDL, UDDI
�Web Services Specifications
�Microsoft Web Service Implementations
� Microsoft Web Service Roadmap
� Web Services Toolkit: Web Service Enhancement 2.0
SOAP SOAP
Tool KitTool Kit
.NET .NET
FrameworkFramework
Web ServicesWeb Services
EnhancementsEnhancements
IndigoIndigo
Beta 1Beta 1
Beta 2Beta 2
(? Go Live)(? Go Live)
V1.0V1.0
LonghornLonghorn
V1.0V1.0
V2.0V2.0
V3.0V3.0
V1.0V1.0
V1.1V1.1
V2.0V2.0
SDKSDK
V1.0V1.0
V2.0V2.0
V3.0V3.0
Microsoft Web Services Tools Microsoft Web Services Tools
RoadmapRoadmap
Web Services Enhancements (WSE)Web Services Enhancements (WSE)
� Supported add-on to Visual Studio and the .NET Framework
with the latest advanced Web service capabilities
� Greatly simplifies development of secure Web services across
multiple intermediaries and trust domains
� Additional features include support for multiple hosting
environments, alternative transports, and message routing
� Revs more quickly than Visual Studio to provide early
implementations of the latest WS-* specifications published by
Microsoft and industry partners
� Deployed and in production in numerous enterprise accounts
today
� Download from http://msdn.microsoft.com/webservices
WSE v2.0 FeaturesWSE v2.0 Features
� Web Services Security
� Digital Signing and Encryption (WS-Security)
� Trust Issuing Framework & Secure Conversation (WS-Trust, WS-SecureConversation)
� Integration with Windows Authentication and Authorization
� X509, Custom Binary, Username/Password, Kerberos, and XML Security Token Support
� Roles based authorization with native integration with Windows security
� Policy support to describe integrity, confidentiality, and token requirements for
communicating with WS endpoints (WS-SecurityPolicy)
� Policy driven architecture (WS-Policy)
� SOAP Messaging (WS-Addressing)
� Message-based programming model
� Hosting environment independence
� Support for multiple transports (HTTP, TCP)
� Content based routing
� Attachments
� Extensible framework
Web Services Interoperability (WSI)Web Services Interoperability (WSI)
Transports HTTP
XML XML, XSD, XPath
Messaging SOAP, WS-Addressing, WS-Eventing
SecurityWS-SecurityWS-Trust
WS-Federation
ReliabilityWS-ReliableMessaging
TransactionsWS-TransactionsWS-Coordination
WS-AtomicTranscation
Metadata
WSDL, WS-Policy,
WS-Discovery
Sending a message through Sending a message through
WSE toolkit from the clientWSE toolkit from the client……
User Code
WSE Runtime
SOAP
Context
SOAP
Custom filters
Attachment
Security
Routing
Creating Secure Web Services Creating Secure Web Services using WSE 2.0using WSE 2.0
demodemo
Windows CommunicationWindows Communication
� Enables service-oriented development
� Advanced web services
� Secure, reliable, transacted,
asynchronous
� Heterogeneous interoperability
� Powerful messaging engine
� Simplifies building services
� Programming model extends existing
capabilities
What is Indigo?What is Indigo?
� a unified programming model and communications infrastructure for developing connected systems
� the best features of .NET Remoting, ASMX, System.Messaging and .NET Enterprise Services into a unified programming and administration model
� deep support for standards - including XML, SOAP, WSDL, and WS-* -makes it easier to integrate applications and services without sacrificing security or reliability
Indigo <> SOA; Indigo <> SOA;
Indigo <> WSIndigo <> WS
� Indigo is Microsoft’s framework for building connected applications on
SOA principles.
� But you could build OTHER things with Indigo features (transactions,
serialization)
� Just using Indigo doesn’t get you SOA!
� Still need to adhere to the tenets
� Indigo uses WS-* for wire Interop
� Offers tremendous value beyond wire Interop
� And is much more than a protocol stack
IndigoIndigo
Indigo and UnificationIndigo and Unification
ASMXASMX .NET Remoting.NET Remoting Enterprise ServicesEnterprise Services
Simple Simple ConfigConfig
InteroperableInteroperable
ServiceService--OrientedOriented
AttributesAttributes
TransactionsTransactions
ComponentsComponents
Broad VisionBroad Vision
ExtensibilityExtensibility
ObjectObject--OrientedOriented
Indigo will superset of the features of our existing stacksIndigo will superset of the features of our existing stacks
System.MessagingSystem.Messaging
QueuingQueuing
Reliable Reliable MsgMsg
Durable Durable MsgMsg
Indigo FeaturesIndigo Features
IndigoIndigo
Simple, unified, capabilities based programming model for Simple, unified, capabilities based programming model for
Secure, Reliable, Transacted, Interoperable ServicesSecure, Reliable, Transacted, Interoperable Services
Turnkey functionality for implementing Queues, Turnkey functionality for implementing Queues, PubsubPubsub, Routing, , Routing,
Discovery . . . Discovery . . .
Unified hosting, configuration, tracingUnified hosting, configuration, tracing
Support for all SOA tenets on WSSupport for all SOA tenets on WS--* standards * standards ––
Contract, Schema, PolicyContract, Schema, Policy
Scales up to server farms, down to devicesScales up to server farms, down to devices
Great migration from and interoperability with existing stacksGreat migration from and interoperability with existing stacks
Indigo ArchitectureIndigo ArchitectureDetailDetail
Messaging Services
ApplicationApplication
Queuing Routing Eventing Discovery
Service ModelService ModelService ModelService Model
Instance Manager
Context Manager
TypeIntegration
DataContract
DeclarativeBehaviors
TransactedMethods
MessagingMessagingMessagingMessaging
Transport Channels (IPC, HTTP, TCP…)
Channels (Datagram, Reliable, Peer, …)Policy Engine
Message Encoder
Channel Security
Hosting EnvironmentsHosting EnvironmentsHosting EnvironmentsHosting Environments
ASP.NET Avalon .exe NT Service COM+
Ports, Channels, Services, Ports, Channels, Services,
and Messagesand Messages
Port
Service
Service
Message
Channel
Channel
Service
ServiceChannel
Secure, Reliable, TransactedSecure, Reliable, Transacted
class HelloService {
[WebMethod]public String Hello(String Greeting) {
X509CertificateCollection collection = new X509CertificateCollection();IntPtr blob = Marshal.AllocHGlobal(Marshal.SizeOf(
typeof(CRYPTOAPI_BLOB))); IntPtr data = (IntPtr)((int)blob + Marshal.SizeOf(typeof(CRYPTOAPI_BLOB)));
…
SeqAckRange range = new SeqAcknRange(id, low, high );SeqAckRange[] ranges = { range };ReliableQueue.ProcessAcks( ranges );…
hr = pITxDispenser->BeginTransaction (NULL, ISOLATIONLEVEL_SERIALIZABLE, 0, pITxOptions, &pITransaction);
…
return Greeting; }
}
20,379 lines security
5,988 linesreliable messaging
25,507 lines transactions
Total lines 56,296
4,442 lines infrastructure
Secure, Reliable, TransactedSecure, Reliable, Transacted
class HelloService {
[WebMethod]public String Hello(String Greeting) {
foreach ( SecurityToken tok in requestContext.Security.Tokens )
{X509SecurityToken token = tok as X509SecurityToken
}
…SeqAckRange range = new SeqAcknRange(id, low, high );SeqAckRange[] ranges = { range };ReliableQueue.ProcessAcks( ranges );…
hr = pITxDispenser->BeginTransaction (NULL, ISOLATIONLEVEL_SERIALIZABLE, 0, pITxOptions, &pITransaction);
…
return Greeting; }
}
10 lines security
Total lines 27,321
1,804 lines reliable messaging
25,507 lines transactions
Secure, Reliable, TransactedSecure, Reliable, Transacted
[Confidentiality][Reliability(Guarantees.ExactlyOnce | Guarantees.InOrder)][Service]class HelloService {
[TransactionCoupling(TransactionCouplingOptions.Required)][ServiceMethod]String Hello(String Greeting) {
return Greeting; }
}
1 line security
1 line reliable messaging
1 line transactions
Total lines3
ASMXASMX
�ASMX is Microsoft’s Recommended Fx for
developing Web Services today
�ASMX gives great support for formal contract
and schema expression (WSDL)
�ASMX doesn’t natively support the WS-*
protocol family
�ASMX can be combined with WSE to get WS-
* support
.Net.Net--RemotingRemoting
�.Net Remoting is a easy to use object remoting technology.
�It requires tightly coupled implementation between participants, and is therefore particularly unsuited to SOA boundary implementation.
�It is a reasonable technology to use for cross app-domain communication within the service boundary.
�DON’T USE XPROCESS/XMACHINE� Use ASMX or ES
Enterprise ServicesEnterprise Services
�ES offers rich enterprise system features.
�ES is the programming model that will most
resemble the Indigo programming model.
�ES uses DCOM as its communication protocol.
� DCOM is not suitable for spanning trust boundaries
� It is tightly coupled enough (because you have
proxies/stubs) that you should avoid using it cross
machine.
� COM+ relies on closely coupled participant systems, and
is unsuitable for expression of service boundaries. It is
fine for use within a service boundary.
MSMQMSMQ
�MSMQ is Microsoft’s Message Queuing technology
�Performant, reliable, durable messaging
�Rich administrative support
�Proven model
�No language for schema, contract, policy
� These are intuited, not interpreted
�Great to use within a service boundary
� Build services using ASMX
� Enhance your ASMX service with WSE if you need the WSE feature
set and you can accept the support policy
� Use object technology in a service’s implementation
� Use Enterprise Services if
� You need ES rich feature set
� You are communicating between components on the local
machine and have performance issues with ASMX or WSE
� Use .NET Remoting if
� You need to integrate with an existing proprietary protocol
� You are communicating in-process, cross app domain
� Use System.Messaging if you need the reliable messaging
and queuing features in MSMQ
TodayToday’’s Prescriptive Guidances Prescriptive Guidance
http://microsoft.sitestream.com/PDC2003/WSV/WSV203_files/Botto_files/WSV203_Mills_Long.ppt
� ASMX � Avoid or abstract using low-level extensibility such as the
HTTP Context object
� .NET Remoting� Avoid or abstract using low-level extensibility such as
.NET Remoting sinks and channels
� Enterprise Services� Avoid passing object references inside of ES
� Do not use COM+ APIs – use System.EnterpriseServices
� Do not use MSMQ APIs – use System.Messaging
TodayToday’’s Caveatss Caveats
http://microsoft.sitestream.com/PDC2003/WSV/WSV203_files/Botto_files/WSV203_Mills_Long.ppt
�Motivation of Web Service
�Web Services Basic: SOAP, WSDL, UDDI
�Web Services Specifications
�Microsoft Web Service Implementations
�Microsoft Web Service Roadmap
�Web Services Toolkit: Web Service Enhancement
2.0
� Indigo Web Service Stack
SummarySummary
Where can I get more information?Where can I get more information?
�Microsoft External ContentMicrosoft External ContentMicrosoft External ContentMicrosoft External Content� Microsoft Web Service Developer CenterMicrosoft Web Service Developer CenterMicrosoft Web Service Developer CenterMicrosoft Web Service Developer Center
� http://www.microsoft.com/webservices� Patterns & PracticesPatterns & PracticesPatterns & PracticesPatterns & Practices
� http://www.microsoft.com/resources/practiceshttp://www.microsoft.com/resources/practiceshttp://www.microsoft.com/resources/practiceshttp://www.microsoft.com/resources/practices� MSDN SiteMSDN SiteMSDN SiteMSDN Site
� http://www.msdn.microsoft.com� .Net Community Site.Net Community Site.Net Community Site.Net Community Site
� http://www.gotdotnet.com
© 2004 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.