OOPortal OOPortal


Mapping Clients  «Prev 

Operations Interface Mapping using Corba and Java

We start with an IDL interface and the resulting Java operations interface.
//weather.idl
//Simple mapping example - Weather Service 
module weather{
  interface WeatherService{
    string getReport(in string city);
  };
};
// 2
package weather;
public interface WeatherServiceOperations{
  public java.lang.String getReport(java.lang.String city);
}

The operation interface name is the IDL interface name and "Operations."
// 1) weather.idl
interface WeatherService
// 2) package 
package weather;
public interface WeatherServiceOperations{
  public java.lang.String getReport(java.lang.String city);
}

// 1) weather.idl
string getReport(in string city);
// 2) package weather;
public interface WeatherServiceOperations{
 public java.lang.String getReport(java.lang.String city);
}

Any interface operations or attributes are mapped to Java methods.