We're using the Enterprise web service to access SalesForce. We built our enterprise.jar this way:
java -classpath ./force-wsc-33.0.3.jar;./ST-4.0.8.jar;D:/apps/jdk7u25/lib/tools.jar com.sforce.ws.tools.wsdlc U:\Projects\RemedyForce\prod_enterprise.wsdl enterprise.jar
I see from this post SOSL returning maximum of 500 records that there was a problem with WSC version 23.0. But we're using the newer 33.0 version.
We set up our configuration and Enterprise Connection this way:
// setup Web Service connection
ConnectorConfig config = new ConnectorConfig();
config.setUsername(USERNAME);
config.setPassword(PASSWORD);
connection = Connector.newConnection(config);
And then we call the service with our SOQL query string.
QueryResult queryResults = connection.query(soqlString);
queryResults.getSize()
will often return a number larger than 500, but the actual list inside the object is always limited to 500. Is there a way to either increase that limit or to page through the additional results?