// This file is generated by omniidl (C++ backend) - omniORB_4_3. Do not edit.

#include "Naming.hh"
#include <omniORB4/IOP_S.h>
#include <omniORB4/IOP_C.h>
#include <omniORB4/callDescriptor.h>
#include <omniORB4/callHandle.h>
#include <omniORB4/objTracker.h>


OMNI_USING_NAMESPACE(omni)

OMNI_MAYBE_UNUSED static const char* _0RL_library_version = omniORB_4_3;



void
CosNaming::NameComponent::operator>>= (cdrStream &_n) const
{
  _n.marshalString(id,0);
  _n.marshalString(kind,0);

}

void
CosNaming::NameComponent::operator<<= (cdrStream &_n)
{
  id = _n.unmarshalString(0);
  kind = _n.unmarshalString(0);

}

void
CosNaming::Binding::operator>>= (cdrStream &_n) const
{
  (const Name&) binding_name >>= _n;
  binding_type >>= _n;

}

void
CosNaming::Binding::operator<<= (cdrStream &_n)
{
  (Name&)binding_name <<= _n;
  (BindingType&)binding_type <<= _n;

}

::CORBA::Exception::insertExceptionToAny CosNaming::NamingContext::NotFound::insertToAnyFn = 0;
::CORBA::Exception::insertExceptionToAnyNCP CosNaming::NamingContext::NotFound::insertToAnyFnNCP = 0;

CosNaming::NamingContext::NotFound::NotFound(const CosNaming::NamingContext::NotFound& _s) : ::CORBA::UserException(_s)
{
  why = _s.why;
  rest_of_name = _s.rest_of_name;

}

CosNaming::NamingContext::NotFound::NotFound(NotFoundReason _why, const Name _rest_of_name)
{
  pd_insertToAnyFn    = CosNaming::NamingContext::NotFound::insertToAnyFn;
  pd_insertToAnyFnNCP = CosNaming::NamingContext::NotFound::insertToAnyFnNCP;
  why = _why;
  rest_of_name = _rest_of_name;

}



CosNaming::NamingContext::NotFound& CosNaming::NamingContext::NotFound::operator=(const CosNaming::NamingContext::NotFound& _s)
{
  if (&_s != this) {
    ((::CORBA::UserException*) this)->operator=(_s);
    why = _s.why;
    rest_of_name = _s.rest_of_name;

  }
  return *this;
}

CosNaming::NamingContext::NotFound::~NotFound() {}

void CosNaming::NamingContext::NotFound::_raise() const { throw *this; }

const char* CosNaming::NamingContext::NotFound::_PD_repoId = "IDL:omg.org/CosNaming/NamingContext/NotFound:1.0";
const char* CosNaming::NamingContext::NotFound::_PD_typeId = "Exception/UserException/CosNaming::NamingContext::NotFound";

CosNaming::NamingContext::NotFound* CosNaming::NamingContext::NotFound::_downcast(::CORBA::Exception* _e) {
  return (NotFound*) _NP_is_a(_e, _PD_typeId);
}

const CosNaming::NamingContext::NotFound* CosNaming::NamingContext::NotFound::_downcast(const ::CORBA::Exception* _e) {
  return (const NotFound*) _NP_is_a(_e, _PD_typeId);
}

::CORBA::Exception* CosNaming::NamingContext::NotFound::_NP_duplicate() const {
  return new NotFound(*this);
}

const char* CosNaming::NamingContext::NotFound::_NP_typeId() const {
  return _PD_typeId;
}

const char* CosNaming::NamingContext::NotFound::_NP_repoId(int* _size) const {
  *_size = sizeof("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0");
  return _PD_repoId;
}
 
void CosNaming::NamingContext::NotFound::_NP_marshal(cdrStream& _s) const {
  *this >>= _s;
}

void
CosNaming::NamingContext::NotFound::operator>>= (cdrStream& _n) const
{
  why >>= _n;
  (const Name&) rest_of_name >>= _n;

}

void
CosNaming::NamingContext::NotFound::operator<<= (cdrStream& _n)
{
  (NotFoundReason&)why <<= _n;
  (Name&)rest_of_name <<= _n;

}

::CORBA::Exception::insertExceptionToAny CosNaming::NamingContext::CannotProceed::insertToAnyFn = 0;
::CORBA::Exception::insertExceptionToAnyNCP CosNaming::NamingContext::CannotProceed::insertToAnyFnNCP = 0;

CosNaming::NamingContext::CannotProceed::CannotProceed(const CosNaming::NamingContext::CannotProceed& _s) : ::CORBA::UserException(_s)
{
  cxt = _s.cxt;
  rest_of_name = _s.rest_of_name;

}

CosNaming::NamingContext::CannotProceed::CannotProceed(NamingContext_ptr _cxt, const Name _rest_of_name)
{
  pd_insertToAnyFn    = CosNaming::NamingContext::CannotProceed::insertToAnyFn;
  pd_insertToAnyFnNCP = CosNaming::NamingContext::CannotProceed::insertToAnyFnNCP;
  CosNaming::NamingContext::_duplicate(_cxt);
  cxt = _cxt;
  rest_of_name = _rest_of_name;

}



CosNaming::NamingContext::CannotProceed& CosNaming::NamingContext::CannotProceed::operator=(const CosNaming::NamingContext::CannotProceed& _s)
{
  if (&_s != this) {
    ((::CORBA::UserException*) this)->operator=(_s);
    cxt = _s.cxt;
    rest_of_name = _s.rest_of_name;

  }
  return *this;
}

CosNaming::NamingContext::CannotProceed::~CannotProceed() {}

void CosNaming::NamingContext::CannotProceed::_raise() const { throw *this; }

const char* CosNaming::NamingContext::CannotProceed::_PD_repoId = "IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0";
const char* CosNaming::NamingContext::CannotProceed::_PD_typeId = "Exception/UserException/CosNaming::NamingContext::CannotProceed";

CosNaming::NamingContext::CannotProceed* CosNaming::NamingContext::CannotProceed::_downcast(::CORBA::Exception* _e) {
  return (CannotProceed*) _NP_is_a(_e, _PD_typeId);
}

const CosNaming::NamingContext::CannotProceed* CosNaming::NamingContext::CannotProceed::_downcast(const ::CORBA::Exception* _e) {
  return (const CannotProceed*) _NP_is_a(_e, _PD_typeId);
}

::CORBA::Exception* CosNaming::NamingContext::CannotProceed::_NP_duplicate() const {
  return new CannotProceed(*this);
}

const char* CosNaming::NamingContext::CannotProceed::_NP_typeId() const {
  return _PD_typeId;
}

const char* CosNaming::NamingContext::CannotProceed::_NP_repoId(int* _size) const {
  *_size = sizeof("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0");
  return _PD_repoId;
}
 
void CosNaming::NamingContext::CannotProceed::_NP_marshal(cdrStream& _s) const {
  *this >>= _s;
}

void
CosNaming::NamingContext::CannotProceed::operator>>= (cdrStream& _n) const
{
  NamingContext::_marshalObjRef(cxt,_n);
  (const Name&) rest_of_name >>= _n;

}

void
CosNaming::NamingContext::CannotProceed::operator<<= (cdrStream& _n)
{
  cxt = NamingContext::_unmarshalObjRef(_n);
  (Name&)rest_of_name <<= _n;

}

::CORBA::Exception::insertExceptionToAny CosNaming::NamingContext::InvalidName::insertToAnyFn = 0;
::CORBA::Exception::insertExceptionToAnyNCP CosNaming::NamingContext::InvalidName::insertToAnyFnNCP = 0;

CosNaming::NamingContext::InvalidName::InvalidName(const CosNaming::NamingContext::InvalidName& _s) : ::CORBA::UserException(_s)
{
  
}



CosNaming::NamingContext::InvalidName& CosNaming::NamingContext::InvalidName::operator=(const CosNaming::NamingContext::InvalidName& _s)
{
  if (&_s != this) {
    ((::CORBA::UserException*) this)->operator=(_s);
    
  }
  return *this;
}

CosNaming::NamingContext::InvalidName::~InvalidName() {}

void CosNaming::NamingContext::InvalidName::_raise() const { throw *this; }

const char* CosNaming::NamingContext::InvalidName::_PD_repoId = "IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0";
const char* CosNaming::NamingContext::InvalidName::_PD_typeId = "Exception/UserException/CosNaming::NamingContext::InvalidName";

CosNaming::NamingContext::InvalidName* CosNaming::NamingContext::InvalidName::_downcast(::CORBA::Exception* _e) {
  return (InvalidName*) _NP_is_a(_e, _PD_typeId);
}

const CosNaming::NamingContext::InvalidName* CosNaming::NamingContext::InvalidName::_downcast(const ::CORBA::Exception* _e) {
  return (const InvalidName*) _NP_is_a(_e, _PD_typeId);
}

::CORBA::Exception* CosNaming::NamingContext::InvalidName::_NP_duplicate() const {
  return new InvalidName(*this);
}

const char* CosNaming::NamingContext::InvalidName::_NP_typeId() const {
  return _PD_typeId;
}

const char* CosNaming::NamingContext::InvalidName::_NP_repoId(int* _size) const {
  *_size = sizeof("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0");
  return _PD_repoId;
}
 
void CosNaming::NamingContext::InvalidName::_NP_marshal(cdrStream& _s) const {
  *this >>= _s;
}

::CORBA::Exception::insertExceptionToAny CosNaming::NamingContext::AlreadyBound::insertToAnyFn = 0;
::CORBA::Exception::insertExceptionToAnyNCP CosNaming::NamingContext::AlreadyBound::insertToAnyFnNCP = 0;

CosNaming::NamingContext::AlreadyBound::AlreadyBound(const CosNaming::NamingContext::AlreadyBound& _s) : ::CORBA::UserException(_s)
{
  
}



CosNaming::NamingContext::AlreadyBound& CosNaming::NamingContext::AlreadyBound::operator=(const CosNaming::NamingContext::AlreadyBound& _s)
{
  if (&_s != this) {
    ((::CORBA::UserException*) this)->operator=(_s);
    
  }
  return *this;
}

CosNaming::NamingContext::AlreadyBound::~AlreadyBound() {}

void CosNaming::NamingContext::AlreadyBound::_raise() const { throw *this; }

const char* CosNaming::NamingContext::AlreadyBound::_PD_repoId = "IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0";
const char* CosNaming::NamingContext::AlreadyBound::_PD_typeId = "Exception/UserException/CosNaming::NamingContext::AlreadyBound";

CosNaming::NamingContext::AlreadyBound* CosNaming::NamingContext::AlreadyBound::_downcast(::CORBA::Exception* _e) {
  return (AlreadyBound*) _NP_is_a(_e, _PD_typeId);
}

const CosNaming::NamingContext::AlreadyBound* CosNaming::NamingContext::AlreadyBound::_downcast(const ::CORBA::Exception* _e) {
  return (const AlreadyBound*) _NP_is_a(_e, _PD_typeId);
}

