Thursday, May 16, 2019

Web Services Error: SESSION_TIMED_OUT

Problem: User encounters the error SESSION_TIMED_OUT in his requests after a successful 'login' request. SOAP response below:

Solution 1:
If the user explicitly logs out of a session, and then attempt to utilize the same session, the SESSION_TIMED_OUT error message is returned. The user needs to resend a login request to create a new session.

Solution 2:
Web services sessions automatically time out after 20 minutes of inactivity, requiring a login to resume activity. Thus, the user needs to resend a login request to create a new session.

Solution 3:
If once verified that the active session is being utilized, the error might be caused by the incorrect WSDL endpoint that the user's application points to. Currently, NetSuite has two data centers, which can be distinguished by the "na1" appended on the URL, i.e., webservices.netsuite.com or webservices.na1.netsuite.com.

To explain further:
1. User sends 'login' request to webservices.netsuite.com
2. Successful response is received.
3. User sends a 'get' request to the same endpoint.
4. Receives a SESSION_TIMED_OUT error because his/her account is located in Data Center 02.

To avoid the error from occuring, user could perform a "getDataCenterUrls" operation to dynamically get the correct WSD endpoint, which is further explained in SuiteAnswers article 24491.

No comments:

Post a Comment