Monday, October 26, 2009

remove outdated files based on minor build number

I've created a script to remove old installation file based on the minor build number.
In one project I'm working on, we need to keep the file with the largest build number. Here's a sample to check which build number is the latest one.

for file in `find . -name \*$ESBPREFIX\*.isvp`
do
# echo $file
NAMELENGTH=`expr length $file`
POSITION=`expr $NAMELENGTH - 7`
ESBVERSION=`expr substr $file $POSITION 3`
if [ `expr index $ESBVERSION "."` -eq 1 ]; then
ESBVERSION=`expr substr $ESBVERSION 2 2`
fi
if [ `expr index $ESBVERSION "."` -eq 2 ]; then
ESBVERSION=`expr substr $ESBVERSION 3 1`
fi
# echo "[CO Build Number: $ESBVERSION]"
if [ $ESBVERSION -gt $MAXESBBDNR ]; then
MAXESBBDNR=$ESBVERSION
fi
done

Tuesday, October 06, 2009

Firing SOAP requests via Excel

Here's a tutorial about how to fire a soap request via Excel
http://www.brainbell.com/tutorials/ms-office/excel/Access_SOAP_Web_Services_From_Excel.htm .
The prerequisite is to get "Office Web Services Toolkit" from Microsoft website; then you can use it in VBA.
It'll be quite handy for those guys who work with SOA projects. A simple VBA can be built within excel worksheet to load soap request from OS and send it to the web service endpoint.