Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 19 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
19
Dung lượng
767,08 KB
Nội dung
10/22/2002 2:24 PM Microsoft NET and XML Web Services Kimmo Bergius Product Marketing Manager Microsoft Oy kimmob@microsoft.com 10/22/2002 2:24 PM Agenda l Microsoft NET Ø l l l l l The what what,, why why,, and how how? ? XML in NET Web Services in NET Wrap -up Slides available at Microsoft Finland presentation archive (http://www.microsoft.fi) For questions kimmob@microsoft.com Technology requirements l Computing power Ø Ø l Everyhting is networked Ø Ø l Cheap and available Internet Wireless Multitude of devices Ø l Doubles in 18 months Scalability of Intel/PC Servers PDA, mobile phone, PC, laptop, TV, toaster, gas pump… Internet Standards Ø XML, … 10/22/2002 2:24 PM What is NET? l l NET is Microsoft’s new architecture for developing applications on top of Windows and the Microsoft product line NET is the new implementation of Windows DNA NET – Why ? l Technology requirements Ø Ø Ø l Developer requirements Ø Ø Ø l Integration New application types New user interfaces RAD – ease of app development Support for many languages languages… … …but – shared features and the same deve environment Windows DNA Ø Ø Has been developed furing a long time Lots of features == Complex Complex? ? 10/22/2002 2:24 PM Microsoft NET New application development environment l Windows Apps (PC/other devices) Web/Internet/intranet Web Services Ø Ø Ø Standards in a central role l XML etc Web Services Ø Ø Enhance developer productivity l Choose any language Shared libraries Shared dev environment Ø Ø Ø Language neutral All development in the same § § §language §class library §dev tool NET Framework VB C++ C# Perl Python Web Service ASP.NET … Shared class libraries UI u ADO.NET: storage and XML u Base Class Library u Common Language Runtime u MSMQ (Message Queuing) COM+ (Transactions, Partitions, Object Pooling) IIS Same programming model from one language to the other Integration between languages Extensibility Tools WMI Win32 ASP.NET Common Language Runtime u u Web Services and Web UI’s Basic functionality: program compilation and execution, memory management, security 10/22/2002 2:24 PM Execution model VB Native Code VC Install Perl IL Common Language Runtime JIT compilation Native Code • Code verification • Security • Compilation • Execution • Threads Support for many languages l NET is language neutral Ø Ø Ø l Microsoft languages Ø l All NET languages are equal Integration between languages One dev environment Visual Basic®, C++, C#, J#, JScript® Third parties Ø APL, COBOL, Eiffel, Fortran, Haskell, ML, Perl,, Python, RPG, Scheme, Smalltalk, … Perl 10/22/2002 2:24 PM NET Framework class library l Used in all NET languages Ø Even though the class library is mostly written in C#… Ø …it can be used in any NET language l Shared between dev environments l Arranged in a single namespace Ø (Almost) all under System l Contains: Ø ASP.NET Ø ADO.NET Ø Windows Forms Ø etc… User Interfaces l Four different NET UI’s l ”Traditional Traditional”” Windows App ”Mobile” Windows App ”Traditional Traditional”” Web UI ”Mobile” Web UI Others Ø Ø Functionality through Web Services Services… … …and the UI can be almost anything and anywhere,, on any device anywhere device!! 10/22/2002 2:24 PM NET Internet NET Framework Microsoft Mobile Information Server Compact Framework New User Interfaces Windows Forms ADO.NET SQL Server CE MSMQ Internet ASP.NET + Mobile Internet Toolkit ADO.NET High Mileage Club Services Web Services NET Framework Data l ASP.NET Web Forms Web Services Mobile Devices Windows Forms l ADO.NET and XML l Base Class Library ADO.NET Ø Fastest way to use SQL Data Ø Support for XML Ø Managed Providers System.Xml Ø XSLT 1.0, XPath 1.0, XSD 1.0, DOM2 Ø Extensible XSLT/XPath XSLT/ XPath Ø Relational data transformation Ø W3C compliant Common Language Runtime 10/22/2002 2:24 PM NET Supports XML! l XML § l XML § l XML § § 1.0 http://www.w3.org/TR/1998/REC xml http://www.w3.org/TR/1998/REC xml 19980210 Namespaces http://www.w3.org/TR/1999/REC xml http://www.w3.org/TR/1999/REC xml names names 19990114/ Schemas http://www.w3.org/TR/2001/REC-xmlschema http://www.w3.org/TR/2001/RECxmlschema 1-20010502/ http://www.w3.org/TR/2001/REC xmlschema http://www.w3.org/TR/2001/REC xmlschema 2-20010502/ l XPath § l XSL/T § l DOM § § transformations http://www.w3.org/TR/1999/REC xslt http://www.w3.org/TR/1999/REC xslt 19991116 Level and Level Core http://www.w3.org/TR/1998/REC-DOM http://www.w3.org/TR/1998/RECDOM Level Level 1-19981001/ http://www.w3.org/TR/2000/REC DOM http://www.w3.org/TR/2000/REC DOM Level Level 2-Core Core 20001113/ l SOAP § expressions http://www.w3.org/TR/1999/REC xpath http://www.w3.org/TR/1999/REC xpath 19991116 1.1 http://msdn.microsoft.com/xml/general/soapspec.asp XML and data Controls, Designers, Code gen Code gen,, etc XSL/T, XX-Path, etc DataSet Sync DataAdapter DataReader XmlData-XmlData Document XmlReader Command Connection NET Data Provider 10/22/2002 2:24 PM XML and NET l XML used heavily in NET Ø Object § serialization format for example DataSet Ø NET specific, easier API on top of traditional specific, XML API § § No support for SAX (MSXML 4.0) XML DOM (MSXML.DLL) can be used Ø Remoting Remoting/RPC /RPC § uses XML SOAP and XML Web Services Web Service l l l l l Component call over HTTP WebApplication = application used by a user WebService = application used by another application Call to a function/method is packeted as an XML message that is sent using SOAP over HTTP or SMTP Data returned packeted and sent the same way Uses SOAP (Simple Object Access Protocol )., which is language, OS or architecture neutral 10/22/2002 2:24 PM Web Service - Protocols Supplier A Supplier B Supplier C Inventory Company Order processing Customer Universal Description Discovery and Integration (UDDI) Simple Object Access Protocol (SOAP) Web Service Description Language (WSDL) eXtensible Markup Language (XML) Tietojen välityskanava välityskanava:: Internet Web Service l Web Service (.ASMX files in ASP NET) Ø Ø Ø Code for services methods NET wizard creates the project, programmer adds the code Two files are created - codebehind namespace WebService1 { public class Service1 : System.Web.Services.WebService { public Service1() {InitializeComponent { InitializeComponent();} ();} private IContainer components = null null;; private void InitializeComponent InitializeComponent(){} (){} protected override void Dispose Dispose(( bool disposing ) { if(disposing && components != null null)) {components.Dispose components.Dispose();} ();} base.Dispose(disposing); base.Dispose(disposing ); } [WebMethod WebMethod]] public string GetId(string strKey strKey,, string strType strType)) { return strKey.ToUpper strKey.ToUpper() () + strType.ToUpper strType.ToUpper(); (); }}} ASMX CS 10 10/22/2002 2:24 PM Web Service Web Service Description Language (WSDL) Ø Description of the service Ø How to call the service Ø Methods, parameters and return values Ø XML Ø NET environment creates automatically Ø http://wmli003600/WebService1/Service1.asmx?wsdl l ASMX WSDL XSD Web Service l Discovery Documents (DISCO) ØPublishes Web Services ØCan be called directly (.vsdisco (.vsdisco)) ØDescribes the services in a server http://wmli003600/focus/WebService1/WebService1.vsdisco - > ASMX WSDL DISCO WSDL XSD 11 10/22/2002 2:24 PM Web Service • • • • • Universal Description, Discovery and Integration UDDI describes available services Yellow pages for Web Services Can be used externally (uddi.microsoft.com (uddi.microsoft.com,, uddi.ibm.com)) uddi.ibm.com Can also be used internally as a local directory for web services ASMX WSDL UDDI DISCO DISCO WSDL XSD Calling Web Services l l Basic call: HTTP Get and HTTP Post Ø Basic types (int (int,, string, jne jne)) Ø Basic type tables Ø Can be called in a “traditional” way Ø http://wmli003600/WebService1/Service1.asmx/GetId?str Key=s1&strType=as Default: Simple Object Access Protocol (SOAP) Ø Structures Ø Enumerations Ø Classes Ø XML DataSets Ø Arrays Ø Can contain all kinds of structures 12 10/22/2002 2:24 PM Web Service l l l l l Web Service is a functional conponent or program , that offers its functionality through the Web Service interface Web Services are used through the network (Internet/intranet) Data is transferred through XML Uses standard protocols, such as SOAP, HTTP, etc Main goal is integration between systems Ø Without knowing the architecture behind a system Where can Web Services be used l Integration scenarios Ø Ø Ø l Service to a user – combining services (B2C) Services between organisations (B2B) Integration of internal systems (EAI, A2A) Write once – use from anywhere 13 10/22/2002 2:24 PM Cool – are we done? l l Nope, Web services will evolve Lots of things coming Ø Ø Ø Ø Ø Security Routing & Referral Attachments Transactions Reliable messaging Web Services futures Implementation Products, solutions XML Web Services Integrate systems Compatability Industry support Infrastructure XML Protocol development Integrate data 14 10/22/2002 2:24 PM Modular: Example SOAP Message Routing Security > http://tickers >http://tickers r-us.org/getQuote us.org/getQuote soap://tickers >soap://tickers r-us.org/stocks us.org/stocks >mailto:johnsmith@isps mailto:johnsmith@isps r-us.com us.com uuid:84b9f5d0 >uuid:84b9f5d0 33fb 33fb 4a81 4a81 b02b b02b 5b760641c1d6 xmlns:wssec ="http://schemas.xmlsoap.org/ws/2002/04/secext"> /payloads"> 520W3MPH NET and standards l C# ja “CLI”: ECMA Ø Ø Ø Ø l l l Submitted 2000 Standard approved 2001 ISO standard about to be approved Used in many projects, other platforms XML, SOAP, WSDL: W3C, IETF, OASIS Additional development: WS-I, standardization bodies Partners in development: HP, Intel, IBM, Ariba… 15 10/22/2002 2:24 PM Existing code l Old Windows DNA applications Ø Ø l Can be called from NET NET components can be called from DNA Third party applications Ø Ø Ø Ready- made Interfaces ReadyDatabase connections XML: § § Data transfer transfer,, for example BizTalk Web Services NET - tools l Visual Studio NET Ø One programming environmentg § § Ø Extensible § § § l All applications All languages Visual Studio is the basic tool Additional features from partners, such as Rational, Compuware New languages, testing, dev project management MSDN Universal 16 10/22/2002 2:24 PM Source Code l CE.NET Ø Ø Ø l Shared Source CLI beta Ø Ø Ø l Download (http:// (http://www.microsoft.com www.microsoft.com//embedded embedded)) Platform Builder for custom versions OS Source code CLI – CLR, basic class library library,, C# compiler FreeBSD/Windows FreeBSD /Windows NT Dowload (http://msdn.microsoft.com http://msdn.microsoft.com)) Windows NT/2000 Ø Ø Ø Source code for research use Big customers can also obtain source code Requests => Email (kimmob@microsoft.com kimmob@microsoft.com)) NET - Benefits l Many application types Ø Ø Ø l Shared programming model Ø l l l l l l All application types Support for multiple languages Ø l User Interfaces Traditional applications Web Services Investments in training Easier programming Protect old investments – integration to existing code Integration to other worlds and architectures Performance Security Newest technology technology!! 17 10/22/2002 2:24 PM How to go forward? l Web Ø Ø l Developer products Ø Ø l Visual Studio NET Microsoft Developer Network – MSDN Programs Ø Ø l http://www.microsoft.com/net http://msdn.microsoft.com Developer programs – MSDN Partner programs programs– – Microsoft Certified Solution Provider program kimmob@microsoft.com Kysymyksiä ja vastauksia? 18 10/22/2002 2:24 PM 19 [...]... S:Envelope xmlns:S xmlns:S=" ="http:// http://schemas.xmlsoap.org schemas.xmlsoap.org/soap/envelope/ /soap/envelope/"" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd ="http://www.w3.org/2001/XMLSchema" xmlns:xsi ="http://www.w3.org/2001/XMLSchema ="http://www.w3.org/2001/XMLSchema instance"> > /payloads"> 520W3MPH NET and standards l C# ja “CLI”: ECMA Ø Ø Ø Ø l l l Submitted 2000 Standard approved 2001 ISO standard about to be approved Used in many projects, other platforms XML, SOAP,... Requests => Email (kimmob @microsoft. com kimmob @microsoft. com)) NET - Benefits l Many application types Ø Ø Ø l Shared programming model Ø l l l l l l All application types Support for multiple languages Ø l User Interfaces Traditional applications Web Services Investments in training Easier programming Protect old investments – integration to existing code Integration to other worlds and architectures... technology technology!! 17 10/22/2002 2:24 PM How to go forward? l Web Ø Ø l Developer products Ø Ø l Visual Studio NET Microsoft Developer Network – MSDN Programs Ø Ø l http://www .microsoft. com/net http://msdn .microsoft. com Developer programs – MSDN Partner programs programs– – Microsoft Certified Solution Provider program kimmob @microsoft. com Kysymyksiä ja vastauksia? 18 10/22/2002 2:24 PM 19 ... are used through the network (Internet/intranet) Data is transferred through XML Uses standard protocols, such as SOAP, HTTP, etc Main goal is integration between systems Ø Without knowing the architecture behind a system Where can Web Services be used l Integration scenarios Ø Ø Ø l Service to a user – combining services (B2C) Services between organisations (B2B) Integration of internal systems (EAI,