The server exports a function which has an array of strings (with 2 dimensions) as parameter and as return value.
java.lang.String[][] <---> System.String[][]
public class GreetingsImpl extends PortableRemoteObject implements Greetings
{
public String[][] hello( String[][] names) throws RemoteException
{
...
return names;
}
}
|
String[][] oNames = new String[2][]; ... string[][] oRet = oGreetings.hello( oNames); ... |
> 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.