Highlighted

JSON and Java through BlazeDS

adudas

10-09-2008

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.

Replies

Highlighted

riesvantwisk

11-09-2008

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");





Highlighted

adudas

11-09-2008

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