Examples of SyncFolderItemsType


Examples of com.microsoft.schemas.exchange.services.x2006.messages.SyncFolderItemsType

    {
        MockHttpUrlConnectionFactory factory = new MockHttpUrlConnectionFactory();
        factory.forRequest(URL, soap(SYNC_FOLDER_ITEMS_REQUEST).getBytes("UTF-8"))
               .respondWith(HttpURLConnection.HTTP_OK, soap(SYNC_FOLDER_ITEMS_RESPONSE).getBytes("UTF-8"));

        SyncFolderItemsType
                syncRequest = SyncFolderItemsDocument.Factory.parse(SYNC_FOLDER_ITEMS_REQUEST).getSyncFolderItems();

        ExchangeService service = new ExchangeService(URL, factory);
        SyncFolderItemsResponseType response = service.syncFolderItems(syncRequest, "bkerr");
View Full Code Here

Examples of com.microsoft.schemas.exchange.services.x2006.messages.SyncFolderItemsType

        stub(conn.getResponseCode()).toThrow(new IOException("Cannot read code."));
        when(factory.newInstance(URL, soap(SYNC_FOLDER_ITEMS_REQUEST).getBytes("UTF-8")))
            .thenReturn(conn);

        ExchangeService service = new ExchangeService(URL, factory);
        SyncFolderItemsType
                request = SyncFolderItemsDocument.Factory.parse(SYNC_FOLDER_ITEMS_REQUEST).getSyncFolderItems();

        try
        {
            service.syncFolderItems(request, "bkerr");
View Full Code Here

Examples of com.microsoft.schemas.exchange.services.x2006.messages.SyncFolderItemsType

        HttpURLConnection conn = mock(HttpURLConnection.class);
        stub(conn.getInputStream()).toThrow(new IOException("Cannot read code."));
        when(factory.newInstance(URL, soap(SYNC_FOLDER_ITEMS_REQUEST).getBytes("UTF-8"))).thenReturn(conn);

        ExchangeService service = new ExchangeService(URL, factory);
        SyncFolderItemsType
                request = SyncFolderItemsDocument.Factory.parse(SYNC_FOLDER_ITEMS_REQUEST).getSyncFolderItems();

        try
        {
            service.syncFolderItems(request, "bkerr");
View Full Code Here

Examples of com.microsoft.schemas.exchange.services.x2006.messages.SyncFolderItemsType

        when(conn.getResponseCode()).thenReturn(HttpURLConnection.HTTP_OK);
        when(conn.getInputStream()).thenReturn(new ByteArrayInputStream(new byte[] {}));
        when(factory.newInstance(URL, soap(SYNC_FOLDER_ITEMS_REQUEST).getBytes("UTF-8"))).thenReturn(conn);

        ExchangeService service = new ExchangeService(URL, factory);
        SyncFolderItemsType
                request = SyncFolderItemsDocument.Factory.parse(SYNC_FOLDER_ITEMS_REQUEST).getSyncFolderItems();

        try
        {
            service.syncFolderItems(request, "bkerr");
View Full Code Here

Examples of com.microsoft.schemas.exchange.services.x2006.messages.SyncFolderItemsType

        when(conn.getResponseCode()).thenReturn(HttpURLConnection.HTTP_OK);
        when(conn.getInputStream()).thenReturn(response);
        when(factory.newInstance(URL, soap(SYNC_FOLDER_ITEMS_REQUEST).getBytes("UTF-8"))).thenReturn(conn);

        ExchangeService service = new ExchangeService(URL, factory);
        SyncFolderItemsType
                request = SyncFolderItemsDocument.Factory.parse(SYNC_FOLDER_ITEMS_REQUEST).getSyncFolderItems();

        try
        {
            service.syncFolderItems(request, "bkerr");
View Full Code Here

Examples of com.microsoft.schemas.exchange.services.x2006.messages.SyncFolderItemsType

        when(conn.getInputStream()).thenReturn(new ByteArrayInputStream(new byte[] {defaultBufValue, defaultBufValue,
                defaultBufValue }));
        when(factory.newInstance(URL, soap(SYNC_FOLDER_ITEMS_REQUEST).getBytes("UTF-8"))).thenReturn(conn);

        ExchangeService service = new ExchangeService(URL, factory);
        SyncFolderItemsType
                request = SyncFolderItemsDocument.Factory.parse(SYNC_FOLDER_ITEMS_REQUEST).getSyncFolderItems();

        try
        {
            service.syncFolderItems(request, "bkerr");
View Full Code Here

Examples of com.microsoft.schemas.exchange.services.x2006.messages.SyncFolderItemsType

                defaultBufValue }));
        when(conn.getHeaderField("Content-Type")).thenReturn(charset);
        when(factory.newInstance(URL, soap(SYNC_FOLDER_ITEMS_REQUEST).getBytes("UTF-8"))).thenReturn(conn);

        ExchangeService service = new ExchangeService(URL, factory);
        SyncFolderItemsType
                request = SyncFolderItemsDocument.Factory.parse(SYNC_FOLDER_ITEMS_REQUEST).getSyncFolderItems();

        try
        {
            service.syncFolderItems(request, "bkerr");
View Full Code Here

Examples of com.microsoft.schemas.exchange.services.x2006.messages.SyncFolderItemsType

     * @return The SyncFolderItemsType necessary to request new items from
     *         the given folder since the given sync state.
     */
    public static SyncFolderItemsType getSyncFolderItemsRequest(final Configuration config, final FolderContext folder)
    {
        SyncFolderItemsType syncFolderItems = SyncFolderItemsType.Factory.newInstance();
        syncFolderItems.addNewItemShape().setBaseShape(DefaultShapeNamesType.ID_ONLY);
        syncFolderItems.setSyncFolderId(folder.getTargetFolder());
        syncFolderItems.setSyncState(folder.getSyncStateToken());
        syncFolderItems.setMaxChangesReturned(Math.min(MAX_SYNC_COUNT, config.getIdPageSize()));
        return syncFolderItems;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.