Index: src/clientcommandline/CMakeLists.txt
===================================================================
--- src/clientcommandline/CMakeLists.txt	(revision fb602c6c09bb8ed836662550917a2d269f04526b)
+++ src/clientcommandline/CMakeLists.txt	(revision 93ea008b0e411edb8b21375d92f22d79b60e2b09)
@@ -36,4 +36,6 @@
 SET(src_CPP
 	main.cpp
+	inputoutputhandler.cpp
+	stationsregister.cpp
 )
 
Index: src/clientcommandline/inputoutputhandler.cpp
===================================================================
--- src/clientcommandline/inputoutputhandler.cpp	(revision 93ea008b0e411edb8b21375d92f22d79b60e2b09)
+++ src/clientcommandline/inputoutputhandler.cpp	(revision 93ea008b0e411edb8b21375d92f22d79b60e2b09)
@@ -0,0 +1,75 @@
+/*
+    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+    MA 02110-1301  USA.
+*/
+
+#include "inputoutputhandler.h"
+#include "moc_inputoutputhandler.cpp"
+
+#include <QTextStream>
+
+#include <iostream>
+#include <string>
+
+InputOutputHandler::InputOutputHandler(QObject* parent)
+	: QObject(parent)
+{
+	_out = new QTextStream(stdout);
+	_in = new QTextStream(stdin);
+}
+
+InputOutputHandler::~InputOutputHandler()
+{
+	if(_out)
+		delete _out;
+	if(_in)
+		delete _in;
+}
+
+QString InputOutputHandler::readLine()
+{
+	if(!_in)
+		return QString();
+	
+	_in->skipWhiteSpace(); //Important line!
+	return _in->readLine();
+}
+
+bool InputOutputHandler::print(const QString& content)
+{
+	if(!_out)
+		return false;
+	*_out << content << flush;
+	return true;
+}
+
+InputOutputHandler& InputOutputHandler::operator<<(const QString& output)
+{
+	print(output);
+	return *this;
+}
+
+InputOutputHandler& InputOutputHandler::operator>>(QString& input)
+{
+	input = readLine();
+	return *this;
+}
+
+InputOutputHandler& endl(InputOutputHandler &handler)
+{
+	return handler << "\n";
+}
Index: src/clientcommandline/inputoutputhandler.h
===================================================================
--- src/clientcommandline/inputoutputhandler.h	(revision 93ea008b0e411edb8b21375d92f22d79b60e2b09)
+++ src/clientcommandline/inputoutputhandler.h	(revision 93ea008b0e411edb8b21375d92f22d79b60e2b09)
@@ -0,0 +1,55 @@
+/*
+    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+    MA 02110-1301  USA.
+*/
+
+#ifndef INPUTOUTPUTHANDLER_H
+#define INPUTOUTPUTHANDLER_H
+
+#include <QObject>
+
+class QTextStream;
+
+class InputOutputHandler : public QObject
+{
+	Q_OBJECT
+	public:
+		InputOutputHandler(QObject *parent = NULL);
+    ~InputOutputHandler();
+
+		QString readLine();
+		
+		InputOutputHandler& operator<<(const QString &output);
+		InputOutputHandler& operator>>(QString &input);
+
+	public slots:
+			/**
+			 * @brief Prints @p content to STDOUT
+			 */
+		  bool print(const QString& content);
+
+	private:
+		QTextStream *_out, *_in;
+};
+
+typedef InputOutputHandler& (*InputOutputHandlerFunction)(InputOutputHandler&);// manipulator function
+inline InputOutputHandler& operator<<(InputOutputHandler &handler, InputOutputHandlerFunction function)
+{ return (*function)(handler); }
+
+InputOutputHandler& endl(InputOutputHandler &handler);
+
+#endif // INPUTOUTPUTHANDLER_H
Index: src/clientcommandline/main.cpp
===================================================================
--- src/clientcommandline/main.cpp	(revision fb602c6c09bb8ed836662550917a2d269f04526b)
+++ src/clientcommandline/main.cpp	(revision 93ea008b0e411edb8b21375d92f22d79b60e2b09)
@@ -18,8 +18,7 @@
 */
 
-// #include "testexecuter.h"
-// #include <settings.h>
+#include "siweatherclientconfig.h"
 
-#include "siweatherclientconfig.h"
+#include "stationsregister.h"
 
 #include <ecmdlineargs.h>
@@ -29,4 +28,7 @@
 #include <QCoreApplication>
 #include <QTimer>
+#include <QTextStream>
+
+#include <iostream>
 
 int main ( int argc, char** argv )
@@ -44,5 +46,4 @@
 		return 1;
 
-
 	QCoreApplication app(argc, argv);
 	QString error;
