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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
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