::CORBA::Exception* CosNaming::NamingContext::AlreadyBound::_NP_duplicate() const {
  return new AlreadyBound(*this);
}

const char* CosNaming::NamingContext::AlreadyBound::_NP_typeId() const {
  return _PD_typeId;
}

const char* CosNaming::NamingContext::AlreadyBound::_NP_repoId(int* _size) const {
  *_size = sizeof("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0");
  return _PD_repoId;
}
 
void CosNaming::NamingContext::AlreadyBound::_NP_marshal(cdrStream& _s) const {
  *this >>= _s;
}

::CORBA::Exception::insertExceptionToAny CosNaming::NamingContext::NotEmpty::insertToAnyFn = 0;
::CORBA::Exception::insertExceptionToAnyNCP CosNaming::NamingContext::NotEmpty::insertToAnyFnNCP = 0;

CosNaming::NamingContext::NotEmpty::NotEmpty(const CosNaming::NamingContext::NotEmpty& _s) : ::CORBA::UserException(_s)
{
  
}



CosNaming::NamingContext::NotEmpty& CosNaming::NamingContext::NotEmpty::operator=(const CosNaming::NamingContext::NotEmpty& _s)
{
  if (&_s != this) {
    ((::CORBA::UserException*) this)->operator=(_s);
    
  }
  return *this;
}

CosNaming::NamingContext::NotEmpty::~NotEmpty() {}

void CosNaming::NamingContext::NotEmpty::_raise() const { throw *this; }

const char* CosNaming::NamingContext::NotEmpty::_PD_repoId = "IDL:omg.org/CosNaming/NamingContext/NotEmpty:1.0";
const char* CosNaming::NamingContext::NotEmpty::_PD_typeId = "Exception/UserException/CosNaming::NamingContext::NotEmpty";

CosNaming::NamingContext::NotEmpty* CosNaming::NamingContext::NotEmpty::_downcast(::CORBA::Exception* _e) {
  return (NotEmpty*) _NP_is_a(_e, _PD_typeId);
}

const CosNaming::NamingContext::NotEmpty* CosNaming::NamingContext::NotEmpty::_downcast(const ::CORBA::Exception* _e) {
  return (const NotEmpty*) _NP_is_a(_e, _PD_typeId);
}

::CORBA::Exception* CosNaming::NamingContext::NotEmpty::_NP_duplicate() const {
  return new NotEmpty(*this);
}

const char* CosNaming::NamingContext::NotEmpty::_NP_typeId() const {
  return _PD_typeId;
}

const char* CosNaming::NamingContext::NotEmpty::_NP_repoId(int* _size) const {
  *_size = sizeof("IDL:omg.org/CosNaming/NamingContext/NotEmpty:1.0");
  return _PD_repoId;
}
 
void CosNaming::NamingContext::NotEmpty::_NP_marshal(cdrStream& _s) const {
  *this >>= _s;
}

CosNaming::NamingContext_ptr CosNaming::NamingContext_Helper::_nil() {
  return ::CosNaming::NamingContext::_nil();
}

::CORBA::Boolean CosNaming::NamingContext_Helper::is_nil(::CosNaming::NamingContext_ptr p) {
  return ::CORBA::is_nil(p);

}

void CosNaming::NamingContext_Helper::release(::CosNaming::NamingContext_ptr p) {
  ::CORBA::release(p);
}

void CosNaming::NamingContext_Helper::marshalObjRef(::CosNaming::NamingContext_ptr obj, cdrStream& s) {
  ::CosNaming::NamingContext::_marshalObjRef(obj, s);
}

CosNaming::NamingContext_ptr CosNaming::NamingContext_Helper::unmarshalObjRef(cdrStream& s) {
  return ::CosNaming::NamingContext::_unmarshalObjRef(s);
}

void CosNaming::NamingContext_Helper::duplicate(::CosNaming::NamingContext_ptr obj) {
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
}

CosNaming::NamingContext_ptr
CosNaming::NamingContext::_duplicate(::CosNaming::NamingContext_ptr obj)
{
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
  return obj;
}

CosNaming::NamingContext_ptr
CosNaming::NamingContext::_narrow(::CORBA::Object_ptr obj)
{
  if (!obj || obj->_NP_is_nil() || obj->_NP_is_pseudo()) return _nil();
  _ptr_type e = (_ptr_type) obj->_PR_getobj()->_realNarrow(_PD_repoId);
  return e ? e : _nil();
}


CosNaming::NamingContext_ptr
CosNaming::NamingContext::_unchecked_narrow(::CORBA::Object_ptr obj)
{
  if (!obj || obj->_NP_is_nil() || obj->_NP_is_pseudo()) return _nil();
  _ptr_type e = (_ptr_type) obj->_PR_getobj()->_uncheckedNarrow(_PD_repoId);
  return e ? e : _nil();
}

CosNaming::NamingContext_ptr
CosNaming::NamingContext::_nil()
{
#ifdef OMNI_UNLOADABLE_STUBS
  static _objref_NamingContext _the_nil_obj;
  return &_the_nil_obj;
#else
  static _objref_NamingContext* _the_nil_ptr = 0;
  if (!_the_nil_ptr) {
    omni::nilRefLock().lock();
    if (!_the_nil_ptr) {
      _the_nil_ptr = new _objref_NamingContext;
      registerNilCorbaObject(_the_nil_ptr);
    }
    omni::nilRefLock().unlock();
  }
  return _the_nil_ptr;
#endif
}

const char* CosNaming::NamingContext::_PD_repoId = "IDL:omg.org/CosNaming/NamingContext:1.0";


CosNaming::_objref_NamingContext::~_objref_NamingContext() {
  
}


CosNaming::_objref_NamingContext::_objref_NamingContext(omniIOR* ior, omniIdentity* id) :
   omniObjRef(::CosNaming::NamingContext::_PD_repoId, ior, id, 1)
   
   
{
  _PR_setobj(this);
}

void*
CosNaming::_objref_NamingContext::_ptrToObjRef(const char* id)
{
  if (id == ::CosNaming::NamingContext::_PD_repoId)
    return (::CosNaming::NamingContext_ptr) this;
  
  if (id == ::CORBA::Object::_PD_repoId)
    return (::CORBA::Object_ptr) this;

  if (omni::strMatch(id, ::CosNaming::NamingContext::_PD_repoId))
    return (::CosNaming::NamingContext_ptr) this;
  
  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (::CORBA::Object_ptr) this;

  return 0;
}


//
// Code for CosNaming::NamingContext::bind

// Proxy call descriptor class. Mangled signature:
//  void_i_cCosNaming_mName_i_cCORBA_mObject_e_cCosNaming_mNamingContext_mAlreadyBound_e_cCosNaming_mNamingContext_mCannotProceed_e_cCosNaming_mNamingContext_mInvalidName_e_cCosNaming_mNamingContext_mNotFound
class _0RL_cd_69ceca6a39f685b5_00000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_69ceca6a39f685b5_00000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 4, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

    
  void userException(cdrStream&, _OMNI_NS(IOP_C)*, const char*);
  static const char* const _user_exns[];

  CosNaming::Name_var arg_0_;
  const CosNaming::Name* arg_0;
  CORBA::Object_var arg_1_;
  CORBA::Object_ptr arg_1;
};

void _0RL_cd_69ceca6a39f685b5_00000000::marshalArguments(cdrStream& _n)
{
  (const CosNaming::Name&) *arg_0 >>= _n;
  CORBA::Object::_marshalObjRef(arg_1,_n);

}

void _0RL_cd_69ceca6a39f685b5_00000000::unmarshalArguments(cdrStream& _n)
{
  arg_0_ = new CosNaming::Name;
  (CosNaming::Name&)arg_0_ <<= _n;
  arg_0 = &arg_0_.in();
  arg_1_ = CORBA::Object::_unmarshalObjRef(_n);
  arg_1 = arg_1_.in();

}

const char* const _0RL_cd_69ceca6a39f685b5_00000000::_user_exns[] = {
  CosNaming::NamingContext::AlreadyBound::_PD_repoId,
  CosNaming::NamingContext::CannotProceed::_PD_repoId,
  CosNaming::NamingContext::InvalidName::_PD_repoId,
  CosNaming::NamingContext::NotFound::_PD_repoId
};

void _0RL_cd_69ceca6a39f685b5_00000000::userException(cdrStream& s, _OMNI_NS(IOP_C)* iop_client, const char* repoId)
{
  if (omni::strMatch(repoId, CosNaming::NamingContext::AlreadyBound::_PD_repoId)) {
    CosNaming::NamingContext::AlreadyBound _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::CannotProceed::_PD_repoId)) {
    CosNaming::NamingContext::CannotProceed _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::InvalidName::_PD_repoId)) {
    CosNaming::NamingContext::InvalidName _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::NotFound::_PD_repoId)) {
    CosNaming::NamingContext::NotFound _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }


  else {
    if (iop_client) iop_client->RequestCompleted(1);
    OMNIORB_THROW(UNKNOWN,UNKNOWN_UserException,
                  (::CORBA::CompletionStatus)s.completion());
  }
}

// Local call call-back function.
static void
_0RL_lcfn_69ceca6a39f685b5_10000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_69ceca6a39f685b5_00000000* tcd = (_0RL_cd_69ceca6a39f685b5_00000000*)cd;
  CosNaming::_impl_NamingContext* impl = (CosNaming::_impl_NamingContext*) svnt->_ptrToInterface(CosNaming::NamingContext::_PD_repoId);
#ifdef OMNI_HAS_Cplusplus_catch_exception_by_base
  impl->bind(*tcd->arg_0, tcd->arg_1);
#else
  if (!cd->is_upcall())
    impl->bind(*tcd->arg_0, tcd->arg_1);
  else {
    try {
      impl->bind(*tcd->arg_0, tcd->arg_1);
    }
    catch(CosNaming::NamingContext::NotFound& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::CannotProceed& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::InvalidName& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::AlreadyBound& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }


  }
#endif


}

void CosNaming::_objref_NamingContext::bind(const ::CosNaming::Name& n, ::CORBA::Object_ptr obj)
{
  _0RL_cd_69ceca6a39f685b5_00000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_10000000, "bind", 5);
  _call_desc.arg_0 = &(::CosNaming::Name&) n;
  _call_desc.arg_1 = obj;

  _invoke(_call_desc);



}


//
// Code for CosNaming::NamingContext::rebind

// Proxy call descriptor class. Mangled signature:
//  void_i_cCosNaming_mName_i_cCORBA_mObject_e_cCosNaming_mNamingContext_mCannotProceed_e_cCosNaming_mNamingContext_mInvalidName_e_cCosNaming_mNamingContext_mNotFound
class _0RL_cd_69ceca6a39f685b5_20000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_69ceca6a39f685b5_20000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 3, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

    
  void userException(cdrStream&, _OMNI_NS(IOP_C)*, const char*);
  static const char* const _user_exns[];

  CosNaming::Name_var arg_0_;
  const CosNaming::Name* arg_0;
  CORBA::Object_var arg_1_;
  CORBA::Object_ptr arg_1;
};

