[omniORB] Passing a Sequence from Python to C++

entonh at gmx.de entonh at gmx.de
Tue Feb 19 09:06:13 GMT 2008


Hello again,

the error I posted before solved itself so I didn't change anything in the code?!

When I call the init-function like you suggested
(obj.init(CORBA.Any((CORBA.TypeCode(ParSeq),list_all))))
I retrieve a BAD_PARAM_WrongPythonType error?!

When I call it like obj.init(list_all) the BAD_PARAM error is gone
but instead I get the following error:
COMM_FAILURE: Minor: COMM_FAILURE_WaitingForReply, COMPLETED_MAYBE.

Why I don't have to cast my list_all into an Any although it is defined in the idl-file: any init(in any list_all)

When is the COMM_FAILURE error thrown or where does it come from?

Do you have any ideas?

Greetings,
EntonH


-------- Original-Nachricht --------
> Datum: Mon, 18 Feb 2008 19:36:39 +0800
> Von: "Gideon Guillen" <gideong at gmail.com>
> An: omniorb-list at omniorb-support.com
> Betreff: Re: [omniORB] Passing a Sequence from Python to C++

> On 2/18/08, EntonH <entonh at gmx.de> wrote:
> > can't someone give me an advice how to do it? :o(
> > I still get the BAD_PARAM WronPythonType error... :o(
> [snipped]
> > typedef sequence param ParSeq;
> > ....
> > list_all =  []
> > list_all.append (idlfile.param("1",CORBA.Any(CORBA._tc_any,list1)))
> > list_all.append (idlfile.param("2",CORBA.Any(CORBA._tc_any,list2)))
> 
> You can only use the primitive types and types that were defined on
> your IDL on the "any" type.
> 
> Try using the following instead:
>    list_all = []
>    list_all.append
> (idlfile.param("1",CORBA.Any(CORBA.TypeCode(ParSeq),list1)))
>    list_all.append
> (idlfile.param("2",CORBA.Any(CORBA.TypeCode(ParSeq),list2)))
>    ...
>    obj.init(CORBA.Any((CORBA.TypeCode(ParSeq),list_all)))
> 
> -- 
> Gideon N. Guillen
> gideong at gmail.com
> 
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger



More information about the omniORB-list mailing list