20
Web Services Web Services (ASMX 2.0 and WSE 3.0) (ASMX 2.0 and WSE 3.0) Mike Taulty Mike Taulty Developer & Platform Group Developer & Platform Group Microsoft Ltd Microsoft Ltd [email protected] [email protected] http://mtaulty.com http://mtaulty.com

Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd [email protected]

  • View
    217

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

Web ServicesWeb Services(ASMX 2.0 and WSE 3.0)(ASMX 2.0 and WSE 3.0)

Mike TaultyMike TaultyDeveloper & Platform GroupDeveloper & Platform GroupMicrosoft LtdMicrosoft [email protected]@microsoft.comhttp://mtaulty.comhttp://mtaulty.com

Page 2: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

Distributing CodeDistributing Code

CodeMoreCode

messagemessage

MessageMessageContractContract

Page 3: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

Messaging with Web Messaging with Web ServicesServices

MoreCode

SOAPSOAP

XMLXML

ProtocolProtocol HTTPHTTP

Code

SOAPSOAP

XMLXML

WSDLWSDLContractContract

XSDXSD

TypesTypes

Page 4: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

Messaging with Web Messaging with Web ServicesServices

MoreCode

ProtocolProtocol HTTPHTTP

Code

RepresentationRepresentation XMLXML

PackagingPackaging SOAPSOAP

DescriptionDescription WSDL + XSDWSDL + XSD

Page 5: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

ASP.NET Web ServicesASP.NET Web Services

Declarative model – driven by .NET Declarative model – driven by .NET attributesattributes

.NET class methods exposed as web .NET class methods exposed as web servicesservices

Key attributes Key attributes WebMethod, WebServiceWebMethod, WebService

Developer writes a .ASMX text file for a service Developer writes a .ASMX text file for a service which points to the class providing which points to the class providing implementationimplementation

Xml SerializationXml SerializationXML->Parameters->Return Values->XMLXML->Parameters->Return Values->XML

SOAP, WSDL automatically producedSOAP, WSDL automatically produced

Tools for generating web service proxy Tools for generating web service proxy classesclasses

Page 6: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

ASMX Version 2.0ASMX Version 2.0

Evolutionary enhancements to the Evolutionary enhancements to the existing V1.1 versionexisting V1.1 version

Interface based developmentInterface based development

WS-I Basic Profile complianceWS-I Basic Profile compliance

SOAP 1.2 supportSOAP 1.2 support

XML Serialization improvementsXML Serialization improvementsGenericsGenerics

Custom serializationCustom serialization

Page 7: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

Connected Applications

Messaging

XML

Transports

Secure Reliable Transacted

Meta

data

Management Business

Process

Beyond Simple Beyond Simple Messaging…Messaging…

Devices Mobile

P2P EAI B2B Grid

Page 8: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

Connected Applications

Messaging

XML

Transports

Secure Reliable Transacted

Meta

data

Management Business

Process

How does ASP.NET Stack How does ASP.NET Stack Up?Up?

Devices Mobile

P2P EAI B2B GridASP.NETASP.NET

Page 9: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

Web Services Web Services EnhancementsEnhancements

Addition to VS.NET 2003 and .NET Addition to VS.NET 2003 and .NET Framework V1.1Framework V1.1

Provides new messaging Provides new messaging functionality;functionality;

Addressing, Security, PolicyAddressing, Security, Policy

Plugs into ASMX HTTP web servicesPlugs into ASMX HTTP web services

Obtaining…Obtaining…Download V2.0 Sp 3 from MSDNDownload V2.0 Sp 3 from MSDN

Support is as for .NET Framework 1.1Support is as for .NET Framework 1.1

Page 10: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

WSE 3.0WSE 3.0

Addition to Visual Studio 2005 Addition to Visual Studio 2005 and .NET Framework V2.0and .NET Framework V2.0

Evolutionary enhancements to V2.0Evolutionary enhancements to V2.0ASMX programming model over TCPASMX programming model over TCP

Simplified security and policySimplified security and policy

MTOM support for optimising MTOM support for optimising transmission of binary datatransmission of binary data

Wire interoperability with “Indigo”Wire interoperability with “Indigo”

Preview version available (June)Preview version available (June)

Page 11: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

Connected Applications

Messaging

XML

Transports

Secure Reliable Transacted

Meta

data

Management Business

Process

How does WSE 3.0 Stack How does WSE 3.0 Stack Up?Up?

Devices Mobile

P2P EAI B2B GridWSE 3.0WSE 3.0

Page 12: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

