public static void main(String... args) {
        try {
            String host = "10.0.0.19",
                    scanType = "Full and fast";
            
            Client omp = new Client("admin", "password");
            
            System.out.println("===  Get ConfigID for Full and Fast ===================================".substring(0, 65));
            GetConfigsResponse cr = omp.getConfigs();
            String configID = cr.getConfigIDsByName().get(scanType);
            
            System.out.println("===  Get targets ======================================================".substring(0, 65));
            GetTargetsResponse tr = omp.getTargets();
            String targetID = tr.getTargetIDsByHost().get(host);
            
            if (targetID == null) {
                System.out.println("===  Create Target ================================================".substring(0, 65));
                CreateTargetResponse ctr = omp.createTarget(host, host);
                targetID = ctr.getTargetID();
            }
            
            System.out.println("===  Create Task ======================================================".substring(0, 65));
            CreateTaskResponse ctkr = omp.createTask("Task for " + host, "", configID, targetID);
            String taskID = ctkr.getTaskID();
            
            System.out.println("===  Start task ======================================================".substring(0, 65));
            StartTaskResponse str = omp.startTask(taskID);
            String reportID = str.getReportID();
            
            System.out.println("===  Check Report Status ======================================================".substring(0, 65));
            String reportStatus = null;
            while (reportStatus == null || !reportStatus.equalsIgnoreCase("Done")) {
                // sleep for 1 second
                try {
                    Thread.sleep(1000);
                } catch(InterruptedException ex) {
                    Thread.currentThread().interrupt();
                }
                
                System.out.print("** checking status: ");
                
                // check for status change
                GetTasksResponse gtr = omp.getTasks(taskID);
                reportStatus = gtr.getTaskStatuses().get(taskID);
                
                System.out.println(reportStatus);
            }
            
            System.out.println("===  Get Report Formats ======================================================".substring(0, 65));
            GetReportFormatsResponse reportFormats = omp.getReportFormats();
            String reportFormatID = reportFormats.getReportFormatIDsByName().get("XML");
            
            
            System.out.println("===  Get Report ======================================================".substring(0, 65));
            GetReportsResponse reports = omp.getReports(reportID, reportFormatID);
            String report = reports.toXML();
            
            System.out.println("===  Print Report ======================================================".substring(0, 65));
            System.out.println(report);
            
            
        } catch (IOException ex) {
            System.out.println("Encountered an IOException:");
            System.out.println(ex);
        } catch (InterruptedException ex) {
            System.out.println("Encountered an InterruptedException:");
            System.out.println(ex);
        } catch (ParsingException ex) {
            Logger.getLogger(Client.class.getName()).log(Level.SEVERE, null, ex);
        }
    }