int days = Integer.parseInt(bookinginfo[4]);
String customername = bookinginfo[5];
String customersurname = bookinginfo[6];
GregorianCalendar startdate = CalendarUtils.GetGregorianCalendarFromSms(date);
GregorianCalendar finishdate = CalendarUtils.GetCalendarDaysAfter(startdate,days);
User user = null;
try {
user = userManager.getUser(username, password);
Booking booking = new Booking();
booking.setBeginDate(startdate);
booking.setFinishDate(finishdate);
Structure structure = (Structure) structureManager.get(user.getStructureId());
booking.setStructure(structure);
Room roomToBook = roomManager.getRoomFromRoomNumber(user.getStructureId(), room);
booking.setRoom(roomToBook);
Customer customer = new Customer();
customer.setName(customername);
customer.setSurname(customersurname);
customer.setStructure(structure);