Web Services Building blocks for a Distributed computing platform PowerPoint PPT Presentation

presentation player overlay
1 / 20
About This Presentation
Transcript and Presenter's Notes

Title: Web Services Building blocks for a Distributed computing platform


1
Web Services Building blocks for a Distributed
computing platform
Mark Mehelis Student Ambassador to Microsoft Edu
cation Solutions Group
2
Agenda
  • WebServices a brief background
  • Why WebServices
  • What are Webservices
  • How to build and consume WebServices
  • Q A

3
The recent history of the internet
4
What if Internet DC platform?
  • Open Standards would rule the day
  • Disparate HW Software platforms would have to
    learn a lingual franca
  • How would we find the distributed components?
  • How would we know how to call them? what
    languages would we use?
  • How would we normalize the complex data types so
    all systems could use them?
  • How do you manage change?
  • DCOM CORBA?
  • Proprietary, extremely tightly coupled, inwardly
    focused

5
Web Services to the rescue
  • Completely open standards
  • Industry wide spec, with reviews and updates
  • UDDI Now we can find them
  • WSDL We can even interrogate them how do I
    call you?
  • XML We can exchange data all day night long
  • SOAP This is our mode of communication.
  • Interoperability,

6
What Is A Web Service?
A programmable application component accessible
via standard Web protocols
Furthermore
UDDI Universal Description, Discovery Integrati
on
  • You can ask a site for a description of the Web
    Services it offers

WSDL Web Services Description Language
  • Web Services are defined in terms of the formats
    and ordering of messages
  • The Web Services Description Language (WSDL) is
    an XML format for describing the network services
    offered by the server.

SOAPSimple Object Access Protocol
XML Extensible Markup language
  • Web Service send and receive data/messages using
    XML

HTTP Hypertext Transfer Protocol
  • All these capabilities are built using open
    Internet protocols

7
What Is A Web Service?
  • A piece of code exposed in an open way
  • Code that can be accessed by any other piece of
    code
  • Regardless of language or platform
  • Open today means XML and HTTP

Code
Code
XML/HTTP SOAP
Calling Client
Remote Server
Windows 2003
Running MacOS, Linux,
8
The Microsoft Story
  • .NET is the foundation
  • Visual Studio development tools
  • Drive for more specifications

9
Overview of .NET
  • .NET Framework
  • Provide consistent OO development across all
    platforms (multiple-OS)
  • Support multiple-languages (tail calls, recursion
    op-codes)
  • Consistent development experience across
    application types (Smart-client, Web, Mobile)
  • Built on industry standards (cross-language,
    cross-platform)
  • Provide managed execution process via the
    Common Language Runtime (CLR)

10
.NET a Technical view
Visual Studio .NET
Common Language Specification
ADO.NET and XML
Base Class Library
Common Language Runtime
Operating System
11
.NET Support for Web Services
  • XML Web Services baked into the .NET Framework
  • No additional installation and/or configuration
    beyond .NET Framework install
  • Supports RPC and Doc Literal encodings
  • SOAP for messages
  • WSDL for service description
  • DISCO for service discovery (deprecated)
  • UDDI 1.0
  • Extended by Web Services Development Kit
  • a.k.a GXA-Toolkit

12
.NET Class Library.NET Framework
13
A simple Web Service
  • Create a virtual directory
  • Place the code below into a file saved with .asmx
    extension
  • Save the file in the virtual directory
  • Navigate to .asmx file via browser
  • ASP.NET Framework will generate a UI and server
    stub for invoking the Web service methods to test

Directive binds classname to web service

using System.Web.Services public class MyMath
WebService WebMethod public int A
dd(int num1, int num2) return num1num2

Derivation is optional and allows intrinsic
ASP.NET objects such as Request, Response,
Session, etc.
Attribute to expose method as Web Method
14
Client Side Code
  • WSDL.EXE
  • Tool for automatically generating client side
    proxy to invoke Web service
  • Will generate code in VB or C
  • Can invoke manually at command line
  • wsdl.exe http//localhost/virtdir/myservice.asmx
    /lcs
  • Generates local .cs file with code to use from
    client application
  • Client code
  • Client uses WSDL generated proxy file just like
    actual class
  • Proxy handles all XML processing
  • For outbound request
  • For inbound response
  • Can modify proxy class to trace calls to and from
    Web Service

15
WSDL.EXE
  • Manually generating a client proxy

run wsdl to generate proxy class
WSDL.EXE
.asmx file
Generated Proxy Class
Client
Stub
proxy generates and processes xml over http to
invoke web service methods
Remote Server
client programs against proxy class
16
Client Code With WSDL Proxy
  • Two ways to hook client to proxy code
  • First approach
  • Manually generate proxy
  • Pull generated class file into project
  • Second approach
  • Add Web Reference from VS.NET project
  • VS.NET takes care of the rest
  • Client code
  • Programs against proxy class
  • Just like any other class
  • No need to hand role XML in the client
  • Easier to modify proxy class for tracing if
    manual approach is used

17
A Demo Web services
  • Consuming web service
  • Building a Web service

18
Questions / Resources
  • Advanced Web Services
  • http//msdn.microsoft.com/webservices/understandin
    g/advancedwebservices/default.aspx?pull/library/e
    n-us/dnwebsrv/html/wsoverview.asp
  • UDDI
  • http//uddi.ibm.com
  • http//uddi.microsoft.com

19
Web Services Standards
WS-Coord BPEL4WS BPML
Service Integration
Quality of Service
Transactions
Security
Management
WSDL
Service Description
XML Sig WS-Sec SAML
HTTP-R WS- Routing
BTP WS-Trans
???
20
WS Tech. stack simply put
UDDI Universal Description, Discovery Integrati
on
http//uddi.ibm.com http//uddi.microsoft.com
Address Book
WSDL Web Services Description Language
Address Entry
SOAPSimple Object Access Protocol
Mailed package Currier and related rules
XML Extensible Markup language
Message language
HTTP Hypertext Transfer Protocol
Shipping Mode Shipping mode Rail, Air,
Write a Comment
User Comments (0)
About PowerShow.com