Building services with ASMX Building services with ASMX 2.0 and WSE 3.02.0 and WSE 3.0

Page 13: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

SummarySummary

What have we just seen?What have we just seen?ASMX V2.0ASMX V2.0

Interface based development in ASMX 2.0Interface based development in ASMX 2.0

Custom and generics serialization Custom and generics serialization

WS-I Basic Profile ComplianceWS-I Basic Profile Compliance

WSE V3.0WSE V3.0Transmission of binary data with MTOMTransmission of binary data with MTOM

Hosting of ASMX services over TCPHosting of ASMX services over TCP

Securing web services with WS-SecuritySecuring web services with WS-Security

Page 14: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

ResourcesResources

Web Services UrlsWeb Services Urlshttp://msdn.microsoft.com/webserviceshttp://msdn.microsoft.com/webservices

http://msdn.microsoft.com/webservices/http://msdn.microsoft.com/webservices/understanding/default.aspxunderstanding/default.aspx

http://msdn.microsoft.com/Longhorn/http://msdn.microsoft.com/Longhorn/understanding/pillars/Indigo/default.aspxunderstanding/pillars/Indigo/default.aspx

http://www.microsoft.com/uk/msdn/http://www.microsoft.com/uk/msdn/events/nuggets.aspxevents/nuggets.aspx

Page 15: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

© 2004 Microsoft Limited. All rights reserved.© 2004 Microsoft Limited. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summaryThis presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary..

Page 16: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

A managed API for building and running A managed API for building and running service-oriented applicationsservice-oriented applications

Extends the .NET Framework 2.0Extends the .NET Framework 2.0

Ships in the “Longhorn timeframe” – 2006, Ships in the “Longhorn timeframe” – 2006, preview available today

Runs on Windows XP, Windows Server Runs on Windows XP, Windows Server 2003 and Windows “Longhorn”2003 and Windows “Longhorn”

““Indigo”Indigo”

Page 17: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

WS-*WS-*ProtocolsProtocols

InteropInteropwith otherwith otherplatformsplatforms

Attribute-Attribute-BasedBased

ProgrammingProgramming

Message-Message-OrientedOriented

ProgrammingProgramming

ExtensibilityExtensibilityLocation Location

transparencytransparency

Unifying today’s many Unifying today’s many stacks…stacks…

Page 18: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

Whilst interoperating…Whilst interoperating…

Transports HTTP Transports HTTP

XML XML, XSD, XPath XML XML, XSD, XPath

Messaging SOAP, WS-Addressing, WS-EventingMessaging SOAP, WS-Addressing, WS-Eventing

SecurityWS-Security

WS-TrustWS-Federation

SecurityWS-Security

WS-TrustWS-Federation

ReliabilityWS-ReliableMessaging

ReliabilityWS-ReliableMessaging

TransactionsWS-TransactionsWS-Coordination

TransactionsWS-TransactionsWS-Coordination

Met

adat

aW

SD

L,

WS

-Po

licy

, W

S-D

isco

very

Met

adat

aW

SD

L,

WS

-Po

licy

, W

S-D

isco

very

Page 19: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

[ServiceContract(SecureChannel, SecurityMode =“Windows")][ServiceContract(SecureChannel, SecurityMode =“Windows")][Reliability(Guarantees.ExactlyOnce | Guarantees.InOrder)][Reliability(Guarantees.ExactlyOnce | Guarantees.InOrder)][ServiceContract][ServiceContract]class HelloService class HelloService { { [ServiceOperation(TransactionFlowAllowed = true)][ServiceOperation(TransactionFlowAllowed = true)] String Hello(String Greeting) String Hello(String Greeting) { { return Greeting; return Greeting; }}}}

1 line 1 line securitysecurity

1 line 1 line reliable reliable

messagingmessaging

1 line 1 line transactionstransactions

Total linesTotal lines 33

And being productive…And being productive…Secure, Reliable, Transacted Application Secure, Reliable, Transacted Application DevelopmentDevelopment

……Using Using Visual Studio 2005Visual Studio 2005 and and IndigoIndigo

Page 20: Web Services (ASMX 2.0 and WSE 3.0) Mike Taulty Developer & Platform Group Microsoft Ltd mtaulty@microsoft.com

Connected Applications

Messaging

XML

Transports

Secure Reliable Transacted

Meta

data

Management Business

Process

How Does “Indigo” Stack How Does “Indigo” Stack Up?Up?

Devices Mobile

P2P EAI B2B Grid““Indigo”Indigo”