The server offers two function which each have an wrapper class for System.DateTime as parameter and returns the same value.
java.sql.Date <---> System.DateTime
java.sql.Time <---> System.DateTime
public class GreetingsImpl extends PortableRemoteObject implements Greetings
{
public java.sql.Date syncDate( java.sql.Date a_oDate)
{
...
return a_oDate;
}
public java.sql.Time syncTime( java.sql.Time a_oTime)
{
...
return a_oTime;
}
}
|
Ics.java.sql.Date oMyDate = new Ics.java.sql.DateImpl(); oMyDate.DateTime = DateTime.Now; oMyDate = oGreetings.syncDate( oMyDate); ... Ics.java.sql.Time oMyTime = new Ics.java.sql.TimeImpl(); oMyTime.DateTime = oDateTime; oMyTime = oGreetings.syncTime(oMyTime); |
> start orbd -ORBInitialPort 10050
|
(could also use startNameService.bat located in the DemoJava directory to quick start the name service)
b.) Start the java server by using JNDI CosNaming and work with a name service running on 'localhost' at port '10050':
> start java -cp .;Server.jar -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory -Djava.naming.provider.url=iiop://localhost:10050 Server
|
(could also use buildServer.bat and startServer.bat located in the JavaServer directory to quick build and run the Java Server)
c.) Start the .NET Client.