Tutorial: Web Services Was ist das? Wozu sind Web · PDF file(PHP, Perl, C++, Java 2) aus: Professional PHP Web Services ... „Tutorial: Web Services“ – IuK-Herbsttagung 2003,

Embed Size (px)

Citation preview

  • Tutorial: Web Services

    Was ist das?

    Wozu sind Web Services ntzlich?

    Wie implementiere ich eigene Web Services

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    2

    Bei Web Services handelt es sich umSoftwarebausteine, die auf verschiedenenNetzwerkrechnern laufen und ber dasInternet zu einer Anwendung verbundenwerden.

    Profi4Project.com, 19.07.2002

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    3

    Was sind Web Services?

    Ist jetzt jeder Web Browser und jeder Web Server ein Web Service?

    Nein, denn die Idee ist es, dass die Programme eines Web Services ber ein XML-gekapseltes Protokoll kommunizieren.

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    4

    Protokolle

    Time Services: ntpUser Verwaltung: yp-servicesFile Transfer: ftp...jeder Dienst hat ein eigenes Protokoll...

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    5

    Protokolle

    Protokoll/StandardLayer

    TCP/IP, UDPNetwork

    HTTP, SMTP, FTP, NTP, YP

    Transport

    HTML, MVOP, ...Messaging

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    6

    XML-gekapselte Protokolle

    Protokoll/StandardLayer

    TCP/IP, UDPNetwork

    HTTP, SMTP, FTPTransport

    SOAP, XML-RPCMessaging

    Content InformationContent

    Die Protokolle und Standards aller Layer nur in Auswahl.

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    7

    Web Service Technology Stack

    Protokoll/StandardLayer

    TCP/IP, UDPNetwork

    HTTP, SMTP, FTPTransport

    SOAP, XML-RPCMessaging

    WSDL, RDFDescription

    UDDI, DISCO, WSILDiscovery

    Die Protokolle und Standards aller Layer nur in Auswahl.

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    8

    Hintergrund und Motivation

    Die Integration wird mit Web Services nicht neu erfunden.

    Client-Server Architektur ist alt bekannt.Durch standardisierte Schnittstellen und Proto-

    kolle wird die Technik entschieden einfacher.Damit ist eine Konzentration auf die

    Modelli erung und das Management mglich....also, lasst uns aufbrechen, von monolithischen

    Client-Server-Architekturen zu komponenten-basierten Web Services ...

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    9

    Vorlufer

    CORBA (Component Object Request Broker Architecture)

    DCOM (Distributed Component ObjectModel)

    Enterprise Java Beans (in J2EE)

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    10

    Blick in die reale Welt

    .Net My Services .Net PassportGoogleAmazonVASCODA ...Warum gibt es nur so wenige wirkliche

    Implementationen?

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    11

    Blick in die reale Welt

    .Net My Services .Net PassportGoogleAmazonVASCODA ...Warum gibt es nur so wenige wirkliche

    Implementationen?

    www.xmethods.org

    Viele Beispiele, die meistenhaben aber eher einen beschrnkten Funktionsumfangund sind im wesentlichen nichtmehr ein als Proof-of-Concept.

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    12

    Beispiel: Google

    www.google.com/apis/

    Google

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    13

    Beispiel: Google

    www.google.com/apis/

    Google

    Search Web ServiceMonitoringMarktforschungAlertingeigene Suchmaske...

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    14

    Beispiel: Google

    www.google.com/apis/

    Google Rechtschreibprfung

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    15

    Wie aktuell sind Web Services?

    Antwort: Es gibt seit Ende 2002 quasi einen Hype.

    .NetUngelste Probleme:

    Kaum Standards zur Sicherheit der DiensteEs fehlt an Ideen fr ein Business-Modell

    Subscription based servicesTransaction based business model

    Es fehlt an Ideen fr wirklich neue Dienste

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    16

    Grundlegende Architektur: SOA

    ServiceVerzeichnis

    ServiceAnbieter

    ServiceKonsument

    Anfrage

    Erge

    bnis

    Such

    e

    Antwort

    Publizieren

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    17

    Standards

    SOAP (v 1.2 W3C Standard)Protokoll fr die Nachrichten, die zwischen Web Service-Konsument und Web Service-Anbieter ausgetauscht werden. XML-basiert. Beruht ursprnglich auf Entwicklungen von Microsoft und IBM. Transport-Protokoll ist meist, aber nicht zwingend, HTTP.

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    18

    Standards

    SOAP (v 1.2 W3C Standard)WSDL (W3C)Standard fr die Beschreibung dessen, was zwischen Konsument und Anbieter geschickt wird.

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    19

    Standards

    SOAP (v 1.2 W3C Standard)WSDL (W3C)UDDI (OASIS)Bildet die Basis fr einen Verzeichnisdienstfr Web Services.

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    20

    Grundlegende Architektur: SOA

    ServiceVerzeichnis

    ServiceAnbieter

    ServiceKonsument

    Anfrage

    Antwort

    PublizierenEr

    gebn

    isSu

    che

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    21

    Was ist SOAP?

    Simple Object Access ProtocolXML-basiertes Protokoll zur Kommunikation

    zwischen Anwendungen

    Entwickelt 1998 von Microsoft (XML-RPC)Weiterentwickelt von Microsoft und IBM (SOAP

    1.0)

    Seit 2000 Weiterentwicklung durch W3C (Version 1.2)

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    22

    Was ist SOAP?

    Uns interessiert hier insbesondere SOAP als Protokoll zur Kommunikation zwischen Web Service Consumer und Web Service Provider.

    Es gibt zwei Interaktion-Muster:Remote Procedure Call (RPC)Document Exchange (document/literal)

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    23

    RPC vs. D/L

    RPC-kodiertes SOAPEnthlt einen MethodenaufrufDefiniert Datentypen

    Document/literal kodiertes SOAPEnthlt nur die eigentliche NachrichtKeine Typisierung.NET verwendet D/L standardmig

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    24

    Web Service Architektur

    $SSOLFDWLRQ/RJLF '%

    $SSO/RJLF

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    25

    Grundlegende Architektur: SOA

    ServiceVerzeichnis

    ServiceAnbieter

    ServiceKonsument

    Anfrage

    Antwort

    PublizierenEr

    gebn

    isSu

    che

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    26

    Web Service Architektur

    :HE6HUYLFH&RQVXPHU

    $SSOLFDWLRQ/RJLF

    :HE6HUYLFH3URYLGHU

    '%$SSO/RJLF

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    27

    Web Service Architektur

    :HE6HUYLFH&RQVXPHU

    $SSOLFDWLRQ/RJLF

    :67RRONLW

    :HE6HUYLFH3URYLGHU

    '%

    :67RRONLW

    $SSO/RJLF

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    28

    Web Service Architektur

    :HE6HUYLFH&RQVXPHU

    $SSOLFDWLRQ/RJLF

    :67RRONLW

    :HE6HUYLFH3URYLGHU

    '%

    :67RRONLW

    0HVVDJH62$3

    $SSO/RJLF

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    29

    Web Service Architektur

    :HE6HUYLFH&RQVXPHU

    $SSOLFDWLRQ/RJLF

    :67RRONLW

    :HE6HUYLFH3URYLGHU

    '%

    :67RRONLW

    1HWZRUN7&3,37UDQVSRUW+7730HVVDJH62$3

    $SSO/RJLF

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    30

    Web Service Architektur

    :HE6HUYLFH&RQVXPHU :6'/

    $SSOLFDWLRQ/RJLF

    :67RRONLW

    :HE6HUYLFH3URYLGHU

    '%

    :67RRONLW

    1HWZRUN7&3,37UDQVSRUW+7730HVVDJH62$3

    'HVFULEH5HDG $SSO/RJLF

  • Tutorial: Web Services IuK-Herbsttagung 2003, Bad HonnefThomas Severiens, [email protected]

    31

    Core Software Components

    ClientServiceListener

    ServiceInterface

    ServiceImplementation

    SOAPResponse

    Execution ReturnValue / Result

    Netzwerk

    SOAP Requestvia HTTP

    POST

    HTTPD(Apache)

    SOAP Imple-mentation und

    WSDL Beschreibung

    Anwend