public static void main(String[] args) {
    CycSOAPService cycSOAPService = new CycSOAPService();
    
    try {
      CycList query = new CycList();
      query.add(CycObjectFactory.makeCycSymbol("+"));
      query.add(new Integer(1));
      query.add(new Integer(1));
      Log.current.println("binary query=" + query.toString());
      String hostname = "localhost";
      String port = "3600";
      Base64 base64 = new Base64();
      String base64Query = base64.encodeCycObject(query, 0);
      String base64Response =
      cycSOAPService.binarySubLInteractorAtHostPort(base64Query, hostname, port);
      Object cycObject = base64.decodeCycObject(base64Response, 0);
      Log.current.println("result=" + cycObject);
      CycList query4 = new CycList();
      query4.add(CycObjectFactory.quote);
      CycList cycList2 = new CycList();
      query4.add(cycList2);
      cycList2.add(CycObjectFactory.makeCycSymbol("A"));
      cycList2.setDottedElement(CycObjectFactory.makeCycSymbol(
                                    "B"));
      base64Query = base64.encodeCycObject(query4, 0);
      base64Response = cycSOAPService.binarySubLInteractorAtHostPort(base64Query, hostname, port);
      Log.current.println("(A . B)=" + base64.decodeCycObject(base64Response, 0));
      
      query = new CycList();
      query.add(CycObjectFactory.makeCycSymbol("an-error"));
      base64Query = base64.encodeCycObject(query, 0);
      base64Response =
      cycSOAPService.binarySubLInteractorAtHostPort(base64Query, hostname, port);
      Log.current.println("error=" + base64.decodeCycObject(base64Response, 0));
    }
    catch (IOException e) {
      Log.current.println(e.getMessage());
      Log.current.printStackTrace(e);
      System.exit(1);
    }
        
    // End all threads
    System.exit(0);
  }