Use the VimPort object again to close the connection. Always close your server connections to maintain security.

         vimPort.logout(serviceContent.getSessionManager());
      } catch (Exception e) {
         System.out.println(" Connect Failed ");
         e.printStackTrace();
      }
   }//end main()
}// end class TestClient