简体   繁体   English

如何附加到现有的Java EE会话

[英]How to attach to an existing Java EE session

I have an external SOAP web service that attaches to our services layer inside the application. 我有一个外部SOAP Web服务,该服务附加到应用程序内部的服务层。 For the Web 2.0 application, the services layer uses the session to store the user's "key chain" or the things a user can do in the system. 对于Web 2.0应用程序,服务层使用会话来存储用户的“密钥链”或用户可以在系统中执行的操作。

Now I'm trying to figure out how to do the same thing with my web service client to our services layer. 现在,我试图找出如何使用Web服务客户端对服务层执行相同的操作。 The problem is that the web service URL can't contain a cookie that holds the session ID. 问题是Web服务URL不能包含保存会话ID的cookie。 (If I'm wrong, please say how and I'll do it that way.) (如果我错了,请说出方法,我会那样做。)

When the web service client connects the first time, I require a login and generate a security key that uniquely identifies that user and will expire within a certain period requiring them to login again. 当Web服务客户端第一次连接时,我需要登录并生成一个安全密钥,该安全密钥唯一地标识该用户,并且将在一定期限内过期,要求他们再次登录。

I'd like to find a way in my endpoints to re-attach to the proper session for that security key and then the security will work automatically. 我想在端点中找到一种方法来重新连接到该安全密钥的正确会话,然后安全性将自动运行。

My endpoints are currently being served from tomcat. 目前,我的端点是从tomcat提供的。

How can I get there from here? 我怎么能从这里到达那里?

All input appreciated. 所有输入表示赞赏。

I ended up using REST to come back into our webapp through the URL so that I have a session. 我最终使用REST通过URL返回到我们的Web应用程序,以便进行会话。 I connected to it that way. 我以这种方式连接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM