Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Please note that on Saturday, April 18, 2026, at 8:00 PM Pacific Time, our Case Management System will undergo a scheduled maintenance for approximately 15 minutes. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
Invalid Session Fault with Token Based Authentication
Should I be receiving an Invalid Session Fault with a message that says "Your connection has time out. Please log in again." when using token based authentication. My webservices were running fine until suddenly the Invalid Session Fault was thrown even though 2 seconds earlier a webservice call was successful.
My only thought is we are calling this immediately before we set the token in the header. Could it be causing a problem?
// setup the headers to ignore read only fields NetSuiteBindingStub stub = (NetSuiteBindingStub) port; stub.clearHeaders(); SOAPHeaderElement prefHeader = new SOAPHeaderElement("urn:messages.platform.webservices.netsuite.com", "Preferences"); Preferences prefs = new Preferences(); prefs.setIgnoreReadOnlyFields(new Boolean(true)); prefHeader.setObjectValue(prefs); stub.setHeader(prefHeader); 0