function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Curtis ParisCurtis Paris 

getUpdated/getDeleted Date Ranges over 30 Days w/Apache Axis

I was experiencing an odd failure today that drove me crazy for about an hour.  The error message I was getting back was not in line with the actual behavior.

I was sending a getUpdated() and getDeleted() for "Contact" that was over 30 days old.  Since this is not documented that there is a limitation, I was getting back the following exception message:

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: java.lang.IllegalStateException
 faultActor: 
 faultNode: 
 faultDetail: 
 {http://xml.apache.org/axis/}stackTrace: java.lang.IllegalStateException

While I'm use to seeing the exceptions, this wasn't being returned as a normal SOAP message.  Possibly a bug in Axis.  But, looking at the HTTP Response, I noticed that it was coming back as an HTTP 500 Result.  Is this what's causing the issue and not giving back the correct exception?

 

POST /services/Soap/c/3.0 HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.1
Host: na1-api.salesforce.com
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 1006





25


2b4PAnqmlEHaBb3Emud3ANiadvr8JBCwJaUfVNCdGEL7jlN7963X_Y2ZjzJ5k94fWSpw2lom2G3UoQSUdfxOTPbtzKggVlhL




Contact
2002-04-01T08:00:00.000Z
2004-05-11T21:47:37.359Z


HTTP/1.0 500 Internal Server Error
Server: sfdc
Server: sfdc
Content-Type: text/xml; charset=utf-8
Date: Tue, 11 May 2004 21:47:47 GMT





soapenv:Server
INVALID_REPLICATION_DATE: startDate cannot be more than 30 days ago


INVALID_REPLICATION_DATE
startDate cannot be more than 30 days ago




 

adamgadamg
SOAP faults should be status code 500; not sure why the error isn't being serialized correctly - let me see if I can find out.. (it is possible its an issue with how you are printing your exception..)
NickNick

I don't see the 30-day limitation documented anywhere. It seems unreasonable.

Limiting the range between the start and end seems ok to protect against runaway queries, but there's no reason to limit how far back in time we go.

The usefulness of these calls has just gone from a 10 to a 2.