apply fixes from Christians web services branch
https://code.launchpad.net/~christian-k/openpetraorg/20140624_webservices_branch__client_server_fixes
revision 2582 to 2587