web services - bioinf · wsdl – webservice description language soap – simple object access...
TRANSCRIPT
![Page 2: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/2.jpg)
Praktikum aus Softwareentwicklung 2
2Java Praktikum – SS 2009 – [email protected]
Web Services
• Einführung– Definition, Eigenschaften, Anwendungen....
• JAX– Überblick, Architektur...
• JAX-RPC– Übersicht, Architektur…
![Page 3: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/3.jpg)
Praktikum aus Softwareentwicklung 2
3Java Praktikum – SS 2009 – [email protected]
• „...eine über das Internet zugängliche Programmier-Schnittstelle, basierend auf Internet-Technologien„
• „Mittels HTTP Adresse eindeutig identifizierbar.“• „Gemeinsame Nutzung von Programmfunktionen über
Rechnergrenzen.“
Web Services EinführungDefinition
![Page 4: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/4.jpg)
Praktikum aus Softwareentwicklung 2
4Java Praktikum – SS 2009 – [email protected]
• Lagerbestand von Händler abfragen– ISBN– Artikelbezeichnung
• Buchen von Flügen– Reisebüros bieten aktuelle Flüge verschiedener Gesellschaften (zentral)
• Abfragen an Suchmaschinen• Collaboration Plattformen
– Hersteller/Zulieferer...– http://www.covisint.com/
Web Services EinführungAnwendungsbeispiele (B2B)
![Page 5: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/5.jpg)
Praktikum aus Softwareentwicklung 2
5Java Praktikum – SS 2009 – [email protected]
Web Services Einführung Kommunikation
Lose Kopplung:HTTP - zustandsloses Kommunikationsprotokoll
XML - "neutrales" Beschreibungs- und Nachrichtenformat
![Page 6: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/6.jpg)
Praktikum aus Softwareentwicklung 2
6Java Praktikum – SS 2009 – [email protected]
Web Services Einführung Basistechnologien
Java, VB, .NET
Stellt HTTP Verbindung her
Java, VB, .NET
HTTP-Listener
DOM, SAX
Eine Komponente, dieAnwendungsfunktionalität bereit stellt
HTTP:TCP/IP, UDP
XML:SOAP, WSDL
DOM, SAX
![Page 7: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/7.jpg)
Praktikum aus Softwareentwicklung 2
7Java Praktikum – SS 2009 – [email protected]
Web Services EinführungService Orientierte Architektur (SOA)
![Page 8: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/8.jpg)
Praktikum aus Softwareentwicklung 2
8Java Praktikum – SS 2009 – [email protected]
ArchitekturTechnologie Stack
UDDI – Universal Description, Discovery and Integration
WSDL – Webservice Description Language
SOAP – Simple Object Access Protocoll
![Page 9: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/9.jpg)
Praktikum aus Softwareentwicklung 2
9Java Praktikum – SS 2009 – [email protected]
Web Services EinführungLinks
• Apache– http://ws.apache.org/axis/java/index.html– http://ws.apache.org/axis2/
• IBM– http://www-106.ibm.com/developerworks/webservices
• Microsoft– http://msdn.microsoft.com/webservices
• Sun Microsystems– http://java.sun.com/webservices
• W3C– http://www.w3.org/2002/ws
![Page 10: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/10.jpg)
Praktikum aus Softwareentwicklung 2
10Java Praktikum – SS 2009 – [email protected]
Web Services
• Einführung– Definition, Eigenschaften, Anwendungen....
• JAX-RPC– Übersicht, Architektur….
• JAX– Überblick, Architektur....
![Page 11: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/11.jpg)
Praktikum aus Softwareentwicklung 2
11Java Praktikum – SS 2009 – [email protected]
JAX-RPCÜbersicht
• Java API for XML based RPC• RPC = Remote Procedure Call• Programmierschnittstelle
– Für Entwicklung von Web Services– Für Entwicklung von Web Services Clients
![Page 12: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/12.jpg)
Praktikum aus Softwareentwicklung 2
12Java Praktikum – SS 2009 – [email protected]
• RPC – Remote Procedure Call– Sun RPC (NFS - Nework File System)– C/C++
• IIOP – Internet Inter-ORB Protocol– CORBA - Common Object Request Broker Architecture– Ziel ist Sprachunabhängigkeit– OMG Standard http://www.omg.org/
• DCOM – Distributed Component Object Model– Objektorientiertes RPC-System von Microsoft, COM Erweiterung– .NET Remoting und Enterprise Services ab MS Vista integriert
• RMI – Remote Method Invocation– 100% Java, Serialisierung (fast) beliebiger Objekte
JAX-RPCVorfahren und Verwandte
![Page 13: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/13.jpg)
Praktikum aus Softwareentwicklung 2
13Java Praktikum – SS 2009 – [email protected]
JAX-RPCClient/Server Schnittstelle
• Protokoll basiert auf SOAP• API “versteckt” hohe Komplexität• Ein Service X implementiert ein Interface welches ein oder
mehrere Remote Prozeduren des Services beschreibt• Client verwendet Stub Objekt zum Aufrufen von Methoden
des Service Objekts Tie
![Page 14: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/14.jpg)
Praktikum aus Softwareentwicklung 2
14Java Praktikum – SS 2009 – [email protected]
JAX-RPCClient/Server Schichten
![Page 15: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/15.jpg)
Praktikum aus Softwareentwicklung 2
15Java Praktikum – SS 2009 – [email protected]
• Web Service Description Language– Service Beschreibung in XML
• Server stellt WSDL zur Verfügung• Client Tool „versteht“ WSDL
– Generiert Client API (Java, .NET, C++)
JAX-RPCWSDL
![Page 16: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/16.jpg)
Praktikum aus Softwareentwicklung 2
16Java Praktikum – SS 2009 – [email protected]
JAX-RPCService: Java/WSDL Mapping
![Page 17: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/17.jpg)
Praktikum aus Softwareentwicklung 2
17Java Praktikum – SS 2009 – [email protected]
JAX-RPCDaten: Type Mappings
![Page 18: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/18.jpg)
Praktikum aus Softwareentwicklung 2
18Java Praktikum – SS 2009 – [email protected]
JAX-RPCEntwicklungsschritte
• Entwicklung des Webservices1. Implementierung:
Codierung des „service endpoint interface“ 2. Build (otpional): Generierung, Übersetzung und
Verpackung der Dateien welche für den Service benötigt werden – kann auch zur Laufzeit erfoglen, wie bei Axis via Reflection
3. Deploy: abhängig von Distribution (JAR, WAR, deployment descriptor…)
![Page 19: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/19.jpg)
Praktikum aus Softwareentwicklung 2
19Java Praktikum – SS 2009 – [email protected]
JAX-RPCArten von Clients
• 3 Arten von Webservice Clients– Static stub: die Stub-Klasse wird vor der Laufzeit erzeugt. Die Stub Klasse wird als statischer Proxy verwendet
– Dynamic proxy: die Stub-Klasse wird zur Laufzeit erzeugt und kann auch als dynamischer Proxy bezeichnet werden
– Dynamic invocation interface (DII): mit diesen Interface können Remote Procedures auch dann aufgerufen werden, wenn die Signatur oder der Service bis zur Laufzeit nicht bekannt sind. Diese Clients sind kompliziert zu entwickeln und man benötigt genau Kenntnisse von WSDL - Dokumenten
![Page 20: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/20.jpg)
Praktikum aus Softwareentwicklung 2
20Java Praktikum – SS 2009 – [email protected]
• REpresentational State Transfer• RESTful Web Services• Service Requests
– HTTP (GET, POST)– Kein WSDL - keine Methoden und Typ Informationen– Dokument Format nicht definiert: XML, JSON...– Clients APIs können nicht generiert werden
● Yahoo Web Services ● http://developer.yahoo.com/answers/
JAX-RPCAlernative REST
![Page 21: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/21.jpg)
Praktikum aus Softwareentwicklung 2
21Java Praktikum – SS 2009 – [email protected]
• Apache Axis– Axis 1– Axis 2
• Sun JAX-WS– https://jax-ws.dev.java.net/ – NetBeans– Ab Java 6 integriert
• XFire– http://xfire.codehaus.org/ – MyEclipse
• Alle basieren auf JAX-RPC
JAX-RPCJava Implementierungen
![Page 22: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/22.jpg)
Praktikum aus Softwareentwicklung 2
22Java Praktikum – SS 2009 – [email protected]
• Einführung– Definition, Eigenschaften, Anwendungen....
• JAX-RPC– Übersicht, Architektur…
• JAX– Überblick, Architektur....
Web Services
![Page 23: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/23.jpg)
Praktikum aus Softwareentwicklung 2
23Java Praktikum – SS 2009 – [email protected]
JAXÜberblick
• JAX – Java API‘s for XML• Unterteilung in 2 Arten:
– Prozedur-orientiert• JAX-RPC – Java API for XML-based RPC• JAXR – Java API for XML Registries
– Dokumenten-orientiert• JAXP – Java API für XML Processing• JAXB – Java Architecture for XML Binding• SAAJ – SOAP with Attachments API for Java (SAAJ ist eine Implementation von JAXM – Java API for XML Messaging
![Page 25: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/25.jpg)
Praktikum aus Softwareentwicklung 2
25Java Praktikum – SS 2009 – [email protected]
JAXJAXP
• JAXP – Java API für XML Processing– SAX API– Simple API for XML– DOM API – Document Object Model– XSLT API – XML Transformations
• XML Stylesheet Language (XSL) bestimmt wie die XML Daten angezeigt werden
• XSLT benutzt die Formatangaben von XSL für die Transformation
![Page 26: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/26.jpg)
Praktikum aus Softwareentwicklung 2
26Java Praktikum – SS 2009 – [email protected]
JAXJAXB – Bind Process
![Page 27: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/27.jpg)
Praktikum aus Softwareentwicklung 2
27Java Praktikum – SS 2009 – [email protected]
JAX JAXR - Registries
• Java API for XML Registries• Registries sind Verzeichnisse von Services• Generische API zum Abfragen/Bearbeiten von Registries, die JAXR Provider bereitstellen
• Unterstützt Vereinigungsmenge der Konzepte komplementärer Ansätze (z.B. UDDI, ebXML)
• Package: javax.xml.registry
![Page 28: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/28.jpg)
Praktikum aus Softwareentwicklung 2
28Java Praktikum – SS 2009 – [email protected]
JAX JAXR - Architketur
![Page 29: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/29.jpg)
Praktikum aus Softwareentwicklung 2
29Java Praktikum – SS 2009 – [email protected]
JAX SOAP
• Simple Object Access Protocol• Lightweight Message Protokoll• Getypter Datenaustausch zwischen Applikationen• Nachrichtenstruktur wird in XML definiert• Besonders geeignet für RPC Funktionalität• Lose Kopplung• Transport Binding über darunterliegendes Transport Protokoll - HTTP
![Page 31: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/31.jpg)
Praktikum aus Softwareentwicklung 2
31Java Praktikum – SS 2009 – [email protected]
JAX SOAP
• Spezifikation SOAP• W3C Spezifikation: http://www.w3.org• Umfasst:
– SOAP envelope – Struktur eine SOAP Nachricht– SOAP encoding – deserialisierungs Regeln– SOAP binding Framework – Binding an ein bestimmtes Transport Protokoll
– SOAP RPC
![Page 32: Web Services - Bioinf · WSDL – Webservice Description Language SOAP – Simple Object Access Protocoll. Praktikum aus Softwareentwicklung 2 Java Praktikum – SS 2009 – Gerald.Ehmayer@borland.com](https://reader034.vdocument.in/reader034/viewer/2022050714/5f09f2167e708231d4294356/html5/thumbnails/32.jpg)
Praktikum aus Softwareentwicklung 2
32Java Praktikum – SS 2009 – [email protected]
Ende der 8. Übung