@@ -50,13 +51,17 @@
 
 	if(args->isSet("register")){
-// 		StationsRegister *stationsRegister = new StationsRegister();
+		StationsRegister *stationsRegister = new StationsRegister();
+		QTimer::singleShot(1, stationsRegister, SLOT(registerStation()));
 	}
 // 	else if(){
 // 		
 // 	}
+	else{
+		QTextStream stream(stdout);
+		stream << "Please specify an option" << endl;
+		return -2;
+	}
 
-// 	TestExecuter test;
 	// allow to start the event loop before executing our code
-// 	QTimer::singleShot(1, &test, SLOT(load()));
 	return app.exec();
 }
Index: src/clientcommandline/stationsregister.cpp
===================================================================
--- src/clientcommandline/stationsregister.cpp	(revision 93ea008b0e411edb8b21375d92f22d79b60e2b09)
+++ src/clientcommandline/stationsregister.cpp	(revision 93ea008b0e411edb8b21375d92f22d79b60e2b09)
@@ -0,0 +1,136 @@
+/*
+    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+    MA 02110-1301  USA.
+*/
+
+#include "stationsregister.h"
+#include "moc_stationsregister.cpp"
+
+#include "inputoutputhandler.h"
+
+#include <siweatherstation.h>
+
+#include <QCoreApplication>
+
+using namespace SiWeather::Library;
+
+StationsRegister::StationsRegister(QObject* parent)
+	: QObject(parent)
+{
+	_ioHandler = new InputOutputHandler(this);
+}
+
+void StationsRegister::registerStation()
+{
+	QUrl baseUrl("http://localhost:9999/0.1/");
+	
+	*_ioHandler << tr("Please enter some data to describe your station") << endl;
+	SiWeatherStation station;
+	
+	*_ioHandler << tr("Name") +": ";
+	station.setName(_ioHandler->readLine());
+	
+	*_ioHandler << tr("City") +": ";
+	station.setCity(_ioHandler->readLine());
+	
+	station.setLatitude(getCoordinate(tr("Latitude")).toDouble());
+	station.setLongitude(getCoordinate(tr("Longitude")).toDouble());
+	
+	*_ioHandler << tr("Your E-Mail Address") +": ";
+	station.setEMail(_ioHandler->readLine());
+	
+	QString defaultType = "siweatherstation 1";
+	*_ioHandler << tr("Type, describing your station") +" ["+ defaultType +"]: ";
+	QString type = _ioHandler->readLine();
+	if(type.isEmpty())
+		type = defaultType;
+	station.setType(type);
+	
+	*_ioHandler << tr("Url with information about your type (optional)") + ": ";
+	station.setTypeUrl(_ioHandler->readLine());
+	
+	if(!station.isValidForRegister()){
+		*_ioHandler << tr("Your station is not valid for register at the webservice.") << endl;
+		*_ioHandler << tr("This means, the name, city, e-mail address or type is empty.") << endl;
+	}
+	else{
+		*_ioHandler << tr("Your station is defined as follows:") << endl;
+		*_ioHandler << "  "+ tr("Name: ") + station.name() << endl;
+		*_ioHandler << "  "+ tr("City: ") + station.city() << endl;
+		*_ioHandler << "  "+ tr("Latitude: ") + QString::number(station.latitude()) << endl;
+		*_ioHandler << "  "+ tr("Longitude: ") + QString::number(station.longitude()) << endl;
+		*_ioHandler << "  "+ tr("Type: ") + station.type() << endl;
+		*_ioHandler << "  "+ tr("Type Url: ") + station.typeUrl().toString() << endl;
+		*_ioHandler << "  "+ tr("E-Mail: ") + station.eMail() << endl;
+		*_ioHandler << tr("Do you want to register this station at %1? (Y/n) [n]").arg(baseUrl.host()) +": ";
+		if(_ioHandler->readLine() != "Y"){
+			*_ioHandler << tr("Aborting!") << endl;
+			qApp->quit();
+			return;
+		}
+		*_ioHandler << tr("Registering station...");
+		
+		SiWebserviceClient *client = new SiWebserviceClient(baseUrl, this);
+		connect(client, SIGNAL(error(SiWeather::Library::SiWebserviceClient::ReplyType, const QString&)),
+						this, SLOT(webserviceError(SiWeather::Library::SiWebserviceClient::ReplyType,QString)));
+		connect(client, SIGNAL(finishedStationsRegister(bool, const QUuid&, const QString&)),
+						this, SLOT(webserviceFinished(bool,QUuid,QString)));
+		QString errorMessage;
+		if(client->stationsRegister(station, errorMessage) != SiWebserviceClient::StationsRegister){
+			*_ioHandler << "      "+ tr("FAILED") << endl;
+			*_ioHandler << "  "+ errorMessage << endl;
+			qApp->quit();
+			return;
+		}
+	}
+}
+
+void StationsRegister::webserviceError(SiWeather::Library::SiWebserviceClient::ReplyType replyType, const QString& message)
+{
+	if(replyType != SiWebserviceClient::StationsRegister)
+		return;
+
+	*_ioHandler << "      "+ tr("FAILED") << endl;
+	*_ioHandler << "  "+ message << endl;
+	qApp->quit();
+}
+
+void StationsRegister::webserviceFinished(bool result, const QUuid& stationUuid, const QString& message)
+{
+	if(!result){
+		*_ioHandler << "      "+ tr("FAILED") << endl;
+		*_ioHandler << "  "+ message << endl;
+		qApp->quit();
+		return;
+	}
+	
+	*_ioHandler << "      "+ tr("SUCCESS") << endl;
+	*_ioHandler << "  "+ tr("Registered station with uuid %1").arg(stationUuid.toString()) << endl;
+	*_ioHandler << "  "+ message << endl;
+	qApp->quit();
+}
+
+QString StationsRegister::getCoordinate(const QString& type)
+{
+	*_ioHandler << tr("%1 (at least 4 digits, point as separator)").arg(type) +": ";
+	QString coordinate = _ioHandler->readLine();
+	if(coordinate.right(5).left(1) != "."){
+		*_ioHandler << tr("Your %1 does not contain 4 digits. Try it again!").arg(type) << endl;
+		return getCoordinate(type);
+	}
+	return coordinate;
+}
Index: src/clientcommandline/stationsregister.h
===================================================================
--- src/clientcommandline/stationsregister.h	(revision 93ea008b0e411edb8b21375d92f22d79b60e2b09)
+++ src/clientcommandline/stationsregister.h	(revision 93ea008b0e411edb8b21375d92f22d79b60e2b09)
@@ -0,0 +1,48 @@
+/*
+    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+    MA 02110-1301  USA.
+*/
+
+#ifndef STATIONSREGISTER_H
+#define STATIONSREGISTER_H
+
+class InputOutputHandler;
+
+#include <siwebserviceclient.h>
+
+#include <QPointer>
+
+class StationsRegister : public QObject
+{
+	Q_OBJECT
+	public:
+		StationsRegister(QObject *parent = NULL);
+
+	public slots:
+		void registerStation();
+
+	private slots:
+		void webserviceError(SiWeather::Library::SiWebserviceClient::ReplyType replyType, const QString &message);
+		void webserviceFinished(bool result, const QUuid &stationUuid, const QString &message);
+		
+	private:
+		QString getCoordinate(const QString &type);
+		
+		QPointer<InputOutputHandler> _ioHandler;
+};
+
+#endif //STATIONSREGISTER_H
Index: src/lib/siweatherstation.cpp
===================================================================
--- src/lib/siweatherstation.cpp	(revision fb602c6c09bb8ed836662550917a2d269f04526b)
+++ src/lib/siweatherstation.cpp	(revision 93ea008b0e411edb8b21375d92f22d79b60e2b09)
@@ -114,4 +114,18 @@
 }
 
