David's Blog has no followers yet. Be the first one to follow.
goodfield: SOAP Client with Maven http://bit.ly/7kg6Ax #SOAP #maven #java
http://twitter.com/goodfield/statuses/6892237734
In combination with maven it is very simple to generate the access layer to an webservice by using its wsdl.
For this example I used an web service which gives access to the results of soccer league games: http://www.openligadb.de/.
First of all i had to decide which SOAP implementation and generator to use. I found three candidates:
http://ws.apache.org/axis2/
http://xfire.codehaus.org/
https://jax-ws.dev.java.net/
To use them with maven an corresponding plugin is needed. The plugin for jax-ws was the simplest one to use:
https://jax-ws-commons.dev.java.net/jaxws-maven-plugin/
After creating the maven project i modified the pom.xml and added this plugin:
4.0.0
ch.uebelacker.openligaclient
openligaclient
jar
1.0-SNAPSHOT
openligaclient
http://maven.apache.org
org.apache.maven.plugins
maven-compiler-plugin
1.6
1.6
org.codehaus.mojo
jaxws-maven-plugin
wsimport
http://www.openligadb.de/Webservices/Sportsdata.asmx?WSDL
ch.uebelacker.openligaclient
true
com.sun.xml.ws
jaxws-tools
2.1.3
junit
junit
3.8.1
test
After executing mvn install, i have everything i need to access the webservice:
Sportsdata tSportsdata = new Sportsdata();
for ( League tLeague : tSportsdata.getSportsdataSoap().getAvailLeagues().league )
{
System.out.println(tLeague.getLeagueShortcut() + " - " + tLeague.getLeagueName());
}
Proxy
If you’re behind a proxy you can pass the proxy configuration to the vm:
-Dhttp.proxyHost=192.168.82.1
-Dhttp.proxyPort=3128
http://david.uebelacker.ch/2009/12/21/soap-client-with-maven/
Date: Sep 19, 2009Number of Photos in Album: 133View Album
http://picasaweb.google.com/david.uebelacker/Japan2009
Urlaubsbilder schön aufbereitet und aufs iphone geladen um diese zu zeigen. Blöderweise kommen die Bilder in der Diashow nicht in der Reihenfolge wie man sich das gewünscht hat.
Das iPhone lässt auch keine Möglichkeit zu, die Bilder nach etwas anderem als dem Änderungsdatum zu sortieren. Dieses ist das Einzige Sortierargument, dass verwendet wird.
Aus diesem Grund muss man das Änderungsdatum der Bilder vor dem Übertragen auf das iPhone so abändern, dass dieses die Reihenfolge festlegt.
Leider ist dies aber nicht ganz so trivial bzw. Zeitaufwendig.
Falls die Namen der Bilder die Reihenfolge bereits festlegen, hilft folgendes kleines Skript (Linux/Mac) um das Änderungsdatum anzupassen. Es geht einfach alle Dateien in einem angegebenen Verzeichnis sortiert nach dem Namen durch und nimmt das aktuelle Datum zuzüglich 60 Sekunden für jedes Bild als Änderungsdatum.
#!/bin/bash
if [ $# -lt 1 ] || [ ! -d $1 ]
then
echo "Usage:"
echo " sort4iphone.sh [directory]"
else
echo "modifiing timestamps..."
cd $1
let TIMESTAMP=`date +%s`
for FILE in `ls`
do
MOD_DATE=`date -r $TIMESTAMP +%Y%m%d%H%M`
echo $FILE
touch -t $MOD_DATE $FILE
let TIMESTAMP=$TIMESTAMP+60
done
fi
http://david.uebelacker.eu/2009/08/22/iphone-bilder-sortieren/
goodfield: ubiquity rocks
http://twitter.com/goodfield/statuses/3328465602
#!/bin/bash
killall webcam
DATE=`date`
TIMESTAMP=`date +%s`
mplayer -tv driver=v4l:device=/dev/video0:width=640:height=480:outfmt=i420 -vc rawi420 -frames 1 -vo jpeg tv:// -really-quiet > /dev/null
mv 00000001.jpg /tmp/webcam.jpg
convert /tmp/webcam.jpg -resize 480x /tmp/webcam.jpg
convert -draw "text 10,20 \"$DATE\"" /tmp/webcam.jpg /tmp/webcam.jpg
curl -k -o /dev/null -T /tmp/webcam.jpg https://user:password@example.com/
http://david.uebelacker.eu/2009/07/15/webcam-glattbrugg-mit-ubuntumplayerimagemagickcurl/
Mit einem kleinen Skript, habe ich meine alte Logitech Quickcam zur Webcam umfunktioniert:
#!/bin/bash
killall webcam
DATE=`date`
TIMESTAMP=`date +%s`
mplayer -tv driver=v4l:device=/dev/video0:width=640:height=480:outfmt=i420 -vc rawi420 -frames 1 -vo jpeg tv:// -really-quiet > /dev/null
mv 00000001.jpg /tmp/webcam.jpg
convert /tmp/webcam.jpg -resize 480x /tmp/webcam.jpg
convert -draw "text 10,20 \"$DATE\"" /tmp/webcam.jpg /tmp/webcam.jpg
curl -k -o /dev/null -T /tmp/webcam.jpg https://user:password@webdav.example.com/
http://david.uebelacker.eu/2009/07/15/webcam-glattbrugg-mit-ubuntumplayerimagemagickcurl/
goodfield: #eclipse #galileo needs about 2 hours to build my project ... goin back to #ganymede
http://twitter.com/goodfield/statuses/2417229640
Als armer Java Entwickler habe ich lange Zeit den Hype um Ruby on Rails beobachtet. Die Video Tutorials waren doch sehr vielversprechend und ich wollte das umbedingt auch lernen.
Gott sei Dank hat das nie geklappt! Egal ob Ruby oder Java besser ist, ich bin und bleib Java Entwickler.
Inzwischen wurde der Ruby on Rails Ansatz für alle möglichen Programmiersprachen kopiert. Nicht die Programmiersprache Ruby war der Vorteil von Ruby on Rails, sondern der “Convention over Configuration” Ansatz.
Das Grails Projekt ist also sehr interresant für Java Entwickler, auch wenn man hier die Skriptsprache Groovy lernen muss.
Letzte Woche habe ich jedoch das richtige für mich gefunden: roo von springsource!
http://david.uebelacker.eu/2009/06/30/the-roo-the-roo-is-on-fire/
goodfield: jailbreaking ...... :-)
http://twitter.com/goodfield/statuses/2259338138
goodfield: checking http://bit.ly/199sz8
http://twitter.com/goodfield/statuses/2087521045
Ein paar Bilder und Video Sequenzen von meinem Urlaub in den Emiraten. Die Videos sind mit einer Mino HD aufgenommen und das Video habe ich mit iMovie 09 geschnitten.
http://david.uebelacker.eu/2009/06/06/emirates-2009/
Ein paar Bilder und Video Sequenzen von meinem Urlaub in den Emiraten.
http://david.uebelacker.ch/2009/06/06/emirates-2009/
Location: dubaiDate: Jun 6, 2009Number of Photos in Album: 71View Album
http://picasaweb.google.com/david.uebelacker/Dubai2009
goodfield: iphone streaming sucks !
http://twitter.com/goodfield/statuses/1115316143
goodfield: 2009 first day in the office .... oh yea
http://twitter.com/goodfield/statuses/1096719862
goodfield: SnowsfFg
http://twitter.com/goodfield/statuses/1062359400
goodfield: Working again in basel .... nice office :-)
http://twitter.com/goodfield/statuses/1058194780
goodfield: My first Champions league game ... Basel vs. Lisboa http://snipurl.com/7pe1o
http://twitter.com/goodfield/statuses/1047645750
goodfield: first step for android on the iphone is done :-) http://tinyurl.com/6hqdva
http://twitter.com/goodfield/statuses/1035869580
goodfield: Working in our nice office in basel :-)
http://twitter.com/goodfield/statuses/1034024675
goodfield: Exhausting weekend no relaxing at the office ;-)
http://twitter.com/goodfield/statuses/1031947146
Fürs Archiv eine kleine Anweisung um den Zeichensatz einer Oracle DB auszulesen:
SELECT userenv(’language’) “Language” FROM dual ;
Language
—————————————————-
GERMAN_GERMANY.WE8ISO8859P1
http://david.uebelacker.ch/2008/12/01/zeichensatz-einer-oracle-db-abfragen/
Fürs Archiv eine kleine Anweisung um den Zeichensatz einer Oracle DB auszulesen:
SELECT userenv(’language’) “Language” FROM dual ;
Language
—————————————————-
GERMAN_GERMANY.WE8ISO8859P1
http://david.uebelacker.eu/2008/12/01/zeichensatz-einer-oracle-db-abfragen/
goodfield: http://www.exsila.ch/ rocks!
http://twitter.com/goodfield/statuses/1022458143
goodfield: Yellow rules! http://snipurl.com/5alec
http://twitter.com/goodfield/statuses/999377317
goodfield: Käsfondue is empty :( http://snipurl.com/5ag25
http://twitter.com/goodfield/statuses/999186784
goodfield: Testing, testing, testing, testing, testing and afterwards i will test again ...
http://twitter.com/goodfield/statuses/994706410
goodfield: At the herbermess uf Basel http://snipurl.com/4we5r
http://twitter.com/goodfield/statuses/985164210
goodfield: [:-]-I- Halloween ! whatever
http://twitter.com/goodfield/statuses/983516303
goodfield: Its snowing :)! http://snipurl.com/4t65w
http://twitter.com/goodfield/statuses/980441246
goodfield: Goin for a beer or two :)
http://twitter.com/goodfield/statuses/977732182
goodfield: cant await ubuntu 8.1 ... i got in love with it!
http://twitter.com/goodfield/statuses/977299641
goodfield: Trying to get thruth this traffic light for about 15 min ;(((((((( http://snipurl.com/4j5hu
http://twitter.com/goodfield/statuses/967508292
goodfield: At Bibis dogkindergarten ;) http://snipurl.com/4h3l4
http://twitter.com/goodfield/statuses/965074250
goodfield: Don't want to go out ! http://snipurl.com/4er15
http://twitter.com/goodfield/statuses/962037883
goodfield: Just found the iphone version of the google reader http://www.google.com/reader/i nice!
http://twitter.com/goodfield/statuses/960507781
goodfield: dropios facebook integration is cool!
http://twitter.com/goodfield/statuses/957434963
goodfield: playing around with facebook
http://twitter.com/goodfield/statuses/952480298
goodfield: Back at work ... feling better, but still not perfect
http://twitter.com/goodfield/statuses/952425141
goodfield: Feeling f...... sick :( could not go to work today. Hope i will feel better!
http://twitter.com/goodfield/statuses/948430537
goodfield: Allitalia sucks, sucks really sucks ! On the way home
http://twitter.com/goodfield/statuses/947097164
goodfield: Greetings from ... http://snipurl.com/439ed
http://twitter.com/goodfield/statuses/946999433
goodfield: A ping from rome :)
http://twitter.com/goodfield/statuses/946196274
goodfield: Had an small accident this morning ... street was to small ;-) my mirror won against the one of another car!
http://twitter.com/goodfield/statuses/932806415
goodfield: monday, office, nothing more to say ;-)
http://twitter.com/goodfield/statuses/930162581
goodfield: On the way to the airport. Was a nice weekend in stockholm!
http://twitter.com/goodfield/statuses/929394197
goodfield: Indian food at hurry Curry!
http://twitter.com/goodfield/statuses/928346408
goodfield: Yesterday seightseeing, today shopping! Perfect weather again :)
http://twitter.com/goodfield/statuses/928243331

