Orber and out-parameters in idl
Niclas Eklund
nick@REDACTED
Wed Sep 26 11:55:03 CEST 2001
Hello!
If we have the following function (IDL):
module M {
interface I {
void foo(out long MyLong);
};
};
To invoke the function on the client-side you write:
{ok, MyLong} = 'M_I':foo(ObjectRef),
The server should be implemented using:
-module('M_I_impl').
foo(State) ->
MyLong = ....,
{reply, {ok, MyLong}, State}.
The above assumes that no extra IC-options have been used (see
Module_Interface in the reference manual).
The above is also descibed in section 6.7 Invocations of Operations
(User's Guide).
Just remember that you must return the atom 'ok' for void functions.
/Nick
> I was looking in the orber documentation for a description of how I
> should return values when they have been defined in idl as
> out-parameters. I have an idl-spec where all methods are void, and
> return the results in out-parameters. The documentation does mention how
> such a method could be called with an inout parameter, but there is no
> example of the server side, where the method is implemented.
> Does anyone have experience or examples of using out-parameters?
> If this is supported but not in the documentation, perhaps it should be added...
> Any tips would be appreciated!
> I have tried a naive approach, just returning what should be an
> out-parameter, but then my java client gets an exception...
More information about the erlang-questions
mailing list