JSON and Java through BlazeDS

Avatar

Avatar
Level 1
adudas
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
adudas
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile
adudas
Level 1

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

Avatar

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





Avatar

Avatar
Level 1
adudas
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
adudas
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile
adudas
Level 1

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