Woodbridge, Mark R wrote:
> Thanks Nicklas.
> I know this issue has come up on the mailing list a couple of times,
> but I'm not sure what the solution is. As I said, I'm linking
> directly to Experiments in BASE from my Flex application. I'm doing
> this by doing an HTTP POST to /login.jsp with a redirect to
> views/experiments/index.jsp?cmd=ViewItem&item_id=...&ID=...
> This works fine but there are a couple of problems. The first is that
> I call /login.jsp every time I link to an experiment. I'm using the
> same ID every time to avoid creating a new session. Is this the
> correct thing to do?

No you can't reuse the same ID. It has to be unique for per user 
session. Strange things will happen if there are multiple sessions using 
the same ID.

> The second problem is this issue with the active project. What is the
> correct way to ensure that the link works i.e. avoiding linking to an
> Experiment that isn't shared with the 'active' project? I have tried
> the following:
> 1. Generate a session ID 2. Use the webservices API to set the active
> project for this sessionID 3. Post to /login.jsp using this sessionID
> But this doesn't seem to work. Is there a way to link directly to an
> Experiment, ignoring whatever Project is currently active? Any help
> would be gratefully received.

No this will not work. From the BASE point of view your web service 
application is the client. The session ID it uses to set the active 
project can't be transfered to another client (eg. a web browser).

You'll need to add code to the BASE web server application. Eg. add your 
own servlets, JSP:s, web services, etc. that does the hard work for you 
using the BASE core API directly. I don't think it can be done by using 
the current web service API or by calling the JSP scripts.


This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
basedb-devel mailing list

Reply via email to