Retrieving/including Session IDs

Hi everyone,

I am trying to access various trademark databases via a to-be-developed plugin, and some of those seem to require a mandatory session id.

The session ID is included the search form’s action parameter, and valid for about an hour. Without a valid session ID, no go – all you get is “Session expired”.

So I guess I’d have to first get the actual search form, extract the session id, and then build this session id into the URL called by the DevonAgent plugin.

Can anyone offer me some advice how to go about this? Is this doable at all? Or am I missing the canonical way for dealing with the issue?

Cheers,
i

Would it work to simply hardcode an existing session id into the URL?

Unfortunately not, because they expire after an hour.

I could, of course, rewrite the plugin on an hourly basis :wink: But that would kinda defeat the purpose of DevonAgent, I figure …

Cheers,
I

well, it’s probably complicated, but you could probably write an AppleScript to handle the session ID changes. have it launch a http request to your site, parse the sess ID out of the result, then use this:

latenightsw.com/freeware/PLi … index.html

to modify your plugin .plist. then you can have AppleScript launch DEVONagent and run your search…

hi boneskull,

thanks for the idea. for a bigger/more important problem, this would certainly be an option to consider.

however, i figure it takes more time to write all this code up, get it running reliably, and maintain it, than it will take to perform the few searches by hand. also, external dependencies tend to fail me …

cheers
i

yes, this method is likely more trouble than its worth unless it’s something critical.

might be a nice idea for DT to open up the DA Cocoa Plugin API eventually, or expand the AppleScript-ability of DA to allow complex interactions with the search functionality… :slight_smile: