// resolve the Object Reference in Naming
String rname = "DomainParticipantFactory";
byte tab[ ] = new byte [1];
tab[0] = 1 ;
org.omg.dds.UserDataQosPolicy UDQP = new UserDataQosPolicy(tab);
DomainParticipantQos DPQOS = new DomainParticipantQos(UDQP,new EntityFactoryQosPolicy()) ;
domainparticipantFactory = DomainParticipantFactoryHelper.narrow(ncRef.resolve_str(rname));
TopicQos tq = new TopicQos(new TopicDataQosPolicy(tab),new DurabilityQosPolicy( DurabilityQosPolicyKind.from_int(0),new Duration_t(0,0)),new DeadlineQosPolicy(new Duration_t(0,0)),new org.omg.dds.LatencyBudgetQosPolicy(new Duration_t(0,0)),new org.omg.dds.LivelinessQosPolicy (LivelinessQosPolicyKind.from_int(0),new Duration_t(0,0)),new org.omg.dds.ReliabilityQosPolicy(ReliabilityQosPolicyKind.from_int(0),new Duration_t(0,0)),new org.omg.dds.DestinationOrderQosPolicy(DestinationOrderQosPolicyKind.from_int(0)),new org.omg.dds.HistoryQosPolicy(org.omg.dds.HistoryQosPolicyKind.from_int(0),0),new org.omg.dds.ResourceLimitsQosPolicy(0,0,0),new org.omg.dds.TransportPriorityQosPolicy(0),new org.omg.dds.LifespanQosPolicy (new Duration_t(0,0)),new org.omg.dds.OwnershipQosPolicy(org.omg.dds.OwnershipQosPolicyKind.from_int(0)));
domainparticipant = domainparticipantFactory.create_participant(0,DPQOS,null);
topic = domainparticipant.create_topic("foo","demo.dds.dcps.foosample.Foo",tq ,null);
String st [] = new String [1];