public static void main(String[] args) throws DatatypeConfigurationException, ParseException {
		
		CreateBondSample createBondSample = new CreateBondSample();
				
		// Login to the system
		System.out.println("Login to smartmuni");
		createBondSample.login(args[0], args[1], args[2]);
		
		// Create the bond
		System.out.println("Create the bond");
		Bond bond = createBondSample.createBond();

		// Continue if the bond was successfully created
		if (bond != null) {
			
			// Create the bond debt schedule
			System.out.println("Create the bond debt schedule");
			List<SaveResult> bondDebtScheduleSaveResults = createBondSample.createBondDebtSchedule(bond);

			// Continue of the bond debt schedule items were successfully added
			boolean success = true;
			for (int index = 0; index < bondDebtScheduleSaveResults.size(); index++) {
				if (!bondDebtScheduleSaveResults.get(index).isSuccess()) {
					success = false;
				}
			}

			// Continue if the debt schedule was added (checking just the first one here, but you might check them all)
			if (success) {
				
				// Retrieve the parcel if it already exists in the system
				System.out.println("Retrieve the parcel");
				Parcel parcel = createBondSample.getExistingParcel();
				
				if (parcel == null) {
					System.out.println("Create the parcel");
					createBondSample.createParcel();
				}
				
				// Continue if the parcel was successfully added or retrieve
				if (parcel != null) {
					
					// Create the lien
					System.out.println("Create the lien");
					Lien lien = createBondSample.createLien(bond, parcel);
					
					// Continue if the lien was successfully created
					if (lien != null) {
			
						// Create the lien debt schedule
						System.out.println("Create the lien debt schedule");
						List<SaveResult> lienDebtScheduleSaveResults = createBondSample.createLienDebtSchedule(lien);
						
						// Continue of the lien debt schedule items were successfully added
						success = true;
						for (int index = 0; index < lienDebtScheduleSaveResults.size(); index++) {
							if (!lienDebtScheduleSaveResults.get(index).isSuccess()) {
								success = false;
							}
						}
					}
				}
			}
		}
		
		// Logout of the system
		createBondSample.logout();
		
	}