ebook img

Expert Service-Oriented Architecture in C#: Using the Web Services Enhancements 2.0 PDF

322 Pages·2004·7.217 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Expert Service-Oriented Architecture in C#: Using the Web Services Enhancements 2.0

Expert Service-Oriented Architecture in C# Using the Web Services Enhancements 2.0 JEFFREYHASAN APress Media, LLC Expert Service-Oriented Architecture in C#: Using the Web Services Enhancements 2.0 ISBN978-1-59059-390-5 ISBN978-1-4302-0747-4 (eBook) DOI10.1007/978-1-4302-0747-4 Copyright ©2004 by Jeffrey Hasan OriginallypublishedbyApressin2004. Allrightsreserved.Nopartofthisworkmaybereproducedortransmittedinanyform orbyany means, electronicormechanical,includingphotocopying,recording,orbyanyinformationstorage orretrievalsystem,withoutthepriorwrittenperrnissionofthecopyrightownerand thepublisher. Trademarkednamesmayappearinthis book. Ratherthanuse atrademarksymbolwithevery occurrenceofatrademarkedname,weuse the namesonlyinan editorialfashionandtothe benefitofthetrademarkowner,with nointentionofinfringementofthe trademark. LeadEditor:EwanBuckingham TechnicalReviewers:MauricioDuran,FemandoGutierrez EditorialBoard:SteveAnglin,DanAppleman,EwanBuckingham,GaryCornell,TonyDavis, IasonGilmore,ChrisMills,DominicShakeshaft.IimSumser, KarenWatterson,IohnZukowski ProjectManager:TracyBrownCollins CopyEditManager:NicoleLeClerc CopyEditor:AmiKnox ProductionManager:KariBrooks Compositor:LindaWeidemann,WolfCreekPress Proofreader:SachiGuzman Indexer: RebeccaPlunkett CoverDesigner:KurtKrames ManufacturingManager:TomDebolski IntheUnited States:phone1-800-SPRINGER,[email protected],orvisithttp://www .springer-ny.com.OutsidetheUnitedStates:fax+496221345229,[email protected],or visithttp://www.springer.de. Forinformationontranslations,pleasecontactApressdirectiyat2560NinthStreet, Suite219, Berkeley,CA94710.Phone510-549-5930,fax510-549-5939,[email protected],orvisit http://www.apress.com. Theinformationinthis bookisdistributedon an"asis"basis,withoutwarranty.Althoughevery precautionhasbeentakeninthepreparationofthiswork,neithertheauthor(s)norApressshall haveanyliabilitytoanypersonorentitywithrespecttoanylossordamagecausedorallegedto becauseddirectiyorindirectiybytheinformationcontainedinthiswork. The sourcecodeforthisbookisavailabletoreadersat http://www.apress.comintheDownioads section. Nothingisreally work unlessyou wouldratherbedoingsomethingelse. JAMES BARRIE SCOTTISH DRAMATIST (1860-1937) Contents at a Glance Foreword xi About the Author xiii About the Technical Reviewers xiv Acknowledgments xv Introduction xvii Chapter 1 Introducing Service-Oriented Architecture 1 Chapter 2 The Web Services Description Language 19 Chapter 3 Design Patterns for Building Message-Oriented Web Services 37 Chapter 4 Design Patterns for Building Service-Oriented Web Services 67 Chapter 5 Web Services Enhancements 2.0 95 Chapter 6 Secure Web Services with WS-Security 123 Chapter 7 Use Policy Frameworks to Enforce Web Service Requirements with WS-Policy 159 Chapter 8 Establish Trusted Communication with WS-Secure Conversation 187 Chapter 9 Design Patterns for SOAP Messaging with WS-Addressing and Routing 215 Chapter 10 Beyond WSE 2.0: Looking Ahead to Indigo 257 Appendix References .279 Index 293 v Contents Foreword xi About the Author xiii About the Technical Reviewers xiv Acknowledgments xv Introduction xvii Chapter Introducing Service-Oriented 1 Architecture 1 Overview of Service-Oriented Architecture 3 The Web Services Specifications and the WS-I Basic Profile 13 Summary 17 Chapter 2 The Web Services Description Language .... 19 Elements of the WSDL Document 20 Working with WSDL Documents 33 Summary 35 Chapter 3 Design Patterns for Building Message-Oriented Web Services 37 How to Build Message-Oriented Web Services 37 Design and Build a Message-Oriented Web Service .40 Summary 65 Chapter 4 Design Patterns for Building Service-Oriented Web Services 67 How to Build Service-Oriented Web Services 69 Design and Build a Service-Oriented Web Service 74 Design and Build a Service Agent 86 Summary 94 vii Contents Chapter 5 Web Services Enhancements 2.0 95 Overview of the WS-Specifications 96 Introducing Web Services Enhancements 2.0 102 Install and Configure WSE 2.0.,.,., .,.,.,., .,.,.,.,., .. .,...,110 X.SOg Certificate Support 114 Final Thoughts on WSE .. ., .. .,.,., .. .,., .. .,.,.,.. ., .. ., ., ...,121 Summary 121 Chapter 6 Secure Web Services with WS-Security ....123 The WS-Security Specification .,., .. ., ., .. ., ., .. ., .,.,.,124 Implement WS-Security Using WSE 2.0 .,127 Prevent Replay Attacks Using TimestampsJ Digital SignaturesJ and Message Correlation 152 Summary 156 Chapter 7 Use Policy Frameworks to Enforce Web Service Requirements with WS-Policy 159 Overview of the Policy Framework Specifications 160 Overview of Role-Based Authorization 176 Summary 185 Chapter 8 Establish Trusted Communication with WS-Secure Conversation 187 Overview of Secure Conversation 188 How to Implement a Secure Conversation Solution 192 Build a Secure Conversation Solution 195 Summary 214 Chapter 9 Design Patterns for SOAP Messaging with WS-Addressing and Routing 215 Communication Models for Web Services .216 Overview of WS-Addressing .,.,., .., ., ..., ., .218 Overview of Messaging 225 Overview of Routing and Referral .. .,., .. .,.,., .. ., .. ., .,.,.,238 Integrate Web Services and MSMQ .,., .. .,.,.,..., .,.,.,248 Summary 254 viü Contents Chapter 10 Beyond WSE 2.0: Looking Ahead to Indigo 257 Overview of Indigo .258 Understanding Indigo Web Services .266 Understanding Indigo Applications and Infrastructure 268 How to Get Ready for Indigo .274 WSE 2.0 and Indigo ..,.,.,.,.,.,.,.,.,..,..,.,.,.,.,.. .,.,.,.,., .,276 Summary 277 Appendix References 279 Service-Oriented Architecture (General) 279 XML Schemas and SOAP ..,., .. ., .. ., ..., .. .,., .. ., .. ., ..., .. .,., .. .,280 WS-Specifications (General) 282 Web Services Enhancements 1.0 and 2.0 (General) .,.., ...,.,., .283 WS-Security 283 WS-Policy 286 WS-SecureConversation .287 WS-Addressing .287 WS-Messaging 288 WS-Routing and WS-Referral ., .289 WS-Reliable Messaging .289 Indigo 290 Miscellaneous 291 Index 293 ix Foreword IHEARMANY misconceptionsaboutWebservices.The phrase"Webservicesisfor calling methodsusingXML" appearsmostoften. ItistruethatWebservicesgive developersawayto invokecodeonaremotemachine.Andthatcodeisencap sulatedin amethod. ButthatdoesnotmeanthattheWebservicesarchitecture exists for remote methodinvocation.TheWeb servicesarchitectureoffers an unprecedentedleveloffreedomwhenbuildingdistributedapplications. Developerfreedomtakesmanyforms.Tosome itisthefreedomto recom pile theirCHcodeon anothercompiler.Othersthinkoffreedomastheability to see andmodifythesourcecodeofunderlyinglibraries. The portabilityofJavaappealsto many. In distributedapplicationsanother freedomappeals: loose-coupling.Distributedapplicationsaremadeupofmultiple pieces runningonmultiplemachines.Coordinatingmultipleversions ofsoftware, operatingsystems,andplatformlibraries canbe aterrible burden. TheWebservicesarchitecture, service-orientation,offers asolutioninthe form ofloosely-coupledservices.The powerofXMLisntthatyou canread itwith Notepad.XML'sgiftcomesfrom astructurethatallowsforgrowth andchangein abackward-compatiblefashion.The coolthingaboutXMListhatitiseverywhere. The architecturetakes advantageofthesefundamentaltenetsofXMLandgrows themup foruse indistributedapplications. Forinstance,developerslivein aversioninghell.Ifyouwantto upgradeone side ofyourapplication,you are takingyourlife(orat leastyourjob) intoyour handsifyoudon'tupgradetherest oftheapplicationasweIl.Well-definedinter faces tendto meltwhentheinfrastructurebehindthemchange.Fragilesoftware breaks.TheWebservices architecturehelpswith complimentarytechnologieslike XMLSchemasanyElementandanyAttributefeatures, SOAP'sMustUnderstand, andthepolicyframework.Each oftheseaddressaparticularversioningproblem from changinguserdatato changesto underlyingservicecapabilities. Interoperabilitygivesanotherformoffreedom.Withoutinteroperability,mono lithicapplicationsforcethemselveson developers.Businessesneedtocommunicate withotherbusinessesthatrun entirelydifferentplatforms.Thecostand logisticsof forcingone orbothpartiestoinstallaplatformtheydonothaveanyexpertiseusing isimmense.Webservicesdeliverfreedom frommonoliths.I'vepersonallyspenttons oftimeworkingwithdevelopers ofJava,Perl,CH,and otherWebservicesplatforms ontestinginteroperabilityandmakingsureitworks.Thisisawork-in-progress, but each dayit'sbetter. WedesignedWebServicesEnhancements2.0forMicrosoft.NETto givedevel opersthis freedom.Youcanbuildaservice-orientedapplicationwithoutWSE,but withWSEyou canbuild an advancedandsecureservice-orientedapplication.You xi Foreword are holdingabookthatdescribeshowto useWSEto itsfullest potential.Jeffrey Hasan's writingexceedsmyexpectations.Readthisbookandyou willbe wellon your wayto understandingtheWebservices architecture.Youwillbe readyto use WSEto buildaservice-orientedapplicationthatwillfreeyou. KeithBallinger ProgramManagerforWebServicesEnhancements,MicrosoftCorporation xii

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.