web services: the next generation web applicationdownload.microsoft.com/.../web_services.pdf · web...

Post on 22-Jun-2020

3 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Web Services: the next Web Services: the next generation web application generation web application

EkarajEkaraj KongswangwongsaKongswangwongsa

Developer EvangelistDeveloper Evangelist

Microsoft (Thailand) LimitedMicrosoft (Thailand) Limited

AgendaAgenda

�� OverviewOverview

�� Building a Web ServiceBuilding a Web Service

�� Creating Web Service ClientsCreating Web Service Clients

�� Beyond the basicsBeyond the basics

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

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

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

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

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

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

AgendaAgenda

�� OverviewOverview

�� Building a Web ServiceBuilding a Web Service

�� Creating Web Service ClientsCreating Web Service Clients

�� Beyond the basicsBeyond the basics

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

Web ServicesWeb Services

.ASMX.ASMX.ASMX

TestingTesting

Courseware.asmxCourseware.asmx

Test HTML PageTest HTML Page

demodemo

Building Web ServiceBuilding Web Service

AgendaAgenda

�� OverviewOverview

�� Building a Web ServiceBuilding a Web Service

�� Creating Web Service ClientsCreating Web Service Clients

�� Beyond the basicsBeyond the basics

Web ServiceWeb ServiceCreating a Web Service ClientCreating a Web Service Client

SOAP proxySOAP proxy

codecode

Web serviceWeb service

the Internet

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

Web ServicesWeb Services

.ASMX.ASMX.ASMXProxy

DLL

Proxy Proxy

DLLDLL

Register for CourseRegister for Course Purchase CoursewarePurchase Courseware

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!

Building a ClientBuilding a Client

demodemo

AgendaAgenda

�� OverviewOverview

�� Building a Web ServiceBuilding a Web Service

�� Creating Web Service ClientsCreating Web Service Clients

�� Beyond the basicsBeyond the basics

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

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

©© 2001 Microsoft Corporation. All rights reserved.2001 Microsoft Corporation. All rights reserved.

top related