class StructClient {
public static void main(String args[]) {
try {
Struct.MyStruct struct = new Struct.MyStruct((short)50, new String("Frodo"));
System.out.println("Initializing the ORB");
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args, null);
System.out.println("Binding to StructExample Object");
Struct.StructExample s = Struct.StructExampleHelper.bind(orb, "My Struct");
System.out.println("Pass struct to s");
s.s(struct);
System.out.println("s.s() = " + s.s());
}
catch(org.omg.CORBA.SystemException e) {
System.err.println("System Exception");
System.err.println(e);
}
}
}
Die Quelle:
StructClient.java