void _0RL_cd_69ceca6a39f685b5_20000000::marshalArguments(cdrStream& _n)
{
  (const CosNaming::Name&) *arg_0 >>= _n;
  CORBA::Object::_marshalObjRef(arg_1,_n);

}

void _0RL_cd_69ceca6a39f685b5_20000000::unmarshalArguments(cdrStream& _n)
{
  arg_0_ = new CosNaming::Name;
  (CosNaming::Name&)arg_0_ <<= _n;
  arg_0 = &arg_0_.in();
  arg_1_ = CORBA::Object::_unmarshalObjRef(_n);
  arg_1 = arg_1_.in();

}

const char* const _0RL_cd_69ceca6a39f685b5_20000000::_user_exns[] = {
  CosNaming::NamingContext::CannotProceed::_PD_repoId,
  CosNaming::NamingContext::InvalidName::_PD_repoId,
  CosNaming::NamingContext::NotFound::_PD_repoId
};

void _0RL_cd_69ceca6a39f685b5_20000000::userException(cdrStream& s, _OMNI_NS(IOP_C)* iop_client, const char* repoId)
{
  if (omni::strMatch(repoId, CosNaming::NamingContext::CannotProceed::_PD_repoId)) {
    CosNaming::NamingContext::CannotProceed _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::InvalidName::_PD_repoId)) {
    CosNaming::NamingContext::InvalidName _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::NotFound::_PD_repoId)) {
    CosNaming::NamingContext::NotFound _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }


  else {
    if (iop_client) iop_client->RequestCompleted(1);
    OMNIORB_THROW(UNKNOWN,UNKNOWN_UserException,
                  (::CORBA::CompletionStatus)s.completion());
  }
}

// Local call call-back function.
static void
_0RL_lcfn_69ceca6a39f685b5_30000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_69ceca6a39f685b5_20000000* tcd = (_0RL_cd_69ceca6a39f685b5_20000000*)cd;
  CosNaming::_impl_NamingContext* impl = (CosNaming::_impl_NamingContext*) svnt->_ptrToInterface(CosNaming::NamingContext::_PD_repoId);
#ifdef OMNI_HAS_Cplusplus_catch_exception_by_base
  impl->rebind(*tcd->arg_0, tcd->arg_1);
#else
  if (!cd->is_upcall())
    impl->rebind(*tcd->arg_0, tcd->arg_1);
  else {
    try {
      impl->rebind(*tcd->arg_0, tcd->arg_1);
    }
    catch(CosNaming::NamingContext::NotFound& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::CannotProceed& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::InvalidName& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }


  }
#endif


}

void CosNaming::_objref_NamingContext::rebind(const ::CosNaming::Name& n, ::CORBA::Object_ptr obj)
{
  _0RL_cd_69ceca6a39f685b5_20000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_30000000, "rebind", 7);
  _call_desc.arg_0 = &(::CosNaming::Name&) n;
  _call_desc.arg_1 = obj;

  _invoke(_call_desc);



}


//
// Code for CosNaming::NamingContext::bind_context

// Proxy call descriptor class. Mangled signature:
//  void_i_cCosNaming_mName_i_cCosNaming_mNamingContext_e_cCosNaming_mNamingContext_mAlreadyBound_e_cCosNaming_mNamingContext_mCannotProceed_e_cCosNaming_mNamingContext_mInvalidName_e_cCosNaming_mNamingContext_mNotFound
class _0RL_cd_69ceca6a39f685b5_40000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_69ceca6a39f685b5_40000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 4, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

    
  void userException(cdrStream&, _OMNI_NS(IOP_C)*, const char*);
  static const char* const _user_exns[];

  CosNaming::Name_var arg_0_;
  const CosNaming::Name* arg_0;
  CosNaming::NamingContext_var arg_1_;
  CosNaming::NamingContext_ptr arg_1;
};

void _0RL_cd_69ceca6a39f685b5_40000000::marshalArguments(cdrStream& _n)
{
  (const CosNaming::Name&) *arg_0 >>= _n;
  CosNaming::NamingContext::_marshalObjRef(arg_1,_n);

}

void _0RL_cd_69ceca6a39f685b5_40000000::unmarshalArguments(cdrStream& _n)
{
  arg_0_ = new CosNaming::Name;
  (CosNaming::Name&)arg_0_ <<= _n;
  arg_0 = &arg_0_.in();
  arg_1_ = CosNaming::NamingContext::_unmarshalObjRef(_n);
  arg_1 = arg_1_.in();

}

const char* const _0RL_cd_69ceca6a39f685b5_40000000::_user_exns[] = {
  CosNaming::NamingContext::AlreadyBound::_PD_repoId,
  CosNaming::NamingContext::CannotProceed::_PD_repoId,
  CosNaming::NamingContext::InvalidName::_PD_repoId,
  CosNaming::NamingContext::NotFound::_PD_repoId
};

void _0RL_cd_69ceca6a39f685b5_40000000::userException(cdrStream& s, _OMNI_NS(IOP_C)* iop_client, const char* repoId)
{
  if (omni::strMatch(repoId, CosNaming::NamingContext::AlreadyBound::_PD_repoId)) {
    CosNaming::NamingContext::AlreadyBound _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::CannotProceed::_PD_repoId)) {
    CosNaming::NamingContext::CannotProceed _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::InvalidName::_PD_repoId)) {
    CosNaming::NamingContext::InvalidName _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::NotFound::_PD_repoId)) {
    CosNaming::NamingContext::NotFound _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }


  else {
    if (iop_client) iop_client->RequestCompleted(1);
    OMNIORB_THROW(UNKNOWN,UNKNOWN_UserException,
                  (::CORBA::CompletionStatus)s.completion());
  }
}

// Local call call-back function.
static void
_0RL_lcfn_69ceca6a39f685b5_50000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_69ceca6a39f685b5_40000000* tcd = (_0RL_cd_69ceca6a39f685b5_40000000*)cd;
  CosNaming::_impl_NamingContext* impl = (CosNaming::_impl_NamingContext*) svnt->_ptrToInterface(CosNaming::NamingContext::_PD_repoId);
#ifdef OMNI_HAS_Cplusplus_catch_exception_by_base
  impl->bind_context(*tcd->arg_0, tcd->arg_1);
#else
  if (!cd->is_upcall())
    impl->bind_context(*tcd->arg_0, tcd->arg_1);
  else {
    try {
      impl->bind_context(*tcd->arg_0, tcd->arg_1);
    }
    catch(CosNaming::NamingContext::NotFound& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::CannotProceed& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::InvalidName& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::AlreadyBound& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }


  }
#endif


}

void CosNaming::_objref_NamingContext::bind_context(const ::CosNaming::Name& n, ::CosNaming::NamingContext_ptr nc)
{
  _0RL_cd_69ceca6a39f685b5_40000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_50000000, "bind_context", 13);
  _call_desc.arg_0 = &(::CosNaming::Name&) n;
  _call_desc.arg_1 = nc;

  _invoke(_call_desc);



}


//
// Code for CosNaming::NamingContext::rebind_context

// Proxy call descriptor class. Mangled signature:
//  void_i_cCosNaming_mName_i_cCosNaming_mNamingContext_e_cCosNaming_mNamingContext_mCannotProceed_e_cCosNaming_mNamingContext_mInvalidName_e_cCosNaming_mNamingContext_mNotFound
class _0RL_cd_69ceca6a39f685b5_60000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_69ceca6a39f685b5_60000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 3, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

    
  void userException(cdrStream&, _OMNI_NS(IOP_C)*, const char*);
  static const char* const _user_exns[];

  CosNaming::Name_var arg_0_;
  const CosNaming::Name* arg_0;
  CosNaming::NamingContext_var arg_1_;
  CosNaming::NamingContext_ptr arg_1;
};

void _0RL_cd_69ceca6a39f685b5_60000000::marshalArguments(cdrStream& _n)
{
  (const CosNaming::Name&) *arg_0 >>= _n;
  CosNaming::NamingContext::_marshalObjRef(arg_1,_n);

}

void _0RL_cd_69ceca6a39f685b5_60000000::unmarshalArguments(cdrStream& _n)
{
  arg_0_ = new CosNaming::Name;
  (CosNaming::Name&)arg_0_ <<= _n;
  arg_0 = &arg_0_.in();
  arg_1_ = CosNaming::NamingContext::_unmarshalObjRef(_n);
  arg_1 = arg_1_.in();

}

const char* const _0RL_cd_69ceca6a39f685b5_60000000::_user_exns[] = {
  CosNaming::NamingContext::CannotProceed::_PD_repoId,
  CosNaming::NamingContext::InvalidName::_PD_repoId,
  CosNaming::NamingContext::NotFound::_PD_repoId
};

void _0RL_cd_69ceca6a39f685b5_60000000::userException(cdrStream& s, _OMNI_NS(IOP_C)* iop_client, const char* repoId)
{
  if (omni::strMatch(repoId, CosNaming::NamingContext::CannotProceed::_PD_repoId)) {
    CosNaming::NamingContext::CannotProceed _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::InvalidName::_PD_repoId)) {
    CosNaming::NamingContext::InvalidName _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::NotFound::_PD_repoId)) {
    CosNaming::NamingContext::NotFound _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }


  else {
    if (iop_client) iop_client->RequestCompleted(1);
    OMNIORB_THROW(UNKNOWN,UNKNOWN_UserException,
                  (::CORBA::CompletionStatus)s.completion());
  }
}

// Local call call-back function.
static void
_0RL_lcfn_69ceca6a39f685b5_70000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_69ceca6a39f685b5_60000000* tcd = (_0RL_cd_69ceca6a39f685b5_60000000*)cd;
  CosNaming::_impl_NamingContext* impl = (CosNaming::_impl_NamingContext*) svnt->_ptrToInterface(CosNaming::NamingContext::_PD_repoId);
#ifdef OMNI_HAS_Cplusplus_catch_exception_by_base
  impl->rebind_context(*tcd->arg_0, tcd->arg_1);
#else
  if (!cd->is_upcall())
    impl->rebind_context(*tcd->arg_0, tcd->arg_1);
  else {
    try {
      impl->rebind_context(*tcd->arg_0, tcd->arg_1);
    }
    catch(CosNaming::NamingContext::NotFound& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::CannotProceed& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::InvalidName& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }


  }
#endif


}

void CosNaming::_objref_NamingContext::rebind_context(const ::CosNaming::Name& n, ::CosNaming::NamingContext_ptr nc)
{
  _0RL_cd_69ceca6a39f685b5_60000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_70000000, "rebind_context", 15);
  _call_desc.arg_0 = &(::CosNaming::Name&) n;
  _call_desc.arg_1 = nc;

  _invoke(_call_desc);



}


