Hi there. I am having trouble using the Cursor-Request to fetch the elements of a given address book. I send the following Cursor request upfront:

PHP Code:
String body = "" +
                "<?xml version=\"1.0\" ?>" +
                "<S:Envelope xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
                "<SOAP-ENV:Header>" +
                "<session xmlns=\"http://schemas.novell.com/2005/01/GroupWise/types\">" + session + "</session>" +
                "</SOAP-ENV:Header>" +
                "<S:Body>" +
                "<ns2:createCursorRequest xmlns=\"http://schemas.novell.com/2005/01/GroupWise/types\" xmlns:ns2=\"http://schemas.novell.com/2005/01/GroupWise/methods\" xmlns:ns3=\"http://schemas.novell.com/2005/01/GroupWise/events\">" +
                "<ns2:container>" + elementId + "</ns2:container>" +
                "<ns2:view></ns2:view>" +
                "</ns2:createCursorRequest>" +
                "</S:Body>" +
                "</S:Envelope>";
And retrieve the cursor value successfully.

I then send a readCursorRequest with a chunk size of 100 elements

PHP Code:
String body = "" +
                "<?xml version=\"1.0\" ?>" +
                "<S:Envelope xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\">" +
                "<SOAP-ENV:Header>" +
                "<session xmlns=\"http://schemas.novell.com/2005/01/GroupWise/types\">" + session + "</session>" +
                "</SOAP-ENV:Header>" +
                "<S:Body>" +
                "<ns2:readCursorRequest xmlns=\"http://schemas.novell.com/2005/01/GroupWise/types\" xmlns:ns2=\"http://schemas.novell.com/2005/01/GroupWise/methods\" xmlns:ns3=\"http://schemas.novell.com/2005/01/GroupWise/events\">" +
                "<ns2:container>" + cursor.getElementId() + "</ns2:container>" +
                "<ns2:cursor>" + cursor.getCursorValue() + "</ns2:cursor>" +
                "<ns2:forward>true</ns2:forward>" +
                "<ns2:position>current</ns2:position>" +
                "<ns2:count>" + chunkSize + "</ns2:count>" +
                "</ns2:readCursorRequest>" +
                "</S:Body>" +
                "</S:Envelope>";
I know the address book contains more than 800 contacts, yet I receive only 80. The suggested algorithm for fetching elements via CursorRequest thus fails.


PHP Code:
int chunkSize 100;
for (
int i chunkSize== chunkSizecontacts.size()) {...} 
So my question is: How to deal with this? If I bump the chunkSize to, say, 10.000, I fetch all 800 contacts at once, which is not desired. But at least I know that all 800 contacts are there and readable.