1 package test.interop.bug360; 2 3 import java.io.*; 4 import org.omg.CORBA.Any ; 5 import org.omg.PortableServer.*; 6 import org.omg.CosNaming.*; 7 import org.omg.CORBA.OctetSeqHelper ; 8 import org.omg.CORBA.StringSeqHelper ; 9 10 public class Client 11 { 12 public static onewayPushConsumer consumer = null; 13 private static int counter; 14 15 16 public static void main( String [] args ) 17 { 18 try 19 { 20 org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,null); 21 22 NamingContextExt nc = 24 NamingContextExtHelper.narrow( orb.resolve_initial_references("NameService")); 25 26 consumer = 27 onewayPushConsumerHelper.narrow( nc.resolve(nc.to_name("bug360.service"))); 28 29 Any a = org.omg.CORBA.ORB.init().create_any(); 31 32 Struct3 s3 = 33 new Struct3( Enum5xxxxxxxx.E5Exxx , 34 (float)0.0, (float)1.1, 35 Enum6xxxxxxxxxxxxxxxxx.E6Cxxxxxxxxxxxxx 36 ); 37 Struct2 s2 = 38 new Struct2( Enum1.E1B, 39 1, 40 (float)1.1, 41 Enum2xxxxxxxxxxxx.E2Bxxxxxxxx, 42 (float)2.2, 43 (float)2.2, 44 Enum2xxxxxxxxxxxx.E2Bxxxxxxxx, 45 Enum3xxxxxxxxxxxxxxxx.E3Cxxxxxxxxxxx, 46 (float)3.3, 47 Enum4xxxxxxxxxxxxx.E4Dxxxxxxxx , 48 s3 49 ); 50 51 Struct1Helper.insert( a, new Struct1( 1, s2 ) ); 52 53 consumer.synchronousPush( a ) ; 54 55 } 56 catch ( Exception e) 57 { 58 e.printStackTrace(); 59 } 60 } 61 } 62 63 64 | Popular Tags |