OOPortal OOPortal


Mapping Clients  «Prev 

Constructing Sample Corba Client

Initialize the ORB
package weather;
import jacorb.naming.NameServer;
import org.omg.CosNaming.*;
public class SimpleWeatherClient{
  public static void main(String args[]){
    try{
      WeatherServic wServcie;
      org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.int(args, null);
      org.omg.CORBA.Ojbect wRef = (Module 5)//Lookup reference

Obtain an object reference to the remote object

Corba Programming C++
Narrow the generic reference to the interface-specific type reference

Use the interface type reference (invoke methods)