class ExcludeDaysXmlAdapter extends XmlAdapter<ClientExcludeDaysWrapper, ArrayList<Calendar>> {

    @Override
    public ClientExcludeDaysWrapper marshal(ArrayList<Calendar> v) throws Exception {
        ClientExcludeDaysWrapper result = null;
        if(v != null && !v.isEmpty()){
            List<String> dayStrings = new ArrayList<String>();
            for (Calendar currentCalendar : v){
                dayStrings.add(format.format(currentCalendar.getTime()));
            }
            result = new ClientExcludeDaysWrapper(dayStrings);
        }
        return result;
    }

}