[omniORB] CorbaScript on omniORB2 (2)
Philippe.Merle@lifl.fr
Philippe.Merle@lifl.fr
Tue, 20 Jul 1999 16:04:02 +0200 (MET DST)
Hello,
I have another problem in the port of CorbaScript on omniORB2.
I try to dynamically invoke the Name Service (throught DII).
Here CorbaScript snapshot:
unix> cssh
CorbaScript 1.3.1 (Jul 20 1999) for omniORB2 for C++
Copyright 1996-99 LIFL, France
>>> ns = CORBA.ORB.resolve_initial_references("NameService")
>>> ns
CosNaming::NamingContext("IOR:... etc etc ...")
>>> ns.bind([["NS",""]],ns)
Exception: IDL:omg.org/CORBA/BAD_OPERATION(minor=0,completed=COMPLETED_NO)
File "stdin", line 1 in ???
The problem is in the following constructors of the RequestImpl class:
RequestImpl::RequestImpl(CORBA::Object_ptr target, const char* operation)
RequestImpl::RequestImpl(CORBA::Object_ptr target, const char* operation,
CORBA::Context_ptr context,
CORBA::NVList_ptr arguments,
CORBA::NamedValue_ptr result)
they must initialize the ExceptionList:
pd_exceptions = new ExceptionListImpl;
Because if I have the following IDL code:
exception MyException {};
interface MyInterface {
void myOperation() raises(MyException);
};
then the following C++ code is correct:
CORBA::Object_var object = ...;
CORBA::Request_var request = object->_request("myOperation");
request->set_return_type(CORBA::_tc_void);
request->exceptions()->add(_tc_MyException);
request->invoke();
Currently, as the RequestImpl constructor doesn't initialize the ExceptionList
then the request->exceptions()->add() call fails!
A+
Philippe Merle
--
________________________________________________________________________________
Philippe Merle
Universite des Sciences et Technologies de Lille
URA 369 CNRS
Laboratoire d'Informatique Fondamentale de Lille Tel: (33) 03 20 43 47 21
U.F.R. I.E.E.A. batiment M3 Fax: (33) 03 20 43 65 66
59655 Villeneuve d'Ascq CEDEX France E-Mail: merle@lifl.fr
Web: http://www.lifl.fr/~merle
________________________________________________________________________________