Package org.libreplan.importers.tim

Examples of org.libreplan.importers.tim.RosterResponseDTO


    @Ignore("Only working if you have a Tim server configured")
    public void testImportRostersFromFile() {
        String filename = System.getProperty("user.dir")
                + "/../scripts/tim_test/rosterResponse.xml";
        File file = new File(filename);
        RosterResponseDTO rosterResponseDTO = TimSoapClient
                .unmarshalRosterFromFile(file);
        if (rosterResponseDTO == null) {
            fail("Roster Response is null");
        }
        assertTrue(rosterResponseDTO.getRosters().size() > 0);
    }
View Full Code Here


    }

    @Test
    @Ignore("Only working if you have a Tim server configured")
    public void testImportRostersFromServer() {
        RosterResponseDTO rosterResponseDTO = TimSoapClient
                .sendRequestReceiveResponse(properties.getProperty("url"),
                        properties.getProperty("username"),
                        properties.getProperty("password"),
                        createtRosterRequest(), RosterResponseDTO.class);
        if (rosterResponseDTO == null) {
            fail("Roster Response is null");
        }
        assertTrue(rosterResponseDTO.getRosters().size() > 0);
    }
View Full Code Here

        try {
            JAXBContext jaxbContext = JAXBContext
                    .newInstance(RosterResponseDTO.class);

            Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
            RosterResponseDTO exportResponseDTO = (RosterResponseDTO) unmarshaller
                    .unmarshal(file);
            return exportResponseDTO;
        } catch (JAXBException e) {
            LOG.error("Error processing response: ", e);
        }
View Full Code Here

            synchronizationInfo = new SynchronizationInfo(_(
                    "Import roster for department {0}", department));

            RosterRequestDTO rosterRequestDTO = createRosterRequest(department,
                    nrDaysRosterFromTim);
            RosterResponseDTO rosterResponseDTO = TimSoapClient
                    .sendRequestReceiveResponse(url, userName, password,
                            rosterRequestDTO, RosterResponseDTO.class);

            if (rosterResponseDTO != null) {
                updateWorkersCalendarException(rosterResponseDTO,
View Full Code Here

TOP

Related Classes of org.libreplan.importers.tim.RosterResponseDTO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.