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
ddatbig2ddatbig2 

session time out and IOException with 500 error code

I need to find out when the session expires. I expect a better response to my API calls when I reach time out for the session id that I include in the SOAP XML.

Currently I am getting IOException with 500 error code. this is the same error I get when my SOAP xml is malformed.  Please advise how can I get a distinct response for session time out.

java.io.IOException: Server returned HTTP response code: 500 for URL: https://na1-api.salesforce.com/services/Soap/u/4.0

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:800)

at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(DashoA12275)

 

SuperfellSuperfell
As per the SOAP spec, all SOAP Faults are returned with a HTTP 500 status code. Your HTTP/SOAP client needs to be able to parse the SOAP envelope that's returned with that 500 status code.