5 import org
.omg
.CORBA
.*;
6 import org
.omg
.PortableServer
.*;
12 * Java implemention of the interoperability tests for wchars.
14 * @author Phil Mesnier
20 public static void main(String
[] args
)
22 String iorfile
= "IOR";
23 boolean verbose
= false;
24 for (int i
= 0; i
< args
.length
; i
++)
26 if (args
[i
].equals ("-o"))
28 else if (args
[i
].equals ("-v"))
32 System
.out
.println( "Usage: jaco interop.wchar.Server " +
42 ORB orb
= ORB
.init( args
, null );
46 POAHelper
.narrow( orb
.resolve_initial_references( "RootPOA" ));
48 poa
.the_POAManager().activate();
50 // create a GoodDay object
51 WChar_PasserImpl servant
= new WChar_PasserImpl(orb
, verbose
);
53 // create the object reference
54 org
.omg
.CORBA
.Object obj
=
55 poa
.servant_to_reference( servant
);
58 new PrintWriter( new FileWriter( iorfile
));
60 // print stringified object reference to file
61 pw
.println( orb
.object_to_string( obj
));
71 System
.out
.println( e
);