Salome HOME
YACS in SSL mode
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 14 Apr 2021 07:17:38 +0000 (09:17 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Thu, 22 Apr 2021 09:17:14 +0000 (11:17 +0200)
19 files changed:
src/genericgui/GenericGui.cxx
src/genericgui/GuiExecutor.cxx
src/genericgui/ListJobs_GUI.cxx
src/genericgui/ListJobs_GUI.hxx
src/runtime/CMakeLists.txt
src/runtime/CORBANode.cxx
src/runtime/RuntimeSALOME.cxx
src/runtime/RuntimeSALOME.hxx
src/runtime/SALOME_NamingService_Wrapper.cxx [new file with mode: 0644]
src/runtime/SALOME_NamingService_Wrapper.hxx [new file with mode: 0644]
src/runtime/SalomeComponent.cxx
src/runtime/SalomeContainer.cxx
src/runtime/SalomeContainerTools.cxx
src/runtime/SalomeHPComponent.cxx
src/runtime/StudyNodes.cxx
src/salomegui/CMakeLists.txt
src/yacsloader/driver.cxx
src/yacsorb/YACS.py
src/ydfx_gui/SalomeResourceModel.cxx

index dfb33696bd22624445080b2db4f1cee82628d076..cf1bb68cfa650d8e868347e03e35221d4ed04568 100644 (file)
@@ -30,7 +30,8 @@
 #include "YACSGuiLoader.hxx"
 #include "ComponentInstance.hxx"
 
-#include "SALOME_NamingService.hxx"
+#include "ServiceUnreachable.hxx"
+#include "SALOME_NamingService_Wrapper.hxx"
 #include "SALOME_ModuleCatalog.hxx"
 #include "SALOME_ModuleCatalog.hh"
 #include "SALOMEDS_Tool.hxx"
@@ -115,7 +116,7 @@ GenericGui::GenericGui(YACS::HMI::SuitWrapper* wrapper, QMainWindow *parent)
       CORBA::ORB_ptr orb = runTime->getOrb();
       if (orb)
         {
-          SALOME_NamingService namingService(orb);
+          SALOME_NamingService_Wrapper namingService(orb);
           CORBA::Object_ptr obj = namingService.Resolve("/Kernel/ModulCatalog");
           SALOME_ModuleCatalog::ModuleCatalog_var aModuleCatalog =
             SALOME_ModuleCatalog::ModuleCatalog::_narrow(obj);
@@ -1003,7 +1004,7 @@ std::list<std::string> GenericGui::getMachineList()
   CORBA::ORB_ptr orb = runTime->getOrb();
   if (!orb) return _machineList;
 
-  SALOME_NamingService namingService(orb);
+  SALOME_NamingService_Wrapper namingService(orb);
   SALOME_LifeCycleCORBA lcc(&namingService);
 
   CORBA::Object_var obj =
index dadc41c745649d769c6ee872ac238d2e49d27c4a..451ba40ca17cb1b5a603a1c6bff3272591413527 100644 (file)
@@ -19,7 +19,8 @@
 
 #include <Python.h>
 #include "SALOME_LifeCycleCORBA.hxx"
-#include "SALOME_NamingService.hxx"
+#include "SALOME_NamingService_Wrapper.hxx"
+#include "SALOME_Launcher.hxx"
 
 #include "GuiExecutor.hxx"
 #include "GuiObserver_i.hxx"
@@ -33,6 +34,7 @@
 #include "OutputPort.hxx"
 #include "Executor.hxx"
 
+#include "KernelBasis.hxx"
 
 //#define _DEVDEBUG_
 #include "YacsTrace.hxx"
@@ -62,6 +64,10 @@ GuiExecutor::GuiExecutor(YACS::ENGINE::Proc* proc)
 
   _loadStateFile = "";
   _breakpointList.clear();
+  if(getSSLMode())
+  {
+    KERNEL::getLauncherSA();
+  }
 }
 
 
@@ -89,13 +95,16 @@ void GuiExecutor::startResumeDataflow(bool initialize)
       DEBTRACE("Create YACS ORB engine!");
       YACS::ENGINE::RuntimeSALOME* runTime = YACS::ENGINE::getSALOMERuntime();
       CORBA::ORB_ptr orb = runTime->getOrb();
-      SALOME_NamingService namingService(orb);
-      SALOME_LifeCycleCORBA lcc(&namingService);
-      ostringstream containerName;
-      containerName << "localhost/YACSContainer";
-      Engines::EngineComponent_var comp = lcc.FindOrLoad_Component(containerName.str().c_str(), "YACS" );
-      _engineRef =YACS_ORB::YACS_Gen::_narrow(comp);
-      YASSERT(!CORBA::is_nil(_engineRef));
+      SALOME_NamingService_Wrapper namingService(orb);
+      //int iii(0); std::cin >> iii;
+      {
+        SALOME_LifeCycleCORBA lcc(&namingService);
+        ostringstream containerName;
+        containerName << "localhost/YACSContainer";
+        Engines::EngineComponent_var comp = lcc.FindOrLoad_Component(containerName.str().c_str(), "YACS" );
+        _engineRef =YACS_ORB::YACS_Gen::_narrow(comp);
+        YASSERT(!CORBA::is_nil(_engineRef));
+      }
     }
 
   checkEndOfDataflow(); // --- to allow change of the _isRunning state