//
// Code for CosNaming::NamingContext::resolve

// Proxy call descriptor class. Mangled signature:
//  _cCORBA_mObject_i_cCosNaming_mName_e_cCosNaming_mNamingContext_mCannotProceed_e_cCosNaming_mNamingContext_mInvalidName_e_cCosNaming_mNamingContext_mNotFound
class _0RL_cd_69ceca6a39f685b5_80000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_69ceca6a39f685b5_80000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 3, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  void userException(cdrStream&, _OMNI_NS(IOP_C)*, const char*);
  static const char* const _user_exns[];

  CosNaming::Name_var arg_0_;
  const CosNaming::Name* arg_0;
  CORBA::Object_var result;
};

void _0RL_cd_69ceca6a39f685b5_80000000::marshalArguments(cdrStream& _n)
{
  (const CosNaming::Name&) *arg_0 >>= _n;

}

void _0RL_cd_69ceca6a39f685b5_80000000::unmarshalArguments(cdrStream& _n)
{
  arg_0_ = new CosNaming::Name;
  (CosNaming::Name&)arg_0_ <<= _n;
  arg_0 = &arg_0_.in();

}

void _0RL_cd_69ceca6a39f685b5_80000000::marshalReturnedValues(cdrStream& _n)
{
  CORBA::Object::_marshalObjRef(result,_n);

}

void _0RL_cd_69ceca6a39f685b5_80000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = CORBA::Object::_unmarshalObjRef(_n);

}

const char* const _0RL_cd_69ceca6a39f685b5_80000000::_user_exns[] = {
  CosNaming::NamingContext::CannotProceed::_PD_repoId,
  CosNaming::NamingContext::InvalidName::_PD_repoId,
  CosNaming::NamingContext::NotFound::_PD_repoId
};

void _0RL_cd_69ceca6a39f685b5_80000000::userException(cdrStream& s, _OMNI_NS(IOP_C)* iop_client, const char* repoId)
{
  if (omni::strMatch(repoId, CosNaming::NamingContext::CannotProceed::_PD_repoId)) {
    CosNaming::NamingContext::CannotProceed _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::InvalidName::_PD_repoId)) {
    CosNaming::NamingContext::InvalidName _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::NotFound::_PD_repoId)) {
    CosNaming::NamingContext::NotFound _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }


  else {
    if (iop_client) iop_client->RequestCompleted(1);
    OMNIORB_THROW(UNKNOWN,UNKNOWN_UserException,
                  (::CORBA::CompletionStatus)s.completion());
  }
}

// Local call call-back function.
static void
_0RL_lcfn_69ceca6a39f685b5_90000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_69ceca6a39f685b5_80000000* tcd = (_0RL_cd_69ceca6a39f685b5_80000000*)cd;
  CosNaming::_impl_NamingContext* impl = (CosNaming::_impl_NamingContext*) svnt->_ptrToInterface(CosNaming::NamingContext::_PD_repoId);
#ifdef OMNI_HAS_Cplusplus_catch_exception_by_base
  tcd->result = impl->resolve(*tcd->arg_0);
#else
  if (!cd->is_upcall())
    tcd->result = impl->resolve(*tcd->arg_0);
  else {
    try {
      tcd->result = impl->resolve(*tcd->arg_0);
    }
    catch(CosNaming::NamingContext::NotFound& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::CannotProceed& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::InvalidName& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }


  }
#endif


}

CORBA::Object_ptr CosNaming::_objref_NamingContext::resolve(const ::CosNaming::Name& n)
{
  _0RL_cd_69ceca6a39f685b5_80000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_90000000, "resolve", 8);
  _call_desc.arg_0 = &(::CosNaming::Name&) n;

  _invoke(_call_desc);
  return _call_desc.result._retn();


}


//
// Code for CosNaming::NamingContext::unbind

// Proxy call descriptor class. Mangled signature:
//  void_i_cCosNaming_mName_e_cCosNaming_mNamingContext_mCannotProceed_e_cCosNaming_mNamingContext_mInvalidName_e_cCosNaming_mNamingContext_mNotFound
class _0RL_cd_69ceca6a39f685b5_a0000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_69ceca6a39f685b5_a0000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 3, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

    
  void userException(cdrStream&, _OMNI_NS(IOP_C)*, const char*);
  static const char* const _user_exns[];

  CosNaming::Name_var arg_0_;
  const CosNaming::Name* arg_0;
};

void _0RL_cd_69ceca6a39f685b5_a0000000::marshalArguments(cdrStream& _n)
{
  (const CosNaming::Name&) *arg_0 >>= _n;

}

void _0RL_cd_69ceca6a39f685b5_a0000000::unmarshalArguments(cdrStream& _n)
{
  arg_0_ = new CosNaming::Name;
  (CosNaming::Name&)arg_0_ <<= _n;
  arg_0 = &arg_0_.in();

}

const char* const _0RL_cd_69ceca6a39f685b5_a0000000::_user_exns[] = {
  CosNaming::NamingContext::CannotProceed::_PD_repoId,
  CosNaming::NamingContext::InvalidName::_PD_repoId,
  CosNaming::NamingContext::NotFound::_PD_repoId
};

void _0RL_cd_69ceca6a39f685b5_a0000000::userException(cdrStream& s, _OMNI_NS(IOP_C)* iop_client, const char* repoId)
{
  if (omni::strMatch(repoId, CosNaming::NamingContext::CannotProceed::_PD_repoId)) {
    CosNaming::NamingContext::CannotProceed _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::InvalidName::_PD_repoId)) {
    CosNaming::NamingContext::InvalidName _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::NotFound::_PD_repoId)) {
    CosNaming::NamingContext::NotFound _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }


  else {
    if (iop_client) iop_client->RequestCompleted(1);
    OMNIORB_THROW(UNKNOWN,UNKNOWN_UserException,
                  (::CORBA::CompletionStatus)s.completion());
  }
}

// Local call call-back function.
static void
_0RL_lcfn_69ceca6a39f685b5_b0000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_69ceca6a39f685b5_a0000000* tcd = (_0RL_cd_69ceca6a39f685b5_a0000000*)cd;
  CosNaming::_impl_NamingContext* impl = (CosNaming::_impl_NamingContext*) svnt->_ptrToInterface(CosNaming::NamingContext::_PD_repoId);
#ifdef OMNI_HAS_Cplusplus_catch_exception_by_base
  impl->unbind(*tcd->arg_0);
#else
  if (!cd->is_upcall())
    impl->unbind(*tcd->arg_0);
  else {
    try {
      impl->unbind(*tcd->arg_0);
    }
    catch(CosNaming::NamingContext::NotFound& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::CannotProceed& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::InvalidName& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }


  }
#endif


}

void CosNaming::_objref_NamingContext::unbind(const ::CosNaming::Name& n)
{
  _0RL_cd_69ceca6a39f685b5_a0000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_b0000000, "unbind", 7);
  _call_desc.arg_0 = &(::CosNaming::Name&) n;

  _invoke(_call_desc);



}


//
// Code for CosNaming::NamingContext::new_context

// Proxy call descriptor class. Mangled signature:
//  _cCosNaming_mNamingContext
class _0RL_cd_69ceca6a39f685b5_c0000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_69ceca6a39f685b5_c0000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  
  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  CosNaming::NamingContext_var result;
};

void _0RL_cd_69ceca6a39f685b5_c0000000::marshalReturnedValues(cdrStream& _n)
{
  CosNaming::NamingContext::_marshalObjRef(result,_n);

}

void _0RL_cd_69ceca6a39f685b5_c0000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = CosNaming::NamingContext::_unmarshalObjRef(_n);

}

const char* const _0RL_cd_69ceca6a39f685b5_c0000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_69ceca6a39f685b5_d0000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_69ceca6a39f685b5_c0000000* tcd = (_0RL_cd_69ceca6a39f685b5_c0000000*)cd;
  CosNaming::_impl_NamingContext* impl = (CosNaming::_impl_NamingContext*) svnt->_ptrToInterface(CosNaming::NamingContext::_PD_repoId);
  tcd->result = impl->new_context();


}

CosNaming::NamingContext_ptr CosNaming::_objref_NamingContext::new_context()
{
  _0RL_cd_69ceca6a39f685b5_c0000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_d0000000, "new_context", 12);


  _invoke(_call_desc);
  return _call_desc.result._retn();


}


//
// Code for CosNaming::NamingContext::bind_new_context

// Proxy call descriptor class. Mangled signature:
//  _cCosNaming_mNamingContext_i_cCosNaming_mName_e_cCosNaming_mNamingContext_mAlreadyBound_e_cCosNaming_mNamingContext_mCannotProceed_e_cCosNaming_mNamingContext_mInvalidName_e_cCosNaming_mNamingContext_mNotFound
class _0RL_cd_69ceca6a39f685b5_e0000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_69ceca6a39f685b5_e0000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 4, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  void userException(cdrStream&, _OMNI_NS(IOP_C)*, const char*);
  static const char* const _user_exns[];

  CosNaming::Name_var arg_0_;
  const CosNaming::Name* arg_0;
  CosNaming::NamingContext_var result;
};

void _0RL_cd_69ceca6a39f685b5_e0000000::marshalArguments(cdrStream& _n)
{
  (const CosNaming::Name&) *arg_0 >>= _n;

}

void _0RL_cd_69ceca6a39f685b5_e0000000::unmarshalArguments(cdrStream& _n)
{
  arg_0_ = new CosNaming::Name;
  (CosNaming::Name&)arg_0_ <<= _n;
  arg_0 = &arg_0_.in();

}

void _0RL_cd_69ceca6a39f685b5_e0000000::marshalReturnedValues(cdrStream& _n)
{
  CosNaming::NamingContext::_marshalObjRef(result,_n);

}

void _0RL_cd_69ceca6a39f685b5_e0000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = CosNaming::NamingContext::_unmarshalObjRef(_n);

}

const char* const _0RL_cd_69ceca6a39f685b5_e0000000::_user_exns[] = {
  CosNaming::NamingContext::AlreadyBound::_PD_repoId,
  CosNaming::NamingContext::CannotProceed::_PD_repoId,
  CosNaming::NamingContext::InvalidName::_PD_repoId,
  CosNaming::NamingContext::NotFound::_PD_repoId
};

void _0RL_cd_69ceca6a39f685b5_e0000000::userException(cdrStream& s, _OMNI_NS(IOP_C)* iop_client, const char* repoId)
{
  if (omni::strMatch(repoId, CosNaming::NamingContext::AlreadyBound::_PD_repoId)) {
    CosNaming::NamingContext::AlreadyBound _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::CannotProceed::_PD_repoId)) {
    CosNaming::NamingContext::CannotProceed _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::InvalidName::_PD_repoId)) {
    CosNaming::NamingContext::InvalidName _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::NotFound::_PD_repoId)) {
    CosNaming::NamingContext::NotFound _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }


  else {
    if (iop_client) iop_client->RequestCompleted(1);
    OMNIORB_THROW(UNKNOWN,UNKNOWN_UserException,
                  (::CORBA::CompletionStatus)s.completion());
  }
}

