text: #include "MainController.h"
  #include <thread>
  #include "MSNNotificationServer.h"
  #include "MSNSwitchboardServer.h"
  #include "SoapService.h"
  #include "RST2Handler.h"
  #include "FindContactsPagedHandler.h"
  #include "FindMembershipHandler.h"
  #include "GetProfileHandler.h"
  #include "ShareItemHandler.h"
  #include "ABGroupAddHandler.h"
  #include "CreateCircleHandler.h"
  #include <vector>
  using namespace wlmatrix;
  
  /* Constructor */
  MainController::MainController()
  {
  
   	_notifServer.listen();
  	_switchboardServer.listen();
  	this->initWebServer();
  }
  
  void MainController::initWebServer()
  {
  	auto authService = std::make_shared<SoapService>(std::vector<std::shared_ptr<ISoapEndpointHandler>>({std::make_shared<RST2Handler>()}));
  	auto abservice = std::make_shared<SoapService>(std::vector<std::shared_ptr<ISoapEndpointHandler>>({std::make_shared<FindContactsPagedHandler>(), std::make_shared<ABGroupAddHandler>()}));
  	auto sharingservice = std::make_shared<SoapService>(std::vector<std::shared_ptr<ISoapEndpointHandler>>({std::make_shared<FindMembershipHandler>(), std::make_shared<CreateCircleHandler>()}));
  	auto storageService = std::make_shared<SoapService>(std::vector<std::shared_ptr<ISoapEndpointHandler>>({std::make_shared<GetProfileHandler>(), std::make_shared<ShareItemHandler>()}));
  	_webServer.registerSoapService(authService);
  	_webServer.registerSoapService(abservice);
  	_webServer.registerSoapService(sharingservice);
  	_webServer.registerSoapService(storageService);
  	_webServer.listen();
  }