Ø Web Services l Enhance developer productivity Ø Choose any language Ø Shared libraries Ø Shared dev environment § Language neutral § All development in the same §language §class librar
Trang 1Microsoft NET and
XML Web Services
Product Marketing Manager
Trang 2Ø The what, why, and how ?
Technology requirements
l Computing power
Ø Doubles in 18 months
Ø Scalability of Intel/PC Servers
l Everyhting is networked
Ø Cheap and available Internet
Ø Wireless
l Multitude of devices
Ø PDA, mobile phone, PC, laptop,
TV, toaster, gas pump…
l Internet Standards
Ø XML, …
Trang 3What is NET?
Windows DNA
.NET – Why ?
l Technology requirements
Ø Integration
Ø New application types
Ø New user interfaces
l Developer requirements
Ø RAD – ease of app development
Ø Support for many languages…
Ø …but – shared features and the same deve
environment
l Windows DNA
Ø Has been developed furing a long time
Trang 4Microsoft NET
l New application development environment
Ø Windows Apps (PC/other devices)
Ø Web/Internet/intranet
Ø Web Services
l Standards in a central role
Ø XML etc.
Ø Web Services
l Enhance developer productivity
Ø Choose any language
Ø Shared libraries
Ø Shared dev environment
§ Language neutral
§ All development in the same
§language
§class library
§dev tool
Win32
MSMQ
(Message
Queuing)
COM+
(Transactions, Partitions,
Object Pooling)
Common Language Runtime
.NET Framework
Base Class Library
ADO.NET: storage and XML
Web Service UI
VB C++ C#
ASP.NET
Perl Python …
Common Language Runtime
uBasic functionality: program compilation and execution, memory management, security
Shared class libraries
uSame programming model from one language to the other
uIntegration between languages
uExtensibility
uTools
ASP.NET
u Web Services and Web UI’s
Trang 5Execution model
IL Native
Code
JIT compilation
Native Code
Install
Common Language Runtime
•Code verification
•Security
•Compilation
•Execution
•Threads
Support for many languages
Ø All NET languages are equal
Ø Integration between languages
Ø One dev environment
Ø Visual Basic®, C++, C#, J#, JScript®
Ø APL, COBOL, Eiffel, Fortran, Haskell, ML,
Perl, Python, RPG, Scheme, Smalltalk, …
Trang 6.NET Framework class library
ØEven though the class library is mostly
written in C#…
Ø…it can be used in any NET language
Ø(Almost) all under System.
ØASP.NET
ØADO.NET
ØWindows Forms
User Interfaces
1. ”Traditional” Windows App
2. ”Mobile” Windows App
3. ”Traditional” Web UI
4. ”Mobile” Web UI
Ø Functionality through Web Services…
Ø …and the UI can be almost anything and
anywhere, on any device!
Trang 7High Mileage Club Services
Web Services
New User Interfaces
Windows Forms
SQL Server CE
ADO.NET
ASP.NET + Mobile
Internet Toolkit
ADO.NET
Internet
Internet
Microsoft
Mobile Information
Common Language Runtime
Base Class Library
ADO.NET and XML
ASP.NET
Web Forms Web Services
Mobile Devices
Windows Forms
.NET Framework
Data
l ADO.NET
Ø Fastest way to use SQL Data
Ø Support for XML
Ø Managed Providers
l System.Xml
Ø XSLT 1.0, XPath 1.0, XSD 1.0, DOM2
Ø Extensible
l XSLT/XPath
Ø Relational data transformation
Ø W3C compliant
Trang 8.NET Supports XML!
lXML 1.0
§http://www.w3.org/TR/1998/REC-xml-19980210
lXML Namespaces
§http://www.w3.org/TR/1999/REC-xml-names-19990114/
lXML Schemas
§http://www.w3.org/TR/2001/REC-xmlschema- 1-20010502/
§http://www.w3.org/TR/2001/REC-xmlschema- 2-20010502/
lXPath expressions
§http://www.w3.org/TR/1999/REC-xpath-19991116
lXSL/T transformations
§http://www.w3.org/TR/1999/REC-xslt-19991116
lDOM Level 1 and Level 2 Core
§http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/
§http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/
lSOAP 1.1
§http://msdn.microsoft.com/xml/general/soapspec.asp
XML and data
.NET Data Provider
DataReader
Command Connection
Sync
Controls,
Designers,
Code-gen, etc
DataSet
XmlReader
XSL/T, X-Path, etc
XmlData-Document
DataAdapter
Trang 9XML and NET
ØObject serialization format
§ for example DataSet
Ø.NET specific, easier API on top of traditional
XML API
§ No support for SAX (MSXML 4.0)
§ XML DOM (MSXML.DLL) can be used
ØRemoting/RPC uses XML
§ SOAP and XML Web Services
Web Service
user
Trang 10Universal Description Discovery
and Integration (UDDI)
Simple Object Access Protocol (SOAP)
eXtensible Markup Language (XML)
Tietojen välityskanava: Internet
Web Service - Protocols
Supplier B
Company
Inventory Supplier C Supplier A
Customer
Order processing
Web Service Description Language (WSDL)
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
Web Service 1
namespace WebService1 {
public class Service1 : System.Web.Services.WebService {
public Service1() {InitializeComponent();}
private IContainer components = null;
private void InitializeComponent(){}
protected override void Dispose( bool disposing ) {
if(disposing && components != null)
{components.Dispose();}
base.Dispose(disposing);
} [WebMethod]
public string GetId(string strKey, string strType) {
returnstrKey.ToUpper() + strType.ToUpper();
}}}
<%@ WebService Language="c#" Codebehind="Service1.asmx.cs“
CS
Trang 11l Web Service Description Language (WSDL)
ØDescription of the service
ØHow to call the service
ØMethods, parameters and return values
Ø.NET environment creates automatically
Øhttp://wmli003600/WebService1/Service1.asmx?wsdl
Web Service 2
XSD WSDL
l Discovery Documents (DISCO)
ØPublishes Web Services
ØCan be called directly (.vsdisco)
ØDescribes the services in a server
Web Service 3
ASMX XSD WSDL
WSDL DISCO
<?xml version="1.0" encoding="utf-8" ?>
-<discoveryxmlns:xsd xmlns:xsd=http://www.w3.org/2001/XMLSchema
- xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xmlns="http://schemas.xmlsoap.org/disco/">
<contractRef ref= =http://wmli003600/WebService1/Service1.asmx?wsdl
docRef= =http://wmli003600/WebService1/Service1.asmx
xmlns="http://schemas.xmlsoap.org/disco/scl/" />
</discovery>
http://wmli003600/focus/WebService1/WebService1.vsdisco
Trang 12• Universal Description, Discovery and Integration
• UDDI describes available services
• Yellow pages for Web Services
• Can be used externally (uddi.microsoft.com,
uddi.ibm.com )
• Can also be used internally as a local directory for web
services
Web Service 3
ASMX XSD WSDL
WSDL DISCO
DISCO UDDI
Calling Web Services
l Basic call: HTTP Get and HTTP Post
ØBasic types (int, string, jne)
ØBasic type tables
ØCan be called in a “traditional” way
Key=s1&strType=as
l Default: Simple Object Access Protocol (SOAP)
ØStructures
ØEnumerations
ØClasses
ØXML DataSets
ØArrays
ØCan contain all kinds of structures
Trang 13Web Service
HTTP, etc
Ø Without knowing the architecture behind a
system
Where can Web Services be
used
Ø Service to a user – combining services
(B2C)
Ø Services between organisations (B2B)
Ø Integration of internal systems (EAI, A2A)
Trang 14Cool – are we done?
Ø Security
Ø Routing & Referral
Ø Attachments
Ø Transactions
Ø Reliable messaging
Web Services futures
XML Web Services
Integrate systems
XML
Integrate data
Infrastructure
Protocol development
Compatability
Industry support
Implementation
Products, solutions
Trang 15Modular: Example
SOAP
Message
Security
Routing
<?xml version="1.0" encoding="utf-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<S:Header>
<m:pathxmlns:m="http://schemas.xmlsoap.org/rp">
<m:action>http://tickers-r-us.org/getQuote</m:action >
<m:to>soap://tickers-r-us.org/stocks</m:to>
<m:from>mailto:johnsmith@isps-r-us.com</m:from>
<m:id>uuid:84b9f5d0-33fb-4a81-b02b-5b760641c1d6</m:id>
</m:path>
<wssec:Security xmlns:wssec="http://schemas.xmlsoap.org/ws/2002/04/secext">
<wssec:BinarySecurityToken ValueType="wssec:X509v3"
EncodingType=“wssec:Base64Binary">
dWJzY3JpYmVyLVBlc … eFw0wMTEwMTAwMD
</wssec:BinarySecurityToken>
</wssec:Security>
</S:Header>
<S:Body>
<app:TrafficStatus xmlns:app="http://highwaymon.org/payloads">
<road>520W</road><speed>3MPH</speed>
</app:TrafficStatus>
</S:Body>
</S:Envelope>
.NET and standards
Ø Submitted 2000
Ø Standard approved 2001
Ø ISO standard about to be approved
Ø Used in many projects, other platforms
standardization bodies
Trang 16Existing code
Ø Can be called from NET
Ø .NET components can be called from DNA
Ø Ready -made Interfaces
Ø Database connections
§ Data transfer, for example BizTalk
§ Web Services
.NET - tools
Ø One programming environmentg
§ All applications
§ All languages
Ø Extensible
§ Visual Studio is the basic tool
§ Additional features from partners, such as
Rational, Compuware
§ New languages, testing, dev project
management
Trang 17Source Code
l CE.NET
Ø Download (http://www.microsoft.com/embedded)
Ø Platform Builder for custom versions
Ø OS Source code
l Shared Source CLI beta
Ø CLI – CLR, basic class library, C# compiler
Ø FreeBSD/Windows NT
Ø Dowload (http://msdn.microsoft.com)
l Windows NT/2000
Ø Source code for research use
Ø Big customers can also obtain source code
Ø Requests => Email (kimmob@microsoft.com)
.NET - Benefits
l Many application types
Ø User Interfaces
Ø Traditional applications
Ø Web Services
l Shared programming model
Ø All application types
l Support for multiple languages
Ø Investments in training
l Easier programming
l Protect old investments – integration to existing code
l Integration to other worlds and architectures
l Performance
l Security
Trang 18How to go forward?
Ø http://www.microsoft.com/net
Ø http://msdn.microsoft.com
Ø Visual Studio NET
Ø Microsoft Developer Network – MSDN
Ø Developer programs – MSDN
Ø Partner programs – Microsoft Certified
Solution Provider program
Kysymyksiä ja vastauksia?