[omniORB] CorbaScript on omniORB2 (2)
Philippe.Merle@lifl.fr
Philippe.Merle@lifl.fr
Tue, 20 Jul 1999 17:57:51 +0200 (MET DST)
Hello David,
Great! I just need something like that.
A+
Philippe Merle
> From: David Riddoch <djr@uk.research.att.com>
> Subject: Re: [omniORB] CorbaScript on omniORB2 (2)
>
> Hi,
>
> I'm not sure that the spec has anything to say on this subject, but what
> you are doing looks like a sensible think to do, so I've modified the ORB
> to support it.
>
> However, I'm not doing it in the constructor as you suggested, but in
> the attribute accessor.
>
> I've also done the same thing for the 'contexts' attribute.
>
>
> David
>
> On Tue, 20 Jul 1999 Philippe.Merle@lifl.fr wrote:
>
> > 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!
>