public static void main(final String[] args) {
    Log.makeLog("SOAPBinaryCycConnection.log");
    try {
      SOAPBinaryCycConnection soapBinaryCycConnection = new SOAPBinaryCycConnection();
      soapBinaryCycConnection.setTrace(soapBinaryCycConnection.API_TRACE_MESSAGES);
      Base64 base64 = new Base64();
      Log.current.println("Trying helloWorld");
      soapBinaryCycConnection.helloWorld();
      final 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 base64Query = base64.encodeCycObject(query, soapBinaryCycConnection.trace);
      final String hostname = "localhost";
      final String port = "3600";
      String base64Response =
              soapBinaryCycConnection.remoteBinarySubLInteractorAtHostPort(base64Query, hostname, port);
      Object cycObject = base64.decodeCycObject(base64Response, soapBinaryCycConnection.trace);
      Log.current.println("result=" + cycObject);

      query.add(new Integer(1));
      Log.current.println("binary query=" + query.toString());
      base64Query = base64.encodeCycObject(query, soapBinaryCycConnection.trace);
      base64Response =
              soapBinaryCycConnection.remoteBinarySubLInteractorAtHostPort(base64Query, hostname, port);
      cycObject = base64.decodeCycObject(base64Response, soapBinaryCycConnection.trace);
      Log.current.println("result=" + cycObject);

      final CycList errorQuery = new CycList();
      errorQuery.add(CycObjectFactory.makeCycSymbol("an-error"));
      base64Query = base64.encodeCycObject(errorQuery, soapBinaryCycConnection.trace);
      base64Response =
              soapBinaryCycConnection.remoteBinarySubLInteractorAtHostPort(base64Query, hostname, port);
      Log.current.println("error=" + base64.decodeCycObject(base64Response, soapBinaryCycConnection.trace));

      final CycAccess cycAccess = new CycAccess(new URL("http://localhost:8080/axis/services/CycSOAPService"), "localhost", 3600);
      cycAccess.traceOn();
      Log.current.println("CycAccess created");
      soapBinaryCycConnection = (SOAPBinaryCycConnection) cycAccess.getCycConnection();
      Log.current.println("Trying helloWorld");
      soapBinaryCycConnection.helloWorld();
      Log.current.println("cycAccess result=" + cycAccess.converseObject(query));
      Object[] response = soapBinaryCycConnection.converse(query);
      Log.current.println("response[0]=" + response[0].toString());
      Log.current.println("response[1]=" + response[1].toString());
      CycList request = new CycList();
      request.add(CycObjectFactory.makeCycSymbol("list"));
      request.add(":none");
      request.add(CycObjectFactory.makeCycSymbol(":none"));
      Log.current.println("cycAccess request=" + request.toString());
      Log.current.println("cycAccess result=" + cycAccess.converseObject(request));
      request = new CycList();
      request.add(CycObjectFactory.makeCycSymbol("find-constant"));
      request.add("Brazil");
      Log.current.println("cycAccess request=" + request.toString());
      Log.current.println("cycAccess result=" + cycAccess.converseObject(request));
    } catch (Exception e) {
      Log.current.errorPrintln(e.getMessage());
      Log.current.printStackTrace(e);
    }
  }