web services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · web...
TRANSCRIPT
![Page 1: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/1.jpg)
Web Services: the next Web Services: the next generation web application generation web application
EkarajEkaraj KongswangwongsaKongswangwongsa
Developer EvangelistDeveloper Evangelist
Microsoft (Thailand) LimitedMicrosoft (Thailand) Limited
![Page 2: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/2.jpg)
AgendaAgenda
�� OverviewOverview
�� Building a Web ServiceBuilding a Web Service
�� Creating Web Service ClientsCreating Web Service Clients
�� Beyond the basicsBeyond the basics
![Page 3: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/3.jpg)
1st & 2nd Generation Web Apps1st & 2nd Generation Web Apps
1-1 correspondence of page to file
Browser
Web ServerWeb Server
File
“Dynamic Pages”
Browser
File
Web Server
DB In-housesystems
![Page 4: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/4.jpg)
3rd Generation Web 3rd Generation Web
File DB
“Dynamic Pages”
Browser
Web Server
InIn--househousesystemssystems
“The F
irew
all”
Web site
Web site
Web site
Accessing another site today = HTML “screen scraping”or “your architect calls my architect”
Tomorrow, external Web sites become building blocks using XML Web Services
Web service
Web service
Web service
![Page 5: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/5.jpg)
Overview of Web ServicesOverview of Web ServicesThe .NET VisionThe .NET Vision
Web Web SiteSiteWeb Web
ServiceServiceWeb Web
ServiceService
XMLXML
““BuildingBuilding--Block Block
ServicesServices””HTMLHTML
ClientClient
XML
XML
ClientClientXMLXML
Web Web ServiceService
XML
XML
Web Web ServiceService
XMLXML
XM
LXM
L
XML
XML
ClientClientXMLXML
Web Web ServiceService
XML
XML
Web Web ServiceService
XMLXML
XM
LXM
L
![Page 6: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/6.jpg)
What is a Web Service?What is a Web Service?
�� A web service is programmable A web service is programmable application logic accessible via application logic accessible via standard Web protocolsstandard Web protocols
�� Available to a variety of clients (platform Available to a variety of clients (platform independent)independent)
�� Examples: stock quote, weather, and work Examples: stock quote, weather, and work flow, team collaborationflow, team collaboration
�� Makes building distributed applications Makes building distributed applications easyeasy
�� A web application without a user A web application without a user interfaceinterface
![Page 7: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/7.jpg)
Foundation for Web ServicesFoundation for Web Services
Service Interaction:Service Interaction: SOAPSOAP
Data Format:Data Format: XMLXML
Format Description: Format Description: XML SchemaXML Schema
Service Directory:Service Directory: UDDIUDDI
Service Description:Service Description: WSDLWSDL
Communication Network: Communication Network: InternetInternet
Communication Protocol: Communication Protocol: HTTPHTTP
WSDL: Web Services Description Language
![Page 8: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/8.jpg)
Let me talk to you (SOAP)Let me talk to you (SOAP)
Web Services (In Practice)Web Services (In Practice)
DesignDesign--Time or DynamicTime or Dynamic RuntimeRuntime
How do we talk? (WSDL)How do we talk? (WSDL)http://http://yourservice.comyourservice.com/?WSDL/?WSDL
XML with service descriptionsXML with service descriptions
http://yourservice.com/svc1http://yourservice.com/svc1
XML/SOAP BODYXML/SOAP BODY
Web Web ServiceService
WebWebService Service
ConsumerConsumer
UDDIUDDI
Find a ServiceFind a Servicehttp://http://www.uddi.orgwww.uddi.org
Link to WSDL documentLink to WSDL document
![Page 9: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/9.jpg)
AgendaAgenda
�� OverviewOverview
�� Building a Web ServiceBuilding a Web Service
�� Creating Web Service ClientsCreating Web Service Clients
�� Beyond the basicsBeyond the basics
![Page 10: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/10.jpg)
Web ServicesWeb Services
.ASMX.ASMX.ASMX
Class CoursewareClass CoursewareClass CoursewareClass Courseware
WebMethodWebMethodWebMethodWebMethod
GetPriceGetPriceGetPriceGetPrice
PurchasePurchasePurchasePurchase
Class CoursewareClass CoursewareClass CoursewareClass Courseware
WebMethodWebMethodWebMethodWebMethod
GetPriceGetPriceGetPriceGetPrice
PurchasePurchasePurchasePurchase
Source codeSource code
![Page 11: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/11.jpg)
Web ServicesWeb Services
.ASMX.ASMX.ASMX
TestingTesting
Courseware.asmxCourseware.asmx
Test HTML PageTest HTML Page
![Page 12: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/12.jpg)
demodemo
Building Web ServiceBuilding Web Service
![Page 13: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/13.jpg)
AgendaAgenda
�� OverviewOverview
�� Building a Web ServiceBuilding a Web Service
�� Creating Web Service ClientsCreating Web Service Clients
�� Beyond the basicsBeyond the basics
![Page 14: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/14.jpg)
Web ServiceWeb ServiceCreating a Web Service ClientCreating a Web Service Client
SOAP proxySOAP proxy
codecode
Web serviceWeb service
the Internet
![Page 15: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/15.jpg)
Web ServicesWeb Services
.ASMX.ASMX.ASMX
Courseware.asmx?WSDLCourseware.asmx?WSDL
Service Definition(XML)Service Definition(XML)
Proxy
DLL
Proxy Proxy
DLLDLL
Generating a proxy from WSDLGenerating a proxy from WSDL
![Page 16: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/16.jpg)
Web ServicesWeb Services
.ASMX.ASMX.ASMXProxy
DLL
Proxy Proxy
DLLDLL
Register for CourseRegister for Course Purchase CoursewarePurchase Courseware
![Page 17: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/17.jpg)
Creating ClientsCreating Clients
�� Use either commandUse either command--line tool, or Visual line tool, or Visual Studio.NETStudio.NET
�� Builds proxy source from WSDLBuilds proxy source from WSDL
�� WSDL is platform independentWSDL is platform independent
�� Classes can be created in C#, VB, or Classes can be created in C#, VB, or managed C++managed C++
�� Any .NET language!Any .NET language!
![Page 18: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/18.jpg)
Building a ClientBuilding a Client
demodemo
![Page 19: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/19.jpg)
AgendaAgenda
�� OverviewOverview
�� Building a Web ServiceBuilding a Web Service
�� Creating Web Service ClientsCreating Web Service Clients
�� Beyond the basicsBeyond the basics
![Page 20: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/20.jpg)
Beyond the basicsBeyond the basics
�� Dynamic URL BehaviorDynamic URL Behavior
�� Returning Complex TypesReturning Complex Types
�� Asynchronous Web ServiceAsynchronous Web Service
�� SOAP HeaderSOAP Header
�� StatefulStateful Web ServiceWeb Service
�� Transfer Binary DataTransfer Binary Data
![Page 21: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/21.jpg)
Session SummarySession Summary
�� Web Services Are The Building Blocks Web Services Are The Building Blocks For The Next Generation Of The InternetFor The Next Generation Of The Internet
�� Gives Client Access to any kind of DataGives Client Access to any kind of Data
�� Make BusinessMake Business--toto--Business EasyBusiness Easy
�� Visual Studio .NET Provides Great Visual Studio .NET Provides Great ToolsTools
![Page 22: Web Services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · Web Services: the next generation web application Ekaraj Kongswangwongsa Developer](https://reader033.vdocuments.net/reader033/viewer/2022042321/5f0aafcb7e708231d42cd77e/html5/thumbnails/22.jpg)
©© 2001 Microsoft Corporation. All rights reserved.2001 Microsoft Corporation. All rights reserved.