+
+bool SiWeatherStation::isValidForRegister() const
+{
+	if(_name.isEmpty())
+		return false;
+	if(_city.isEmpty())
+		return false;
+	if(_eMail.isEmpty())
+		return false;
+	if(_type.isEmpty())
+		return false;
+	return true;
+}
+
 void SiWeatherStation::init()
 {
Index: src/lib/siweatherstation.h
===================================================================
--- src/lib/siweatherstation.h	(revision fb602c6c09bb8ed836662550917a2d269f04526b)
+++ src/lib/siweatherstation.h	(revision 93ea008b0e411edb8b21375d92f22d79b60e2b09)
@@ -51,4 +51,6 @@
 				void setEMail(const QString &address);
 				QString eMail() const;
+				
+				bool isValidForRegister() const;
 
 			private:
Index: src/tests/siwebserviceclienttest.cpp
===================================================================
--- src/tests/siwebserviceclienttest.cpp	(revision fb602c6c09bb8ed836662550917a2d269f04526b)
+++ src/tests/siwebserviceclienttest.cpp	(revision 93ea008b0e411edb8b21375d92f22d79b60e2b09)
@@ -85,4 +85,5 @@
 	station.setType("Test Type");
 
+	QCOMPARE(station.isValidForRegister(), true);
 	QCOMPARE(client->stationsRegister(station, errorMessage), SiWebserviceClient::StationsRegister);
 	QTest::qWarn(errorMessage.toUtf8());
