public class Client {
    public static void main(String args[]) {
        int status = 0;
        Ice.Communicator ic = null;
        try {
            ic = Ice.Util.initialize(args);
            Ice.ObjectPrx base = ic.stringToProxy("SimplePrinter:default -p 10000");
            Demo.PrinterPrx printer = Demo.PrinterPrxHelper.checkedCast(base);
            if (printer == null) throw new Error("Invalid proxy");
            printer.printString("Hello World!");
        } catch (Ice.LocalException e) {
            e.printStackTrace();
            status = 1;
        } catch (Exception e) {
            System.err.println(e.getMessage());
            status = 1;
        }
        if (ic != null) {
            // Clean up
            try {
                ic.destroy();
            } catch (Exception e) {
                System.err.println(e.getMessage());
                status = 1;
            }
        }
        System.exit(status);
    }
}

@@ -233,22 +233,16 @@
 xy(%22
-SimplePrinter:
+Portal: 
 defa
@@ -279,38 +279,286 @@
 mo.P
-rinterPrx printer = Demo.Print
+ortalPrx portal = Demo.PortalPrxHelper.checkedCast(base);%0A            if (portal == null) throw new Error(%22Invalid proxy%22);%0A            portal.print(%22Hello Portal!%22);%0A%0A            base = ic.stringToProxy(%22Server: default -p 10001%22);%0A            Demo.ServerPrx server = Demo.Serv
 erPr
@@ -600,21 +600,20 @@
     if (
-print
+serv
 er == nu
@@ -666,21 +666,20 @@
     
-print
+serv
 er.print
 Stri
@@ -678,22 +678,16 @@
 rint
-String
 (%22Hello 
 Worl
@@ -686,13 +686,14 @@
 llo 
-World
+Server
 !%22);
@@ -897,32 +897,32 @@
  = 1;%0A        %7D%0A
+
         if (ic !
@@ -935,32 +935,8 @@
 ) %7B%0A
-            // Clean up%0A
     

Connect with portal and server