[omniORB] Passing a sequence of structure's from Python

Kevin Wooten kwooten@itracs.com
Tue Jul 16 18:19:01 2002


I am trying to pass a sequence of structures from Python, and it bombs with "WrongPythonType". I assume I am doing something wrong. Here are the relevant bits....

// idl
	typedef sequence<Any> AnySeq;

	interface iPropertyAccess
		:  iInterface
	{
		const long ReadAccess	= 1;
		const long WriteAccess	= 2;

		struct Property {
			string name;
			string helpText;
			long access;
			any value;
			string editor;
			AnySeq editorParams;
		};

		typedef sequence<Property> PropertySeq;

		attribute PropertySeq properties;
	};

#python code to SET properties
props = []
for x in range(5):
	props.append( im.iPropertyAccess.Property("test","",0L,CORBA.Any(CORBA._tc_string,"test value"),"",[]) )

#...get instance of property access

propAccess._set_properties( props )

#the above line dies with...
Traceback (most recent call last):
  File "c:/zaskar/idl\zaskar_idl.py", line 786, in _set_properties
    return _omnipy.invoke(self, "_set_properties", _0_im.iPropertyAccess._d__set_properties, args)
omniORB.CORBA.BAD_PARAM: Minor: BAD_PARAM_WrongPythonType, COMPLETED_NO.

Kevin Wooten
iTRACS Corporation
email: kwooten@itracs.com
phone: 480-557-8000 ext. 132