Question
- From: =?koi8-r?B?4dLUxc0g59XM2MvP?= <gulko komset ru>
- To: <orbit-list gnome org>
- Subject: Question
- Date: Thu, 19 Dec 2002 11:20:05 +0300
I send my IOR (saved in file) to remote host and try to call method of
CORBA-object.
I got error "Invalid Object Ref".
What can I do to call method of my CORBA-object from remote host?
//Servant code
//SIDSV Interface
SPSW_SID2SupervisorInterface SIDSV = CORBA_OBJECT_NIL;
CORBA_string
Init(SPSW_App2SupervisorInterface _obj,
CORBA_Environment * ev)
{
printf("Init\n");
return "Hello";
}
PortableServer_ServantBase__epv sid_base_epv = {
NULL,
NULL,
NULL
};
POA_SPSW_SID2SupervisorInterface__epv sid_epv = {NULL,Init};
POA_SPSW_SID2SupervisorInterface__vepv sid_vepv = {&sid_base_epv,&sid_epv};
POA_SPSW_SID2SupervisorInterface sid_servant = {NULL,&sid_vepv};
//Init POA
CORBA_exception_init(&ev);
orb = CORBA_ORB_init(&argc,argv,"orbit-local-orb",&ev);
POA_SPSW_SID2SupervisorInterface__init(&sid_servant,&ev);
poa =
(PortableServer_POA)CORBA_ORB_resolve_initial_references(orb,"RootPOA",&ev);
PortableServer_POAManager_activate(PortableServer_POA__get_the_POAManager(po
a,&ev),&ev);
CORBA_PolicyList * poa_policies;
poa_policies = CORBA_PolicyList__alloc ();
poa_policies->_maximum = 1;
poa_policies->_length = 1;
poa_policies->_buffer = CORBA_PolicyList_allocbuf (1);
CORBA_sequence_set_release (poa_policies, CORBA_TRUE);
poa_policies->_buffer[0] = (CORBA_Policy)
PortableServer_POA_create_lifespan_policy (
poa,
PortableServer_TRANSIENT,
&ev);
PortableServer_POA mypoa = PortableServer_POA_create_POA(poa,"MyPOA",
PortableServer_POA__get_the_POAManager(poa,&ev),poa_policies,&ev);
SIDSV = PortableServer_POA_servant_to_reference(mypoa,&sid_servant,&ev);
retval = CORBA_ORB_object_to_string(orb,SIDSV,&ev);
g_print("%s\n",retval);
fflush(stdout);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]