// Local call call-back function.
static void
_0RL_lcfn_69ceca6a39f685b5_f0000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_69ceca6a39f685b5_e0000000* tcd = (_0RL_cd_69ceca6a39f685b5_e0000000*)cd;
  CosNaming::_impl_NamingContext* impl = (CosNaming::_impl_NamingContext*) svnt->_ptrToInterface(CosNaming::NamingContext::_PD_repoId);
#ifdef OMNI_HAS_Cplusplus_catch_exception_by_base
  tcd->result = impl->bind_new_context(*tcd->arg_0);
#else
  if (!cd->is_upcall())
    tcd->result = impl->bind_new_context(*tcd->arg_0);
  else {
    try {
      tcd->result = impl->bind_new_context(*tcd->arg_0);
    }
    catch(CosNaming::NamingContext::NotFound& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::CannotProceed& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::InvalidName& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::AlreadyBound& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }


  }
#endif


}

CosNaming::NamingContext_ptr CosNaming::_objref_NamingContext::bind_new_context(const ::CosNaming::Name& n)
{
  _0RL_cd_69ceca6a39f685b5_e0000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_f0000000, "bind_new_context", 17);
  _call_desc.arg_0 = &(::CosNaming::Name&) n;

  _invoke(_call_desc);
  return _call_desc.result._retn();


}


//
// Code for CosNaming::NamingContext::destroy

// Proxy call descriptor class. Mangled signature:
//  void_e_cCosNaming_mNamingContext_mNotEmpty
class _0RL_cd_69ceca6a39f685b5_01000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_69ceca6a39f685b5_01000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 1, upcall)
  {
    
  }
  
  
    
  void userException(cdrStream&, _OMNI_NS(IOP_C)*, const char*);
  static const char* const _user_exns[];

  
};

const char* const _0RL_cd_69ceca6a39f685b5_01000000::_user_exns[] = {
  CosNaming::NamingContext::NotEmpty::_PD_repoId
};

void _0RL_cd_69ceca6a39f685b5_01000000::userException(cdrStream& s, _OMNI_NS(IOP_C)* iop_client, const char* repoId)
{
  if (omni::strMatch(repoId, CosNaming::NamingContext::NotEmpty::_PD_repoId)) {
    CosNaming::NamingContext::NotEmpty _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }


  else {
    if (iop_client) iop_client->RequestCompleted(1);
    OMNIORB_THROW(UNKNOWN,UNKNOWN_UserException,
                  (::CORBA::CompletionStatus)s.completion());
  }
}

// Local call call-back function.
static void
_0RL_lcfn_69ceca6a39f685b5_11000000(omniCallDescriptor* _OMNIORB_EX_ONLY_CD(cd), omniServant* svnt)
{
  
  CosNaming::_impl_NamingContext* impl = (CosNaming::_impl_NamingContext*) svnt->_ptrToInterface(CosNaming::NamingContext::_PD_repoId);
#ifdef OMNI_HAS_Cplusplus_catch_exception_by_base
  impl->destroy();
#else
  if (!cd->is_upcall())
    impl->destroy();
  else {
    try {
      impl->destroy();
    }
    catch(CosNaming::NamingContext::NotEmpty& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }


  }
#endif


}

void CosNaming::_objref_NamingContext::destroy()
{
  _0RL_cd_69ceca6a39f685b5_01000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_11000000, "destroy", 8);


  _invoke(_call_desc);



}


//
// Code for CosNaming::NamingContext::list

// Proxy call descriptor class. Mangled signature:
//  void_i_cunsigned_plong_o_cCosNaming_mBindingList_o_cCosNaming_mBindingIterator
class _0RL_cd_69ceca6a39f685b5_21000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_69ceca6a39f685b5_21000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  ::CORBA::ULong arg_0;
  CosNaming::BindingList_var arg_1;
  CosNaming::BindingIterator_var arg_2;
};

void _0RL_cd_69ceca6a39f685b5_21000000::marshalArguments(cdrStream& _n)
{
  arg_0 >>= _n;

}

void _0RL_cd_69ceca6a39f685b5_21000000::unmarshalArguments(cdrStream& _n)
{
  (::CORBA::ULong&)arg_0 <<= _n;

}

void _0RL_cd_69ceca6a39f685b5_21000000::marshalReturnedValues(cdrStream& _n)
{
  (const CosNaming::BindingList&) arg_1 >>= _n;
  CosNaming::BindingIterator_Helper::marshalObjRef(arg_2,_n);

}

void _0RL_cd_69ceca6a39f685b5_21000000::unmarshalReturnedValues(cdrStream& _n)
{
  arg_1 = new CosNaming::BindingList;
  (CosNaming::BindingList&)arg_1 <<= _n;
  arg_2 = CosNaming::BindingIterator_Helper::unmarshalObjRef(_n);

}

const char* const _0RL_cd_69ceca6a39f685b5_21000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_69ceca6a39f685b5_31000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_69ceca6a39f685b5_21000000* tcd = (_0RL_cd_69ceca6a39f685b5_21000000*)cd;
  CosNaming::_impl_NamingContext* impl = (CosNaming::_impl_NamingContext*) svnt->_ptrToInterface(CosNaming::NamingContext::_PD_repoId);
  impl->list(tcd->arg_0, tcd->arg_1.out(), tcd->arg_2.out());


}

void CosNaming::_objref_NamingContext::list(::CORBA::ULong how_many, ::CosNaming::BindingList_out bl, ::CosNaming::BindingIterator_out bi)
{
  _0RL_cd_69ceca6a39f685b5_21000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_31000000, "list", 5);
  _call_desc.arg_0 = how_many;

  _invoke(_call_desc);
  bl = _call_desc.arg_1._retn();
  bi = _call_desc.arg_2._retn();


}

CosNaming::_pof_NamingContext::~_pof_NamingContext() {}


omniObjRef*
CosNaming::_pof_NamingContext::newObjRef(omniIOR* ior, omniIdentity* id)
{
  return new ::CosNaming::_objref_NamingContext(ior, id);
}


::CORBA::Boolean
CosNaming::_pof_NamingContext::is_a(const char* id) const
{
  if (omni::ptrStrMatch(id, ::CosNaming::NamingContext::_PD_repoId))
    return 1;
  
  return 0;
}

const CosNaming::_pof_NamingContext _the_pof_CosNaming_mNamingContext;

CosNaming::_impl_NamingContext::~_impl_NamingContext() {}


::CORBA::Boolean
CosNaming::_impl_NamingContext::_dispatch(omniCallHandle& _handle)
{
  const char* op = _handle.operation_name();

  if (omni::strMatch(op, "bind")) {

    _0RL_cd_69ceca6a39f685b5_00000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_10000000, "bind", 5, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "rebind")) {

    _0RL_cd_69ceca6a39f685b5_20000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_30000000, "rebind", 7, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "bind_context")) {

    _0RL_cd_69ceca6a39f685b5_40000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_50000000, "bind_context", 13, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "rebind_context")) {

    _0RL_cd_69ceca6a39f685b5_60000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_70000000, "rebind_context", 15, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "resolve")) {

    _0RL_cd_69ceca6a39f685b5_80000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_90000000, "resolve", 8, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "unbind")) {

    _0RL_cd_69ceca6a39f685b5_a0000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_b0000000, "unbind", 7, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "new_context")) {

    _0RL_cd_69ceca6a39f685b5_c0000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_d0000000, "new_context", 12, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "bind_new_context")) {

    _0RL_cd_69ceca6a39f685b5_e0000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_f0000000, "bind_new_context", 17, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "destroy")) {

    _0RL_cd_69ceca6a39f685b5_01000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_11000000, "destroy", 8, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "list")) {

    _0RL_cd_69ceca6a39f685b5_21000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_31000000, "list", 5, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }


  return 0;
}

void*
CosNaming::_impl_NamingContext::_ptrToInterface(const char* id)
{
  if (id == ::CosNaming::NamingContext::_PD_repoId)
    return (::CosNaming::_impl_NamingContext*) this;
  
  if (id == ::CORBA::Object::_PD_repoId)
    return (void*) 1;

  if (omni::strMatch(id, ::CosNaming::NamingContext::_PD_repoId))
    return (::CosNaming::_impl_NamingContext*) this;
  
  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (void*) 1;
  return 0;
}

const char*
CosNaming::_impl_NamingContext::_mostDerivedRepoId()
{
  return ::CosNaming::NamingContext::_PD_repoId;
}

CosNaming::BindingIterator_ptr CosNaming::BindingIterator_Helper::_nil() {
  return ::CosNaming::BindingIterator::_nil();
}

::CORBA::Boolean CosNaming::BindingIterator_Helper::is_nil(::CosNaming::BindingIterator_ptr p) {
  return ::CORBA::is_nil(p);

}

void CosNaming::BindingIterator_Helper::release(::CosNaming::BindingIterator_ptr p) {
  ::CORBA::release(p);
}

void CosNaming::BindingIterator_Helper::marshalObjRef(::CosNaming::BindingIterator_ptr obj, cdrStream& s) {
  ::CosNaming::BindingIterator::_marshalObjRef(obj, s);
}

CosNaming::BindingIterator_ptr CosNaming::BindingIterator_Helper::unmarshalObjRef(cdrStream& s) {
  return ::CosNaming::BindingIterator::_unmarshalObjRef(s);
}

void CosNaming::BindingIterator_Helper::duplicate(::CosNaming::BindingIterator_ptr obj) {
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
}

CosNaming::BindingIterator_ptr
CosNaming::BindingIterator::_duplicate(::CosNaming::BindingIterator_ptr obj)
{
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
  return obj;
}

CosNaming::BindingIterator_ptr
CosNaming::BindingIterator::_narrow(::CORBA::Object_ptr obj)
{
  if (!obj || obj->_NP_is_nil() || obj->_NP_is_pseudo()) return _nil();
  _ptr_type e = (_ptr_type) obj->_PR_getobj()->_realNarrow(_PD_repoId);
  return e ? e : _nil();
}


CosNaming::BindingIterator_ptr
CosNaming::BindingIterator::_unchecked_narrow(::CORBA::Object_ptr obj)
{
  if (!obj || obj->_NP_is_nil() || obj->_NP_is_pseudo()) return _nil();
  _ptr_type e = (_ptr_type) obj->_PR_getobj()->_uncheckedNarrow(_PD_repoId);
  return e ? e : _nil();
}

