projekt systemintegration datler, kroiß, sachs systemintegration ilv, fl / mic- 2 (ss2014)
Post on 06-Apr-2015
121 Views
Preview:
TRANSCRIPT
Projekt Systemintegration Datler, Kroiß, Sachs
Systemintegration ILV, FL / MIC-2 (SS2014)
Aufgabenstellung
Im Rahmen dieses Projektes sollen verschiedene Arten von Web Services entwickelt
und in einer Applikation integriert werden.
2© 2013/14 FH Technikum Wien
Architekturüberblick - Angabe
3© 2013/14 FH Technikum Wien
Architekturüberblick - Umsetzung
4© 2013/14 FH Technikum Wien
AutoverleihPython
http://sintrest-sumpfgottheit.rhcloud.comOpenShift - Red Hats Cloud Angebot, AWS, US Region
WährungsrechnerJava
http://lnurn3.schlof.net:8080/SOAP_CurrencyConverter/wsdl/CurrencyConverter.wsdlNetcup Serverhousing, Nürnberg, DE
Google MapsGoogle Distance Matrix
VerleihnixPython
http://sintapp.herokuapp.com/leihen/Heroku, AWS, EU Region
REST
SOAP
REST
GoogleAPI-CacheRedisLabs, AWS, US Region
Google Maps
Google Distance Matrix
5© 2013/14 FH Technikum Wien
Google Distance Matrix
Ermittlung von Reise-Distanzen zwischen zwei Positionen Users of the free API:
– 100 elements per query.– 100 elements per 10 seconds.– 2 500 elements per 24 hour period.
Aufruf: http://maps.googleapis.com/maps/api/distancematrix/output?parameters– Parameter: origins, destinations, key (optional)
Return Value:– JSON oder XML JSON
6© 2013/14 FH Technikum Wien
Google Distance Matrix
Aufruf: http://maps.googleapis.com/maps/api/distancematrix/json?origins=Vienna&destinations=Graz&mode=bicycling&language=en-DE&sensor=false
Parameter: Origins Destinations Mode (optional) Language (optional key (optional)
Return Value:– JSON oder XML JSON{ "destination_addresses" : [ "Graz, Austria" ], "origin_addresses" : [ "Vienna, Austria" ], "rows" : [ { "elements" : [ { "distance" : { "text" : "210 km", "value" : 210314 }, "duration" : { "text" : "12 hours 14 mins", "value" : 44054 }, "status" : "OK" } ] } ], "status" : "OK"}
7© 2013/14 FH Technikum Wien
Währungsumrechner
JAVA & SOAP
8© 2013/14 FH Technikum Wien
Currency Converter
Technologoie: Java
IDE: Eclipse JEE Kepler
SOAP / WSDL basiert
WSDL auf:– http://lnurn3.schlof.net:8080/SOAP_CurrencyConverter/wsdl/
CurrencyConverter.wsdl
Nützliches Tool: http://wsdlbrowser.com/
9© 2013/14 FH Technikum Wien
Currency Converter – getCurrencyList()
String[ ] getCurrencyList()
10© 2013/14 FH Technikum Wien
Currency Converter – getConversionRate() Double
getConversionRate(double _val, String _fromCur, String _toCur)
11© 2013/14 FH Technikum Wien
Currency Converter –Überprüfung des Algorithmus
12© 2013/14 FH Technikum Wien
Lessons Learned
Deployment auf public hosting services war eine Herausforderung
Ausgangsdatei vom Aufbau „unkonventionell“
13© 2013/14 FH Technikum Wien
Autoverleih
Python & REST
14© 2013/14 FH Technikum Wien
REST API - GET
REST_URL=“http://sintrest-sumpfgottheit.rhcloud.com/api”
curl $REST_URL/kunden/2{ "city": "Tamsweg", "country": "\u00d6sterreich", "id": 2, "leihen": [], "name": "Bob Builder", "plz": "5589", "street": "Lederwaschstrasse 2"}
15© 2013/14 FH Technikum Wien
REST API - PUT
REST_URL=“http://sintrest-sumpfgottheit.rhcloud.com/api”
curl -X PUT -H "Content-Type: application/json" -d '{"street": "Erlenweg 1" }' $REST_URL/kunden/2{ "city": "Tamsweg", "country": "\u00d6sterreich", "id": 2, "leihen": [], "name": "Bob Builder", "plz": "5589", "street": "Erlenweg 1"}
16© 2013/14 FH Technikum Wien
REST API - POST
REST_URL=“http://sintrest-sumpfgottheit.rhcloud.com/api”
curl -X POST -H "Content-Type: application/json" –d ’{“name": "Lana Horvat",
"street" : "Murve ulica 66", "city" : "Novigrad", "plz" : "52466" , "country" : "Kroatien" }’
$REST_URL/kunden
17© 2013/14 FH Technikum Wien
REST API - DELETE
REST_URL=“http://sintrest-sumpfgottheit.rhcloud.com/api”
curl -X DELETE $REST_URL/kunden/6
18© 2013/14 FH Technikum Wien
Lessons Learned, Difficulty Easy
REST– curl– Python: requests Library
SOAP– Wenn man eine funktioniernde LIB
gefunden hat
19© 2013/14 FH Technikum Wien
Lessons Learned, Difficulty There be Dragons
Deployment– „In der Eclipse geht’s“
Gr⅞bere Encodingprobleme Different Configs for Different Cloudproviders Did I mention Deployment
20© 2013/14 FH Technikum Wien
top related