IIOP Connect is a proxy server implemented by Ilu and Python. It accepts the IIOP request from Java ORB. At the server side, just run the proxy by typing:
% IluProxyServer.py
If you are thinkng of using the IluProxy from Java Applets, you also have to run the GateKeeper provided by Visigenic VisiBroker at the server side. To do so, just type:
% java pomoco.iiop.GateKeeper
You can find the pomoco.iiop.GateKeeper.class file on ~akamatsu/vbroker/solaris/classes.
The primitive data type is mappeed as follows:
Java to Python (method arguments) |
Python To Java (method return value) |
||||||||||||||||||||||||||||||
|
|
There are special data types that IluProxy supports. They are IluProxy.IluObject and Struct.
The any Ilu objects returned by the method call to IluProxy will be transformed to IluProxy.IluObject. You can treat this object data type as a normal object reference to the Ilu object.
Struct is another form of the representation of Ilu data type. For instance, if you have a data type declared in your isl file such as:
INTERFACE UPAI
TYPE Amount = RECORD
Number : REAL,
Units : String
END;
You can create this structure in the Java side by using the Any interface:
IluProxy.Any any = new IluProxy.Any();
any.from_struct("UPAI.Amount(200, 'USD')");
You can pass any simple data type that python accepts exactly the same way as above.
e.g.
any.from_struct("{'key': 'value', 'key2', [value1, value2]}");
Any data type that you would like to pass to the Ilu Object can be expressed using the Any methods, from_struct and to_struct. If the return value of the method call to the Ilu object is in the form of Any::Struct, it will be extracted to string using the built-in repr() method on Python.
A description of the interface definition that IluProxy provides is available on here.
The IDL file of IluProxy is available here.
An example code is available on here. If you are unfamiliar to the CORBA specification, please refer to the CORBA documentation for complete information about ORB, NVList, Request classes.