Session Timeout after REST Call

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Pomegranate
Posts: 30
Joined: Sun Jul 16, 2017 11:53 pm
Location: Mongolia, Ulaanbaatar

Session Timeout after REST Call

Post by Pomegranate »

Hi guys,

I've read up on the forums and haven't found a simple solution to this problem,

I'm using a custom javascript form builder script for front-end users to create their own form,

I render the form with javascript and after a user builds their form and clicks the save button, a JSON string is created and I pass that JSON string via REST to my database, and then when a user opens the created form, the JSON string is pulled via REST into the Javascript script to get rendered.

The problem is, whenever I run a REST call the session times out, is there a workaround to this problem?

Thanks a million in advance :).
Jaymer
Posts: 2030
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Session Timeout after REST Call

Post by Jaymer »

I tried to do this 2 years ago.
I wanted javascript inside a form's html cell to call my existing system and get a JSON response.
I got a timeout - the 2nd connection to Tomcat is re-issuing a new SESSIONID, thereby invalidating the 1st one.

He said the way I was doing it was incorrect - that I should be utilizing what amounted to 'undocumented insider knowledge' to query aware to get what i needed - but this was something i'd have to pay for. SO, since the JSON data was inside MS SQL, I made a simple node.js server and I call it from javascript. I still get the same JSON back and my script runs.

SO, easy way is to get something other than aware to give you the JSON.
More expensive way is to hire Vlad to teach you some internals.

here is my original thread and related thread here.

Jaymer...
Click Here to see a collection of my tips & hacks on this forum? Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Pomegranate
Posts: 30
Joined: Sun Jul 16, 2017 11:53 pm
Location: Mongolia, Ulaanbaatar

Re: Session Timeout after REST Call

Post by Pomegranate »

Thanks Jaymer, its good to hear from you.

I was afraid of setting up a third-party service for something like this, I'll give it a go I guess, thanks again for your help :).
UnionSystems
Posts: 187
Joined: Fri Jun 17, 2016 7:10 am
Location: Brisbane Australia
Contact:

Re: Session Timeout after REST Call

Post by UnionSystems »

We’ve continued to use what I describe at
viewtopic.php?f=1&t=10570&p=51512#p51512

Works perfectly for us.
AWS Linux, Windows Server, AIM 8.4 & 8.6
Jaymer
Posts: 2030
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Session Timeout after REST Call

Post by Jaymer »

Hey Dave
I see how that might work for me now, but the "extra" work of doing a node server was good learning for me.
There are pros and cons.
Its nice that my solution is outside of aware, and I can modify that JS code without having to republish. Of course I don't NEED to do this, but I've added other JSON routes (for other needs) and can do so without bothering online users.
But for those who'd want an all-aware solution yours fits the bill. I'll def. keep this in mind for the next issue.
Click Here to see a collection of my tips & hacks on this forum? Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply