The future of distributed systems architecture .net Web Services The future of distributed systems architecture Bradley Gessler Booze Alan Partner brad@boozealan.com www.boozealan.com/seminar/
Agenda Before web services Introduction Web service examples Messages Code demonstration Future Assignment
Before Web Services Raw Byte Streams RPC RMI DCOM “Screen Scraping”
Introduction to Web Services XML based RPC Interfaces that are defined via XML Uses messaging scheme Service Oriented Architecture Usually HTTP based Firewall friendly Can use other channels
XML Web Services Client invokes XML Web Service Internet Client invokes XML Web Service Web Service receives and processes request Web Service sends client a response
Channels Protocol used to transmit web service messages HTTP SMTP FTP MSMQS
Protocols All standards are based on XML This has made interoperability possible Current standards are still evolving Mature enough for simple enterprise applications New protocols are evolving to enhance current protocols Security standards Transactional standards
SOAP Simple Object Access Protocol Used to invoke web services Send/receive messages to and from web services Describes the methods, arguments, and results of a method call Envelopes
WSDL Web Services Description Language Describes the interface of the web service Methods Arguments Return Values Variables Types Simple Data structures Arrays
UDDI Universal Description, Discovery, and Integration Web service directory Not widely implemented
Real world XML web services Web Services Examples Real world XML web services
Web Services Zip Code Web Service MapPoint.net http://www.tilisoft.com/ws/LocInfo/ZipCode.asmx MapPoint.net http://www.microsoft.com/mappoint/webservice/default.mspx
Consuming a Web Service Visual Studio.NET Demo
Messages Its a Messaging World
Messages Packet of meaningful data SOAP Message Similar to IM messages work
Synchronous & Asynchronous Synchrony Synchronous & Asynchronous
Synchronous Client Web Service
Asynchronous Client Web Service
Reliability Unreliable Reliable Idempotency Messages might not be received More then one of the same message may be received Reliable Idempotency Make sure your web service methods are idempotent
Visual Studio.net Demonstration Creating a Web Service Visual Studio.net Demonstration
Creating a .net Web Service Prerequisites Required Web Server IIS 5.0 or greater Microsoft .net Framework 1.0 or greater Recommended Visual Studio.NET 2002 or better Other Web Service Platforms Apache Tomcat, J2EE
Web Service Business Value Less infrastructure requirements Developers can focus on solving business problems
Future of Web Services Enterprise Connectivity Already used internally by many organizations Starting to gain acceptance as a way to connect organizations to one another
Service Oriented Architecture Encapsulate all enterprise applications with web services Consume web services from various systems and applications for various uses Extremely flexible, scalable, and interoperable
Future of Web Services Windows Codename “Longhorn” “Indigo” Integrated messaging system Support Multiple Channels Web Services MSMQ And more… Abstracts the complexities of web services much like what the Visual Studio.net IDE
Assignment Consume the zip code web service http://www.tilisoft.com/ws/LocInfo/ZipCode.asmx Create a windows form that gets the name of the city based on a zip code given by the user Display the city of the given zip code to the user
Resources MSDN .net Overview SOAP Example http://msdn.microsoft.com/ http://msdn.microsoft.com/webservices/ .net Overview http://www.microsoft.com/net/ SOAP Example http://www.w3schools.com/SOAP/soap_example.asp?output=print
Questions