Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

JSON and Java through BlazeDS

Avatar

Level 1
I'm using a regular httprequest to make call to a Java app
service that returns JSON. Can I make that same call using BlazeDS
and AMF? I'm having problems with Flexsessions when mixing the two
and want to just keep all my service calls in remoting.
2 Replies

Avatar

Former Community Member
Hey,



I don't have much problems between flex sessions and sessions
in a JSP (if that is what you mean).



I would suggest to investigate some time using Blaze-DS
because it will give you a must faster response time then using
JSon.



What is your exact problem using sessions??





Here is a example what I do :

set user_id in a session

FlexContext.getFlexSession().setAttribute("user_id", id);



get it back:

id =
(Integer)FlexContext.getFlexSession().getAttribute("user_id");







get it in a JSP page:

user_id = session.getAttribute("user_id");





Avatar

Level 1
Thanks for the reply. Well problem is that I am making some
calls to my AMF service first and that sets a session cookie in the
broswer. Then when I use the Java service over HTTP, that service
sets another session cookie and my app gets confused. To fix it, I
have to delete the session cookie after my AMFcalls return which is
a bad hack. I tried making my Java calls over an http proxy but I
keep getting a "NetConnection.Call.BadVersion" error