Mapping Clients  «Prev 

Operations Interface Mapping using Corba and Java

1) Simple Mapping Example - Weather Service
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);
}

2) Public interface WeatherService Operations
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);
}

3) Any interface operations or attributes are mapped to Java methods.
// 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.