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?
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:
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 …
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…