index 7aecbaad06172fcb68e80d77bd290d8d9e09c591..3ad8f08b3174f8b85c6b2eec1f00ad3e2db5054b 100644 (file)
@@ -80,8 +80,8 @@ BatchJobsListDialog::~BatchJobsListDialog(){
 void BatchJobsListDialog::getSalomeLauncher(){
   YACS::ENGINE::RuntimeSALOME* runTime = YACS::ENGINE::getSALOMERuntime();
   CORBA::ORB_ptr orb = runTime->getOrb();
-  SALOME_NamingService* NS = new SALOME_NamingService(orb);
-  CORBA::Object_var obj = NS->Resolve("/SalomeLauncher");
+  SALOME_NamingService_Wrapper NS;
+  CORBA::Object_var obj = NS.Resolve("/SalomeLauncher");
   _salome_launcher = Engines::SalomeLauncher::_narrow(obj);
   if (CORBA::is_nil(_salome_launcher))
     throw YACS::Exception("Salome Launcher not reachable!!");
index 8a93f200a3d70b707ad05e1dba753b651bc54afa..254fc548010f4a2154ec9e4325cc09be734927d2 100644 (file)
@@ -21,7 +21,7 @@
 #define LISTJOBS_GUI_H
 
 #include <QWidget>
-#include "SALOME_NamingService.hxx"
+#include "SALOME_NamingService_Wrapper.hxx"
 #include "SALOME_Launcher.hh"
 
 // Kind of column
index e266a3a7d119f539f1e1bdf331129e3cb944cd7c..b2f86dafb4875284eef5cc9a4201397977b7356c 100644 (file)
@@ -147,6 +147,7 @@ SET(YACSRuntimeSALOME_HEADERS
   DistributedPythonNode.hxx
   PyOptimizerAlg.hxx
   VisitorSalomeSaveState.hxx
+  SALOME_NamingService_Wrapper.hxx
   )
 
 # --- sources ---
@@ -214,6 +215,7 @@ SET(YACSRuntimeSALOME_SOURCES
   SalomeOptimizerLoop.cxx        
   PyOptimizerAlg.cxx             
   VisitorSalomeSaveState.cxx
+  SALOME_NamingService_Wrapper.cxx
   )
 
 # --- rules ---
index 00a8fc426cc78141ac32a29362f44b13fabf5115..1f9dedc8bf3951d2377401345c4374467b210740 100644 (file)
@@ -38,7 +38,7 @@
 #include "AutoLocker.hxx"
 
 #ifdef SALOME_KERNEL
-#include "SALOME_NamingService.hxx"
+#include "SALOME_NamingService_Wrapper.hxx"
 #include "SALOME_LifeCycleCORBA.hxx"
 #include "SALOME_Exception.hh"
 #endif
@@ -352,7 +352,7 @@ void SalomeNode::connectService()
   if(_setOfOutputDataStreamPort.size() == 0)return;
 
   CORBA::Object_var objComponent=((SalomeComponent*)_component)->getCompoPtr();
-  SALOME_NamingService NS(getSALOMERuntime()->getOrb()) ;
+  SALOME_NamingService_Wrapper NS(getSALOMERuntime()->getOrb()) ;
   SALOME_LifeCycleCORBA LCC(&NS) ;
   CORBA::Object_var obj = NS.Resolve("/ConnectionManager");
   Engines::ConnectionManager_var manager=Engines::ConnectionManager::_narrow(obj);
@@ -473,7 +473,7 @@ void SalomeNode::disconnectService()
   if(ids.size() == 0)
     return;
 
-  SALOME_NamingService NS(getSALOMERuntime()->getOrb()) ;
+  SALOME_NamingService_Wrapper NS(getSALOMERuntime()->getOrb()) ;
   SALOME_LifeCycleCORBA LCC(&NS) ;
   CORBA::Object_var obj = NS.Resolve("/ConnectionManager");
   Engines::ConnectionManager_var manager=Engines::ConnectionManager::_narrow(obj);
index 99f57715231a2a5b4b84e12db0a0226586217b13..f50bfd298942ff24bdea65c7bb06c3690dfc1e2e 100644 (file)
 #include "CalStreamPort.hxx"
 
 #ifdef SALOME_KERNEL
-#include "SALOME_NamingService.hxx"
+#include "SALOME_NamingService_Wrapper.hxx"
 #include "SALOME_LifeCycleCORBA.hxx"
-#include "SALOME_NamingService.hxx"
 #include "SALOME_ResourcesManager.hxx"
 #include "SALOME_ContainerManager.hxx"
 #include "SALOMEconfig.h"
 using namespace std;
 using namespace YACS::ENGINE;
 
+std::unique_ptr<SALOME_NamingService_Container_Abstract> RuntimeSALOME::getNS()
+{
+  std::unique_ptr<SALOME_NamingService_Container_Abstract> ret(new SALOME_NamingService_Wrapper);
+  return ret;
+}
+
 void RuntimeSALOME::setRuntime(long flags, int argc, char* argv[]) // singleton creation (not thread safe!)
 {
   if (! Runtime::_singleton)
@@ -451,7 +456,7 @@ void RuntimeSALOME::fini()
 std::vector< std::pair<std::string,int> > RuntimeSALOME::getCatalogOfComputeNodes() const
 {
   CORBA::ORB_ptr orb(getOrb());
-  SALOME_NamingService namingService;
+  SALOME_NamingService_Wrapper namingService;
   try
   {
     namingService.init_orb(orb);
index 91833373f2f084e3b264d29af85791872197ab51..f7c28b298330b60d4962e673fe8a2bc69a128672 100644 (file)
 #include <omniORBpy.h>
 #include "Runtime.hxx"
 
-#include<string>
-#include<set>
-      
+#include <memory>
+#include <string>
+#include <set>
+
+class SALOME_NamingService_Container_Abstract;
+
 namespace YACS
 {
   namespace ENGINE
@@ -68,6 +71,9 @@ namespace YACS
         UseSalome = 32
       } FLAGS;
 
+#ifndef SWIG
+      std::unique_ptr<SALOME_NamingService_Container_Abstract> getNS();
+#endif
       // singleton creation
       static void setRuntime(long flags = UsePython+UseCorba+UseXml+UseCpp+UseSalome,
                              int argc = 0, char* argv[] = NULL);
diff --git a/src/runtime/SALOME_NamingService_Wrapper.cxx b/src/runtime/SALOME_NamingService_Wrapper.cxx
new file mode 100644 (file)
index 0000000..1492f2a
--- /dev/null
@@ -0,0 +1,47 @@
+// Copyright (C) 2021  CEA/DEN, EDF R&D
+//
+// 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include "SALOME_NamingService_Wrapper.hxx"
+
+#include "SALOME_NamingService.hxx"
+#include "SALOME_Fake_NamingService.hxx"
+#include "KernelBasis.hxx"
+
+SALOME_NamingService_Wrapper::SALOME_NamingService_Wrapper()
+{
+  this->initializeEffectiveNS();
+}
+
+SALOME_NamingService_Wrapper::SALOME_NamingService_Wrapper(CORBA::ORB_ptr orb)
+{
+  this->initializeEffectiveNS();
+  this->_effective_ns->init_orb(orb);
+}
+
+SALOME_NamingService_Wrapper::SALOME_NamingService_Wrapper(const SALOME_NamingService_Wrapper& other):_effective_ns(other._effective_ns->cloneCoVar())
+{
+}
+
+void SALOME_NamingService_Wrapper::initializeEffectiveNS()
+{
+  if(getSSLMode())
+    _effective_ns.reset( new SALOME_Fake_NamingService );
+  else
+    _effective_ns.reset( new SALOME_NamingService );
+}
diff --git a/src/runtime/SALOME_NamingService_Wrapper.hxx b/src/runtime/SALOME_NamingService_Wrapper.hxx
new file mode 100644 (file)
index 0000000..af613d5
--- /dev/null
@@ -0,0 +1,55 @@
+// Copyright (C) 2021  CEA/DEN, EDF R&D
+//
+// 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#pragma once
+
+#include "SALOME_NamingService_Abstract.hxx"
+
+#include <memory>
+
+/*!
+ * Decorator class that allows YACS engine to switch between :
+ * - NamingService CORBA server (SALOME_NamingService)
+ * - NamingService embedded (SALOME_Fake_NamingService)
+ */
+class SALOME_NamingService_Wrapper : public SALOME_NamingService_Abstract
+{
+public:
+  SALOME_NamingService_Wrapper();
+  SALOME_NamingService_Wrapper(CORBA::ORB_ptr orb);
+  std::string repr() override { return _effective_ns->repr(); }
+  void init_orb(CORBA::ORB_ptr orb=0) override { _effective_ns->init_orb(orb); }
+  void Register(CORBA::Object_ptr ObjRef, const char* Path) override { _effective_ns->Register(ObjRef,Path); }
+  CORBA::Object_ptr Resolve(const char* Path) override { return _effective_ns->Resolve(Path); }
+  CORBA::Object_ptr ResolveFirst(const char* Path) override { return _effective_ns->ResolveFirst(Path); }
+  void Destroy_Name(const char* Path) override { _effective_ns->Destroy_Name(Path); }
+  void Destroy_Directory(const char* Path) override { _effective_ns->Destroy_Directory(Path); }
+  void Destroy_FullDirectory(const char* Path) override { _effective_ns->Destroy_FullDirectory(Path); }
+  bool Change_Directory(const char* Path) override { return _effective_ns->Change_Directory(Path); }
+  std::vector<std::string> list_subdirs() override { return _effective_ns->list_directory(); }
+  std::vector<std::string> list_directory() override { return _effective_ns->list_directory(); }
+  std::vector<std::string> list_directory_recurs() override { return _effective_ns->list_directory_recurs(); }
+  SALOME_NamingService_Abstract *clone() override { return new SALOME_NamingService_Wrapper(*this); }
+  CORBA::Object_ptr ResolveComponent(const char* hostname, const char* containerName, const char* componentName, const int nbproc=0) override { return _effective_ns->ResolveComponent(hostname,containerName,componentName,nbproc); }
+private:
+  SALOME_NamingService_Wrapper(const SALOME_NamingService_Wrapper& other);
+  void initializeEffectiveNS();
+private:
+  std::unique_ptr<SALOME_NamingService_Abstract> _effective_ns;
+};
index 62c047dabd00a5f0b3386a65bef9f592b0cc0ef9..3e815a3d7b30efaa8a1b7593ca541e8332136733 100644 (file)
@@ -25,7 +25,7 @@
 #include "AutoLocker.hxx"
 
 #ifdef SALOME_KERNEL
-#include "SALOME_NamingService.hxx"
+#include "SALOME_NamingService_Wrapper.hxx"
 #include "SALOME_LifeCycleCORBA.hxx"
 #endif
 
@@ -99,7 +99,7 @@ void SalomeComponent::load(Task *askingNode)
     }
   //throw Exception("SalomeComponent::load : no container specified !!! To be implemented in executor to allocate default a Container in case of presenceOfDefaultContainer.");
   //This component has no specified container : use default container policy
-  SALOME_NamingService ns(getSALOMERuntime()->getOrb());
+  SALOME_NamingService_Wrapper ns(getSALOMERuntime()->getOrb());
   SALOME_LifeCycleCORBA LCC(&ns);
   Engines::ContainerParameters params;
   LCC.preSet(params);
index 5e33e5ff3d4f1a5e356b762a0eee5932bc5aa183..8014525c5eeab31edc98dce0f111d7f2c1f8581f 100644 (file)
@@ -32,7 +32,6 @@
 #include "ServiceNode.hxx"
 #include "Proc.hxx"
 
-#include "SALOME_NamingService.hxx"
 #include "SALOME_LifeCycleCORBA.hxx"
 #include "SALOME_ContainerManager.hxx"
 #include "Basics_Utils.hxx"
index b48f9b8eb528eed9b708c730b087091b65e615f7..e49a2618bb5e64891b2af6cb59978e0390be8944 100644 (file)
@@ -19,7 +19,7 @@
 #define _DEVDEBUG_
 #include "SalomeContainerTools.hxx"
 #include "SALOME_LifeCycleCORBA.hxx"
-#include "SALOME_NamingService.hxx"
+#include "SALOME_NamingService_Wrapper.hxx"
 #include "SALOME_ResourcesManager.hxx"
 #include "SALOME_ContainerManager.hxx"
 #include "Container.hxx"
@@ -280,7 +280,7 @@ std::map<std::string,std::string> SalomeContainerTools::getResourceProperties(co
   YACS::ENGINE::RuntimeSALOME* runTime = YACS::ENGINE::getSALOMERuntime();
   CORBA::ORB_ptr orb = runTime->getOrb();
   if (!orb) return properties;
-  SALOME_NamingService namingService(orb);
+  SALOME_NamingService_Wrapper namingService(orb);
   SALOME_LifeCycleCORBA lcc(&namingService);
   CORBA::Object_var obj = namingService.Resolve(SALOME_ResourcesManager::_ResourcesManagerNameInNS);
   if (CORBA::is_nil(obj))
@@ -320,7 +320,7 @@ std::map<std::string,std::string> SalomeContainerTools::getResourceProperties(co
 void SalomeContainerToolsBase::Start(const std::vector<std::string>& compoNames, SalomeContainerHelper *schelp, SalomeContainerToolsBase& sct, int& shutdownLevel, const Container *cont, const Task *askingNode)
 {
   CORBA::ORB_ptr orb(getSALOMERuntime()->getOrb());
-  SALOME_NamingService ns;
+  SALOME_NamingService_Wrapper ns;
   try
   {
       ns.init_orb(orb);
index 1adc672c1be3b18b54a6659d3d2368a47c36d266..70240c452f678585a5dab0ff5e18b56d5d8862f1 100644 (file)
@@ -26,7 +26,6 @@
 #include "CORBANode.hxx"
 
 #ifdef SALOME_KERNEL
-#include "SALOME_NamingService.hxx"
 #include "SALOME_LifeCycleCORBA.hxx"
 #endif
 
index 530c16275d41d21d72e18c8f77c528b9a3f5b677..d31a1032d1831574528599d9f9d63b83539e08a5 100644 (file)
@@ -25,7 +25,6 @@
 #include "SalomeProc.hxx"
 
 #include "Basics_Utils.hxx"
-#include "SALOME_NamingService.hxx"
 #include "SALOME_KernelServices.hxx"
 #include "SALOMEDS.hh"
 #include "SALOMEDS_Attributes.hh"
index 5e243253fb3ed326ba6dcfd2da15256156a08440..9aa4bd2add54b5b2f20fe9b2aa0e1564a6b8579f 100644 (file)
@@ -121,3 +121,7 @@ SALOME_CONFIGURE_FILE(resources/YACSCatalog.xml.in
 SALOME_CONFIGURE_FILE(resources/SalomeApp.xml.in 
                      resources/SalomeApp.xml 
                      INSTALL ${SALOME_YACS_INSTALL_RES_DATA})
+
+SALOME_CONFIGURE_FILE(resources/SalomeApp.xml.in 
+                     resources/SalomeAppSL.xml 
+          INSTALL ${SALOME_YACS_INSTALL_RES_DATA})
index 137a5925684aea0b61cdc48217323f4eedb672a4..85cd180e7b7341d50131b18d31bd202a50743edc 100644 (file)
 #include "ObserverAsPlugin.hxx"
 
 #ifdef SALOME_KERNEL
-#include "SALOME_NamingService.hxx"
+#include "KernelBasis.hxx"
+#include "SALOME_Launcher.hxx"
+#include "ServiceUnreachable.hxx"
+#include "SALOME_NamingService_Wrapper.hxx"
 #include "SALOME_ModuleCatalog.hh"
 #include "Basics_Utils.hxx"
 #endif
@@ -294,6 +297,12 @@ bool parse_init_port(const std::string& input, std::string& node, std::string& p
   return true;
 }
 
+void InitializeSSL()
+{
+  setSSLMode(true);
+  KERNEL::getLauncherSA();
+}
+
 int main (int argc, char* argv[])
 {
      
@@ -339,6 +348,8 @@ int main (int argc, char* argv[])
   setsig(SIGTERM,&Handler);
 #endif
 
+  InitializeSSL();
+
   timer("Starting ");
   long flags = RuntimeSALOME::UsePython + RuntimeSALOME::UseCorba + RuntimeSALOME::UseXml + \
                RuntimeSALOME::UseCpp + RuntimeSALOME::UseSalome;
@@ -351,7 +362,7 @@ int main (int argc, char* argv[])
       CORBA::ORB_ptr orb = runTime->getOrb();
       if (orb)
         {
-          SALOME_NamingService namingService(orb);
+          SALOME_NamingService_Wrapper namingService(orb);
           CORBA::Object_var obj = namingService.Resolve("/Kernel/ModulCatalog");
           SALOME_ModuleCatalog::ModuleCatalog_var aModuleCatalog = SALOME_ModuleCatalog::ModuleCatalog::_narrow(obj);
           if (! CORBA::is_nil(aModuleCatalog))
index a84c01c857dfde8ab6edeeb2f7828289ca2c2df0..f08921f0b55fd7e994810096ffbb6a8893bd24b3 100644 (file)
@@ -246,9 +246,6 @@ class YACS(YACS_ORB__POA.YACS_Gen,
                                                          interfaceName, False)
         SALOME_DriverPy.SALOME_DriverPy_i.__init__(self, interfaceName)
 
-        # --- store a naming service interface instance in _naming_service atribute
-        self._naming_service = SALOME_ComponentPy.SALOME_NamingServicePy_i( self._orb )
-
         SALOMERuntime.RuntimeSALOME_setRuntime(1)
         SALOMERuntime.SALOMEDispatcher_setSALOMEDispatcher()
         r=pilot.getRuntime()
index 3e55f935fa764bf8c118d73c964a8df052a8d805..94b86ca121b90733c86831f0def36b24acd11fe2 100644 (file)
@@ -20,6 +20,7 @@
 #include "SalomeResourceModel.hxx"
 #include "RuntimeSALOME.hxx"
 #include "SALOME_ResourcesManager.hxx"
+#include "SALOME_NamingService_Wrapper.hxx"
 #include "SALOME_LifeCycleCORBA.hxx"
 #include <ctime>
 
@@ -53,7 +54,7 @@ std::vector< std::string > SalomeResourceModel::getFittingMachines()const
   CORBA::ORB_ptr orb = runTime->getOrb();
   if (!orb) return resultat;
 
-  SALOME_NamingService namingService(orb);
+  SALOME_NamingService_Wrapper namingService(orb);
   SALOME_LifeCycleCORBA lcc(&namingService);
 
   CORBA::Object_var obj;
@@ -154,7 +155,7 @@ std::string SalomeResourceModel::getDefaultRemoteDir(std::string machine)const
   CORBA::ORB_ptr orb = runTime->getOrb();
   if (!orb) return result;
 
-  SALOME_NamingService namingService(orb);
+  SALOME_NamingService_Wrapper namingService(orb);
   SALOME_LifeCycleCORBA lcc(&namingService);
 
   CORBA::Object_var obj;