[omniORB] understanding out parameters and returned values and how to use them

Bailey, Kendall BaileyK at schneider.com
Fri Jul 22 10:25:23 BST 2011


The Python mapping is documented here: http://www.omg.org/spec/PYTH/1.2/PDF

The relevant portion  is:

Operations of an interface map to methods available on the object references.
Parameters with a parameter attribute of in or inout are passed from left to right to
the method, skipping out parameters. The return value of a method depends on the
number of out parameters and the return type. If the operation returns a value, this
value forms the first result value. All inout or out parameters form consecutive result
values. The method result depends then on the number of result values:
* If there is no result value, the method returns None.
* If there is exactly one result value, it is returned as a single value.
* If there is more than one result value, all of them are packed into a tuple, and this
tuple is returned.


So for your example, you should return a tuple consisting of the return value first, followed by the one out parameter value.  On the client side expect to receive a 2 element tuple as well.

HTH,
Kendall






More information about the omniORB-list mailing list