CosNaming::BindingIterator_ptr
CosNaming::BindingIterator::_nil()
{
#ifdef OMNI_UNLOADABLE_STUBS
  static _objref_BindingIterator _the_nil_obj;
  return &_the_nil_obj;
#else
  static _objref_BindingIterator* _the_nil_ptr = 0;
  if (!_the_nil_ptr) {
    omni::nilRefLock().lock();
    if (!_the_nil_ptr) {
      _the_nil_ptr = new _objref_BindingIterator;
      registerNilCorbaObject(_the_nil_ptr);
    }
    omni::nilRefLock().unlock();
  }
  return _the_nil_ptr;
#endif
}

const char* CosNaming::BindingIterator::_PD_repoId = "IDL:omg.org/CosNaming/BindingIterator:1.0";


CosNaming::_objref_BindingIterator::~_objref_BindingIterator() {
  
}


CosNaming::_objref_BindingIterator::_objref_BindingIterator(omniIOR* ior, omniIdentity* id) :
   omniObjRef(::CosNaming::BindingIterator::_PD_repoId, ior, id, 1)
   
   
{
  _PR_setobj(this);
}

void*
CosNaming::_objref_BindingIterator::_ptrToObjRef(const char* id)
{
  if (id == ::CosNaming::BindingIterator::_PD_repoId)
    return (::CosNaming::BindingIterator_ptr) this;
  
  if (id == ::CORBA::Object::_PD_repoId)
    return (::CORBA::Object_ptr) this;

  if (omni::strMatch(id, ::CosNaming::BindingIterator::_PD_repoId))
    return (::CosNaming::BindingIterator_ptr) this;
  
  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (::CORBA::Object_ptr) this;

  return 0;
}


//
// Code for CosNaming::BindingIterator::next_one

// Proxy call descriptor class. Mangled signature:
//  _cboolean_o_cCosNaming_mBinding
class _0RL_cd_69ceca6a39f685b5_41000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_69ceca6a39f685b5_41000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  
  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  CosNaming::Binding_var arg_0;
  ::CORBA::Boolean result;
};

void _0RL_cd_69ceca6a39f685b5_41000000::marshalReturnedValues(cdrStream& _n)
{
  _n.marshalBoolean(result);
  (const CosNaming::Binding&) arg_0 >>= _n;

}

void _0RL_cd_69ceca6a39f685b5_41000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = _n.unmarshalBoolean();
  arg_0 = new CosNaming::Binding;
  (CosNaming::Binding&)arg_0 <<= _n;

}

const char* const _0RL_cd_69ceca6a39f685b5_41000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_69ceca6a39f685b5_51000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_69ceca6a39f685b5_41000000* tcd = (_0RL_cd_69ceca6a39f685b5_41000000*)cd;
  CosNaming::_impl_BindingIterator* impl = (CosNaming::_impl_BindingIterator*) svnt->_ptrToInterface(CosNaming::BindingIterator::_PD_repoId);
  tcd->result = impl->next_one(tcd->arg_0.out());


}

::CORBA::Boolean CosNaming::_objref_BindingIterator::next_one(::CosNaming::Binding_out b)
{
  _0RL_cd_69ceca6a39f685b5_41000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_51000000, "next_one", 9);


  _invoke(_call_desc);
  b = _call_desc.arg_0._retn();
  return _call_desc.result;


}


//
// Code for CosNaming::BindingIterator::next_n

// Proxy call descriptor class. Mangled signature:
//  _cboolean_i_cunsigned_plong_o_cCosNaming_mBindingList
class _0RL_cd_69ceca6a39f685b5_61000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_69ceca6a39f685b5_61000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  
  static const char* const _user_exns[];

  ::CORBA::ULong arg_0;
  CosNaming::BindingList_var arg_1;
  ::CORBA::Boolean result;
};

void _0RL_cd_69ceca6a39f685b5_61000000::marshalArguments(cdrStream& _n)
{
  arg_0 >>= _n;

}

void _0RL_cd_69ceca6a39f685b5_61000000::unmarshalArguments(cdrStream& _n)
{
  (::CORBA::ULong&)arg_0 <<= _n;

}

void _0RL_cd_69ceca6a39f685b5_61000000::marshalReturnedValues(cdrStream& _n)
{
  _n.marshalBoolean(result);
  (const CosNaming::BindingList&) arg_1 >>= _n;

}

void _0RL_cd_69ceca6a39f685b5_61000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = _n.unmarshalBoolean();
  arg_1 = new CosNaming::BindingList;
  (CosNaming::BindingList&)arg_1 <<= _n;

}

const char* const _0RL_cd_69ceca6a39f685b5_61000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_69ceca6a39f685b5_71000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_69ceca6a39f685b5_61000000* tcd = (_0RL_cd_69ceca6a39f685b5_61000000*)cd;
  CosNaming::_impl_BindingIterator* impl = (CosNaming::_impl_BindingIterator*) svnt->_ptrToInterface(CosNaming::BindingIterator::_PD_repoId);
  tcd->result = impl->next_n(tcd->arg_0, tcd->arg_1.out());


}

::CORBA::Boolean CosNaming::_objref_BindingIterator::next_n(::CORBA::ULong how_many, ::CosNaming::BindingList_out bl)
{
  _0RL_cd_69ceca6a39f685b5_61000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_71000000, "next_n", 7);
  _call_desc.arg_0 = how_many;

  _invoke(_call_desc);
  bl = _call_desc.arg_1._retn();
  return _call_desc.result;


}


//
// Code for CosNaming::BindingIterator::destroy

// Proxy call descriptor class. Mangled signature:
//  void
class _0RL_cd_69ceca6a39f685b5_81000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_69ceca6a39f685b5_81000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall)
  {
    
  }
  
  
    
  
  static const char* const _user_exns[];

  
};

const char* const _0RL_cd_69ceca6a39f685b5_81000000::_user_exns[] = {
  0
};

// Local call call-back function.
static void
_0RL_lcfn_69ceca6a39f685b5_91000000(omniCallDescriptor*, omniServant* svnt)
{
  
  CosNaming::_impl_BindingIterator* impl = (CosNaming::_impl_BindingIterator*) svnt->_ptrToInterface(CosNaming::BindingIterator::_PD_repoId);
  impl->destroy();


}

void CosNaming::_objref_BindingIterator::destroy()
{
  _0RL_cd_69ceca6a39f685b5_81000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_91000000, "destroy", 8);


  _invoke(_call_desc);



}

CosNaming::_pof_BindingIterator::~_pof_BindingIterator() {}


omniObjRef*
CosNaming::_pof_BindingIterator::newObjRef(omniIOR* ior, omniIdentity* id)
{
  return new ::CosNaming::_objref_BindingIterator(ior, id);
}


::CORBA::Boolean
CosNaming::_pof_BindingIterator::is_a(const char* id) const
{
  if (omni::ptrStrMatch(id, ::CosNaming::BindingIterator::_PD_repoId))
    return 1;
  
  return 0;
}

const CosNaming::_pof_BindingIterator _the_pof_CosNaming_mBindingIterator;

CosNaming::_impl_BindingIterator::~_impl_BindingIterator() {}


::CORBA::Boolean
CosNaming::_impl_BindingIterator::_dispatch(omniCallHandle& _handle)
{
  const char* op = _handle.operation_name();

  if (omni::strMatch(op, "next_one")) {

    _0RL_cd_69ceca6a39f685b5_41000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_51000000, "next_one", 9, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "next_n")) {

    _0RL_cd_69ceca6a39f685b5_61000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_71000000, "next_n", 7, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "destroy")) {

    _0RL_cd_69ceca6a39f685b5_81000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_91000000, "destroy", 8, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }


  return 0;
}

void*
CosNaming::_impl_BindingIterator::_ptrToInterface(const char* id)
{
  if (id == ::CosNaming::BindingIterator::_PD_repoId)
    return (::CosNaming::_impl_BindingIterator*) this;
  
  if (id == ::CORBA::Object::_PD_repoId)
    return (void*) 1;

  if (omni::strMatch(id, ::CosNaming::BindingIterator::_PD_repoId))
    return (::CosNaming::_impl_BindingIterator*) this;
  
  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (void*) 1;
  return 0;
}

const char*
CosNaming::_impl_BindingIterator::_mostDerivedRepoId()
{
  return ::CosNaming::BindingIterator::_PD_repoId;
}

::CORBA::Exception::insertExceptionToAny CosNaming::NamingContextExt::InvalidAddress::insertToAnyFn = 0;
::CORBA::Exception::insertExceptionToAnyNCP CosNaming::NamingContextExt::InvalidAddress::insertToAnyFnNCP = 0;

CosNaming::NamingContextExt::InvalidAddress::InvalidAddress(const CosNaming::NamingContextExt::InvalidAddress& _s) : ::CORBA::UserException(_s)
{
  
}



CosNaming::NamingContextExt::InvalidAddress& CosNaming::NamingContextExt::InvalidAddress::operator=(const CosNaming::NamingContextExt::InvalidAddress& _s)
{
  if (&_s != this) {
    ((::CORBA::UserException*) this)->operator=(_s);
    
  }
  return *this;
}

CosNaming::NamingContextExt::InvalidAddress::~InvalidAddress() {}

void CosNaming::NamingContextExt::InvalidAddress::_raise() const { throw *this; }

const char* CosNaming::NamingContextExt::InvalidAddress::_PD_repoId = "IDL:omg.org/CosNaming/NamingContextExt/InvalidAddress:1.0";
const char* CosNaming::NamingContextExt::InvalidAddress::_PD_typeId = "Exception/UserException/CosNaming::NamingContextExt::InvalidAddress";

CosNaming::NamingContextExt::InvalidAddress* CosNaming::NamingContextExt::InvalidAddress::_downcast(::CORBA::Exception* _e) {
  return (InvalidAddress*) _NP_is_a(_e, _PD_typeId);
}

const CosNaming::NamingContextExt::InvalidAddress* CosNaming::NamingContextExt::InvalidAddress::_downcast(const ::CORBA::Exception* _e) {
  return (const InvalidAddress*) _NP_is_a(_e, _PD_typeId);
}

::CORBA::Exception* CosNaming::NamingContextExt::InvalidAddress::_NP_duplicate() const {
  return new InvalidAddress(*this);
}

const char* CosNaming::NamingContextExt::InvalidAddress::_NP_typeId() const {
  return _PD_typeId;
}

const char* CosNaming::NamingContextExt::InvalidAddress::_NP_repoId(int* _size) const {
  *_size = sizeof("IDL:omg.org/CosNaming/NamingContextExt/InvalidAddress:1.0");
  return _PD_repoId;
}
 
void CosNaming::NamingContextExt::InvalidAddress::_NP_marshal(cdrStream& _s) const {
  *this >>= _s;
}

CosNaming::NamingContextExt_ptr CosNaming::NamingContextExt_Helper::_nil() {
  return ::CosNaming::NamingContextExt::_nil();
}

::CORBA::Boolean CosNaming::NamingContextExt_Helper::is_nil(::CosNaming::NamingContextExt_ptr p) {
  return ::CORBA::is_nil(p);

}

