+/*!
+ * Retrieve from custom NS the entry. Custom NS is supposed to be hosted in current process.
+ * This method try to emulate CORBA ns convention : "corbaname:rir:#test.my_context/Echo.Object" is converted into "Echo"
+ *
+ * See Engines::EmbeddedNamingService
+ */
+CORBA::Object_var RuntimeSALOME::getFromNS(const char *entry) const
+{
+ CORBA::Object_var ret;
+ std::string entryCpp(entry);
+ if(entryCpp.substr(0,4) == "IOR:")
+ {
+ ret = _orb->string_to_object( entry );
+ }
+ else
+ {
+ auto pos = entryCpp.find_last_of('/');
+ std::string entry1( entryCpp.substr(pos+1,std::string::npos) );
+ pos = entry1.find_last_of('.');
+ std::string entry2( entry1.substr(0,pos) );
+ Engines::EmbeddedNamingService_var ns = GetEmbeddedNamingService();
+ std::unique_ptr<Engines::IORType> iorRet( ns->Resolve( entry2.c_str() ) );
+ auto len = iorRet->length();
+ std::unique_ptr<char[]> iorTrans(new char[len+1]); iorTrans[len] = '\0';
+ for(auto i = 0 ; i < len ; ++i) iorTrans[i] = (*iorRet)[i];
+ ret = _orb->string_to_object(iorTrans.get());
+ }
+ return ret;
+}
+