void CosNaming::NamingContextExt_Helper::release(::CosNaming::NamingContextExt_ptr p) {
  ::CORBA::release(p);
}

void CosNaming::NamingContextExt_Helper::marshalObjRef(::CosNaming::NamingContextExt_ptr obj, cdrStream& s) {
  ::CosNaming::NamingContextExt::_marshalObjRef(obj, s);
}

CosNaming::NamingContextExt_ptr CosNaming::NamingContextExt_Helper::unmarshalObjRef(cdrStream& s) {
  return ::CosNaming::NamingContextExt::_unmarshalObjRef(s);
}

void CosNaming::NamingContextExt_Helper::duplicate(::CosNaming::NamingContextExt_ptr obj) {
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
}

CosNaming::NamingContextExt_ptr
CosNaming::NamingContextExt::_duplicate(::CosNaming::NamingContextExt_ptr obj)
{
  if (obj && !obj->_NP_is_nil())  omni::duplicateObjRef(obj);
  return obj;
}

CosNaming::NamingContextExt_ptr
CosNaming::NamingContextExt::_narrow(::CORBA::Object_ptr obj)
{
  if (!obj || obj->_NP_is_nil() || obj->_NP_is_pseudo()) return _nil();
  _ptr_type e = (_ptr_type) obj->_PR_getobj()->_realNarrow(_PD_repoId);
  return e ? e : _nil();
}


CosNaming::NamingContextExt_ptr
CosNaming::NamingContextExt::_unchecked_narrow(::CORBA::Object_ptr obj)
{
  if (!obj || obj->_NP_is_nil() || obj->_NP_is_pseudo()) return _nil();
  _ptr_type e = (_ptr_type) obj->_PR_getobj()->_uncheckedNarrow(_PD_repoId);
  return e ? e : _nil();
}

CosNaming::NamingContextExt_ptr
CosNaming::NamingContextExt::_nil()
{
#ifdef OMNI_UNLOADABLE_STUBS
  static _objref_NamingContextExt _the_nil_obj;
  return &_the_nil_obj;
#else
  static _objref_NamingContextExt* _the_nil_ptr = 0;
  if (!_the_nil_ptr) {
    omni::nilRefLock().lock();
    if (!_the_nil_ptr) {
      _the_nil_ptr = new _objref_NamingContextExt;
      registerNilCorbaObject(_the_nil_ptr);
    }
    omni::nilRefLock().unlock();
  }
  return _the_nil_ptr;
#endif
}

const char* CosNaming::NamingContextExt::_PD_repoId = "IDL:omg.org/CosNaming/NamingContextExt:1.0";


CosNaming::_objref_NamingContextExt::~_objref_NamingContextExt() {
  
}


CosNaming::_objref_NamingContextExt::_objref_NamingContextExt(omniIOR* ior, omniIdentity* id) :
   omniObjRef(::CosNaming::NamingContextExt::_PD_repoId, ior, id, 1),
   _objref_NamingContext(ior, id)
   
{
  _PR_setobj(this);
}

void*
CosNaming::_objref_NamingContextExt::_ptrToObjRef(const char* id)
{
  if (id == ::CosNaming::NamingContextExt::_PD_repoId)
    return (::CosNaming::NamingContextExt_ptr) this;
  if (id == ::CosNaming::NamingContext::_PD_repoId)
    return (::CosNaming::NamingContext_ptr) this;


  if (id == ::CORBA::Object::_PD_repoId)
    return (::CORBA::Object_ptr) this;

  if (omni::strMatch(id, ::CosNaming::NamingContextExt::_PD_repoId))
    return (::CosNaming::NamingContextExt_ptr) this;
  if (omni::strMatch(id, ::CosNaming::NamingContext::_PD_repoId))
    return (::CosNaming::NamingContext_ptr) this;


  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (::CORBA::Object_ptr) this;

  return 0;
}


//
// Code for CosNaming::NamingContextExt::to_string

// Proxy call descriptor class. Mangled signature:
//  _cstring_i_cCosNaming_mName_e_cCosNaming_mNamingContext_mInvalidName
class _0RL_cd_69ceca6a39f685b5_a1000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_69ceca6a39f685b5_a1000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 1, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  void userException(cdrStream&, _OMNI_NS(IOP_C)*, const char*);
  static const char* const _user_exns[];

  CosNaming::Name_var arg_0_;
  const CosNaming::Name* arg_0;
  ::CORBA::String_var result;
};

void _0RL_cd_69ceca6a39f685b5_a1000000::marshalArguments(cdrStream& _n)
{
  (const CosNaming::Name&) *arg_0 >>= _n;

}

void _0RL_cd_69ceca6a39f685b5_a1000000::unmarshalArguments(cdrStream& _n)
{
  arg_0_ = new CosNaming::Name;
  (CosNaming::Name&)arg_0_ <<= _n;
  arg_0 = &arg_0_.in();

}

void _0RL_cd_69ceca6a39f685b5_a1000000::marshalReturnedValues(cdrStream& _n)
{
  _n.marshalString(result,0);

}

void _0RL_cd_69ceca6a39f685b5_a1000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = _n.unmarshalString(0);

}

const char* const _0RL_cd_69ceca6a39f685b5_a1000000::_user_exns[] = {
  CosNaming::NamingContext::InvalidName::_PD_repoId
};

void _0RL_cd_69ceca6a39f685b5_a1000000::userException(cdrStream& s, _OMNI_NS(IOP_C)* iop_client, const char* repoId)
{
  if (omni::strMatch(repoId, CosNaming::NamingContext::InvalidName::_PD_repoId)) {
    CosNaming::NamingContext::InvalidName _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }


  else {
    if (iop_client) iop_client->RequestCompleted(1);
    OMNIORB_THROW(UNKNOWN,UNKNOWN_UserException,
                  (::CORBA::CompletionStatus)s.completion());
  }
}

// Local call call-back function.
static void
_0RL_lcfn_69ceca6a39f685b5_b1000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_69ceca6a39f685b5_a1000000* tcd = (_0RL_cd_69ceca6a39f685b5_a1000000*)cd;
  CosNaming::_impl_NamingContextExt* impl = (CosNaming::_impl_NamingContextExt*) svnt->_ptrToInterface(CosNaming::NamingContextExt::_PD_repoId);
#ifdef OMNI_HAS_Cplusplus_catch_exception_by_base
  tcd->result = impl->to_string(*tcd->arg_0);
#else
  if (!cd->is_upcall())
    tcd->result = impl->to_string(*tcd->arg_0);
  else {
    try {
      tcd->result = impl->to_string(*tcd->arg_0);
    }
    catch(CosNaming::NamingContext::InvalidName& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }


  }
#endif


}

char* CosNaming::_objref_NamingContextExt::to_string(const ::CosNaming::Name& n)
{
  _0RL_cd_69ceca6a39f685b5_a1000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_b1000000, "to_string", 10);
  _call_desc.arg_0 = &(::CosNaming::Name&) n;

  _invoke(_call_desc);
  return _call_desc.result._retn();


}


//
// Code for CosNaming::NamingContextExt::to_name

// Proxy call descriptor class. Mangled signature:
//  _cCosNaming_mName_i_cstring_e_cCosNaming_mNamingContext_mInvalidName
class _0RL_cd_69ceca6a39f685b5_c1000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_69ceca6a39f685b5_c1000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 1, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  void userException(cdrStream&, _OMNI_NS(IOP_C)*, const char*);
  static const char* const _user_exns[];

  ::CORBA::String_var arg_0_;
  const char* arg_0;
  CosNaming::Name_var result;
};

void _0RL_cd_69ceca6a39f685b5_c1000000::marshalArguments(cdrStream& _n)
{
  _n.marshalString(arg_0,0);

}

void _0RL_cd_69ceca6a39f685b5_c1000000::unmarshalArguments(cdrStream& _n)
{
  arg_0_ = _n.unmarshalString(0);
  arg_0 = arg_0_.in();

}

void _0RL_cd_69ceca6a39f685b5_c1000000::marshalReturnedValues(cdrStream& _n)
{
  (const CosNaming::Name&) result >>= _n;

}

void _0RL_cd_69ceca6a39f685b5_c1000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = new CosNaming::Name;
  (CosNaming::Name&)result <<= _n;

}

const char* const _0RL_cd_69ceca6a39f685b5_c1000000::_user_exns[] = {
  CosNaming::NamingContext::InvalidName::_PD_repoId
};

void _0RL_cd_69ceca6a39f685b5_c1000000::userException(cdrStream& s, _OMNI_NS(IOP_C)* iop_client, const char* repoId)
{
  if (omni::strMatch(repoId, CosNaming::NamingContext::InvalidName::_PD_repoId)) {
    CosNaming::NamingContext::InvalidName _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }


  else {
    if (iop_client) iop_client->RequestCompleted(1);
    OMNIORB_THROW(UNKNOWN,UNKNOWN_UserException,
                  (::CORBA::CompletionStatus)s.completion());
  }
}

// Local call call-back function.
static void
_0RL_lcfn_69ceca6a39f685b5_d1000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_69ceca6a39f685b5_c1000000* tcd = (_0RL_cd_69ceca6a39f685b5_c1000000*)cd;
  CosNaming::_impl_NamingContextExt* impl = (CosNaming::_impl_NamingContextExt*) svnt->_ptrToInterface(CosNaming::NamingContextExt::_PD_repoId);
#ifdef OMNI_HAS_Cplusplus_catch_exception_by_base
  tcd->result = impl->to_name(tcd->arg_0);
#else
  if (!cd->is_upcall())
    tcd->result = impl->to_name(tcd->arg_0);
  else {
    try {
      tcd->result = impl->to_name(tcd->arg_0);
    }
    catch(CosNaming::NamingContext::InvalidName& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }


  }
#endif


}

CosNaming::Name* CosNaming::_objref_NamingContextExt::to_name(const char* sn)
{
  _0RL_cd_69ceca6a39f685b5_c1000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_d1000000, "to_name", 8);
  _call_desc.arg_0 = sn;

  _invoke(_call_desc);
  return _call_desc.result._retn();


}


//
// Code for CosNaming::NamingContextExt::to_url

// Proxy call descriptor class. Mangled signature:
//  _cstring_i_cstring_i_cstring_e_cCosNaming_mNamingContext_mInvalidName_e_cCosNaming_mNamingContextExt_mInvalidAddress
class _0RL_cd_69ceca6a39f685b5_e1000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_69ceca6a39f685b5_e1000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 2, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  void userException(cdrStream&, _OMNI_NS(IOP_C)*, const char*);
  static const char* const _user_exns[];

  ::CORBA::String_var arg_0_;
  const char* arg_0;
  ::CORBA::String_var arg_1_;
  const char* arg_1;
  ::CORBA::String_var result;
};

void _0RL_cd_69ceca6a39f685b5_e1000000::marshalArguments(cdrStream& _n)
{
  _n.marshalString(arg_0,0);
  _n.marshalString(arg_1,0);

}

void _0RL_cd_69ceca6a39f685b5_e1000000::unmarshalArguments(cdrStream& _n)
{
  arg_0_ = _n.unmarshalString(0);
  arg_0 = arg_0_.in();
  arg_1_ = _n.unmarshalString(0);
  arg_1 = arg_1_.in();

}

void _0RL_cd_69ceca6a39f685b5_e1000000::marshalReturnedValues(cdrStream& _n)
{
  _n.marshalString(result,0);

}

void _0RL_cd_69ceca6a39f685b5_e1000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = _n.unmarshalString(0);

}

const char* const _0RL_cd_69ceca6a39f685b5_e1000000::_user_exns[] = {
  CosNaming::NamingContext::InvalidName::_PD_repoId,
  CosNaming::NamingContextExt::InvalidAddress::_PD_repoId
};

void _0RL_cd_69ceca6a39f685b5_e1000000::userException(cdrStream& s, _OMNI_NS(IOP_C)* iop_client, const char* repoId)
{
  if (omni::strMatch(repoId, CosNaming::NamingContext::InvalidName::_PD_repoId)) {
    CosNaming::NamingContext::InvalidName _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContextExt::InvalidAddress::_PD_repoId)) {
    CosNaming::NamingContextExt::InvalidAddress _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }


  else {
    if (iop_client) iop_client->RequestCompleted(1);
    OMNIORB_THROW(UNKNOWN,UNKNOWN_UserException,
                  (::CORBA::CompletionStatus)s.completion());
  }
}

// Local call call-back function.
static void
_0RL_lcfn_69ceca6a39f685b5_f1000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_69ceca6a39f685b5_e1000000* tcd = (_0RL_cd_69ceca6a39f685b5_e1000000*)cd;
  CosNaming::_impl_NamingContextExt* impl = (CosNaming::_impl_NamingContextExt*) svnt->_ptrToInterface(CosNaming::NamingContextExt::_PD_repoId);
#ifdef OMNI_HAS_Cplusplus_catch_exception_by_base
  tcd->result = impl->to_url(tcd->arg_0, tcd->arg_1);
#else
  if (!cd->is_upcall())
    tcd->result = impl->to_url(tcd->arg_0, tcd->arg_1);
  else {
    try {
      tcd->result = impl->to_url(tcd->arg_0, tcd->arg_1);
    }
    catch(CosNaming::NamingContextExt::InvalidAddress& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::InvalidName& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }


  }
#endif


}

char* CosNaming::_objref_NamingContextExt::to_url(const char* addr, const char* sn)
{
  _0RL_cd_69ceca6a39f685b5_e1000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_f1000000, "to_url", 7);
  _call_desc.arg_0 = addr;
  _call_desc.arg_1 = sn;

  _invoke(_call_desc);
  return _call_desc.result._retn();


}


//
// Code for CosNaming::NamingContextExt::resolve_str

// Proxy call descriptor class. Mangled signature:
//  _cCORBA_mObject_i_cstring_e_cCosNaming_mNamingContext_mAlreadyBound_e_cCosNaming_mNamingContext_mCannotProceed_e_cCosNaming_mNamingContext_mInvalidName_e_cCosNaming_mNamingContext_mNotFound
class _0RL_cd_69ceca6a39f685b5_02000000
  : public omniCallDescriptor
{
public:
  inline _0RL_cd_69ceca6a39f685b5_02000000(LocalCallFn lcfn, const char* op_, size_t oplen, _CORBA_Boolean upcall=0)
    : omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 4, upcall)
  {
    
  }
  
  void marshalArguments(cdrStream&);
  void unmarshalArguments(cdrStream&);

  void unmarshalReturnedValues(cdrStream&);
  void marshalReturnedValues(cdrStream&);
  
  void userException(cdrStream&, _OMNI_NS(IOP_C)*, const char*);
  static const char* const _user_exns[];

  ::CORBA::String_var arg_0_;
  const char* arg_0;
  CORBA::Object_var result;
};

void _0RL_cd_69ceca6a39f685b5_02000000::marshalArguments(cdrStream& _n)
{
  _n.marshalString(arg_0,0);

}

void _0RL_cd_69ceca6a39f685b5_02000000::unmarshalArguments(cdrStream& _n)
{
  arg_0_ = _n.unmarshalString(0);
  arg_0 = arg_0_.in();

}

void _0RL_cd_69ceca6a39f685b5_02000000::marshalReturnedValues(cdrStream& _n)
{
  CORBA::Object::_marshalObjRef(result,_n);

}

void _0RL_cd_69ceca6a39f685b5_02000000::unmarshalReturnedValues(cdrStream& _n)
{
  result = CORBA::Object::_unmarshalObjRef(_n);

}

const char* const _0RL_cd_69ceca6a39f685b5_02000000::_user_exns[] = {
  CosNaming::NamingContext::AlreadyBound::_PD_repoId,
  CosNaming::NamingContext::CannotProceed::_PD_repoId,
  CosNaming::NamingContext::InvalidName::_PD_repoId,
  CosNaming::NamingContext::NotFound::_PD_repoId
};

void _0RL_cd_69ceca6a39f685b5_02000000::userException(cdrStream& s, _OMNI_NS(IOP_C)* iop_client, const char* repoId)
{
  if (omni::strMatch(repoId, CosNaming::NamingContext::AlreadyBound::_PD_repoId)) {
    CosNaming::NamingContext::AlreadyBound _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::CannotProceed::_PD_repoId)) {
    CosNaming::NamingContext::CannotProceed _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::InvalidName::_PD_repoId)) {
    CosNaming::NamingContext::InvalidName _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }

  if (omni::strMatch(repoId, CosNaming::NamingContext::NotFound::_PD_repoId)) {
    CosNaming::NamingContext::NotFound _ex;
    _ex <<= s;
    if (iop_client) iop_client->RequestCompleted();
    throw _ex;
  }


  else {
    if (iop_client) iop_client->RequestCompleted(1);
    OMNIORB_THROW(UNKNOWN,UNKNOWN_UserException,
                  (::CORBA::CompletionStatus)s.completion());
  }
}

// Local call call-back function.
static void
_0RL_lcfn_69ceca6a39f685b5_12000000(omniCallDescriptor* cd, omniServant* svnt)
{
  _0RL_cd_69ceca6a39f685b5_02000000* tcd = (_0RL_cd_69ceca6a39f685b5_02000000*)cd;
  CosNaming::_impl_NamingContextExt* impl = (CosNaming::_impl_NamingContextExt*) svnt->_ptrToInterface(CosNaming::NamingContextExt::_PD_repoId);
#ifdef OMNI_HAS_Cplusplus_catch_exception_by_base
  tcd->result = impl->resolve_str(tcd->arg_0);
#else
  if (!cd->is_upcall())
    tcd->result = impl->resolve_str(tcd->arg_0);
  else {
    try {
      tcd->result = impl->resolve_str(tcd->arg_0);
    }
    catch(CosNaming::NamingContext::NotFound& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::CannotProceed& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::InvalidName& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }

    catch(CosNaming::NamingContext::AlreadyBound& ex) {
      throw omniORB::StubUserException(ex._NP_duplicate());
    }


  }
#endif


}

CORBA::Object_ptr CosNaming::_objref_NamingContextExt::resolve_str(const char* n)
{
  _0RL_cd_69ceca6a39f685b5_02000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_12000000, "resolve_str", 12);
  _call_desc.arg_0 = n;

  _invoke(_call_desc);
  return _call_desc.result._retn();


}

CosNaming::_pof_NamingContextExt::~_pof_NamingContextExt() {}


omniObjRef*
CosNaming::_pof_NamingContextExt::newObjRef(omniIOR* ior, omniIdentity* id)
{
  return new ::CosNaming::_objref_NamingContextExt(ior, id);
}


::CORBA::Boolean
CosNaming::_pof_NamingContextExt::is_a(const char* id) const
{
  if (omni::ptrStrMatch(id, ::CosNaming::NamingContextExt::_PD_repoId))
    return 1;
  if (omni::ptrStrMatch(id, CosNaming::NamingContext::_PD_repoId))
    return 1;


  return 0;
}

const CosNaming::_pof_NamingContextExt _the_pof_CosNaming_mNamingContextExt;

CosNaming::_impl_NamingContextExt::~_impl_NamingContextExt() {}


::CORBA::Boolean
CosNaming::_impl_NamingContextExt::_dispatch(omniCallHandle& _handle)
{
  const char* op = _handle.operation_name();

  if (omni::strMatch(op, "to_string")) {

    _0RL_cd_69ceca6a39f685b5_a1000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_b1000000, "to_string", 10, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "to_name")) {

    _0RL_cd_69ceca6a39f685b5_c1000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_d1000000, "to_name", 8, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "to_url")) {

    _0RL_cd_69ceca6a39f685b5_e1000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_f1000000, "to_url", 7, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  if (omni::strMatch(op, "resolve_str")) {

    _0RL_cd_69ceca6a39f685b5_02000000 _call_desc(_0RL_lcfn_69ceca6a39f685b5_12000000, "resolve_str", 12, 1);
    
    _handle.upcall(this,_call_desc);
    return 1;
  }

  
#ifndef _MSC_VER
  if (_impl_NamingContext::_dispatch(_handle)) {
    return 1;
  }
#else
  // Work-around for incorrect MSVC code generation.
  if (((_impl_NamingContext*)this)->
      _impl_NamingContext::_dispatch(_handle)) {
    return 1;
  }
#endif


  return 0;
}

void*
CosNaming::_impl_NamingContextExt::_ptrToInterface(const char* id)
{
  if (id == ::CosNaming::NamingContextExt::_PD_repoId)
    return (::CosNaming::_impl_NamingContextExt*) this;
  if (id == ::CosNaming::NamingContext::_PD_repoId)
    return (::CosNaming::_impl_NamingContext*) this;


  if (id == ::CORBA::Object::_PD_repoId)
    return (void*) 1;

  if (omni::strMatch(id, ::CosNaming::NamingContextExt::_PD_repoId))
    return (::CosNaming::_impl_NamingContextExt*) this;
  if (omni::strMatch(id, ::CosNaming::NamingContext::_PD_repoId))
    return (::CosNaming::_impl_NamingContext*) this;


  if (omni::strMatch(id, ::CORBA::Object::_PD_repoId))
    return (void*) 1;
  return 0;
}

const char*
CosNaming::_impl_NamingContextExt::_mostDerivedRepoId()
{
  return ::CosNaming::NamingContextExt::_PD_repoId;
}

POA_CosNaming::NamingContext::~NamingContext() {}

POA_CosNaming::BindingIterator::~BindingIterator() {}

POA_CosNaming::NamingContextExt::~NamingContextExt() {}

