Java :: Intercepting Date Objects Coming From BlazeDS And Adjusting For Timezone Differences?

Oct 27, 2010

I am working on an application that is near the end of its development cycle and has mostly passed user testing. We recently realized that having flex convert dates to the client's local timezone is not desired, as all of our dates are in EST and contain no time data. Since BlazeDS sends dates in UTC, this results in the dates being converted to the day before in timezones west of EST.

The best solution is to go in and refactor all dates to adjust for the timezone offset, but that is just not doable at this stage. Since all dates in our application don't care about time, I would really like to be able to intercept all Date objects that come across BlazeDS and adjust for the timezone offset.

View 1 Replies


Similar Posts:


ActionScript :: Java - Flex ArrayCollection Of Number Objects To Java Collection<Long> Using BlazeDS

Mar 24, 2010

I am using Flex 3 and make a call through a RemoteObject to a Java 1.6 method and exposed with BlazeDS and Spring 2.5.5 Integration over a SecureAMFChannel. The ActionScript is as follows (this code is an example of the real thing which is on a separate dev network);

[Code]...

View 2 Replies

Java :: Why Value Objects Coming Back As Generic Flex Objects

Aug 4, 2011

I will try to give as much detail as I can. I am creating an CRM application using Flex(Cairngorm 2)/Java/Hibernate. The basic problem I am having is this: I have a Customer class in Java that has an ArrayList of Address classes. I have a Customer class in Flex that has an ArrayCollection of Address classes. When I make the remote object call for a Customer I get back a Customer object in Flex, but the ArrayCollecion objects have a data type of Object instead of Address. If I try to call for a List of Address classes I get the same result. If I try to call for a List of Customer classes I get a list of Customer classes in Flex. Using tomcat 6 with the following jars:

[Code]...

View 1 Replies

AS3.0 :: Java - Flex - ArrayList Of Custom Java Objects Over BlazeDS

Dec 7, 2010

Right away i just try to explain my problem: Using BlazeDS i got the following Javaclasses:

[Code]...

Then i got a Flex service class calling BlazeDS and executing the getCategories java method. Since Flash dosn't seem to understand typed arrays, the result from that method which i get back in flex is a simple array of untyped objects (the mapping dosn't seem to work here, even tought the class category exists in flex and has the same properties).
thats the first thing. but however, i'm converting the untyped objects manually into objects of the category.as class. the second thing is that categories have child-categories within the java object, which are also ArrayLists of the type category.java. the problem about that: my result event object only contains the first level of categories, looking into them the children are allways null. i dunno why they are empty, since they ARE part of the java object category.

and the third thing (the strangest by fast), you maybe noticed i named the properties of the category.java class strange, like idCat and nameTest instead of simply id and name. why that? because the property names of my flex result objects dont seem to change when i change the java objects properties names (result object properties are named "id" and "name" but the java class object properties are named "idCAT" and "nameTEST"). that it REALLY strange, since if i set the properties, like you see at nameTEST = "TESTNAME" it IS recogniced by flex, only the proertyNAMES dont seem to be recognized at all.

[Code]...

View 4 Replies

Java :: Flex - Date Not Serializing Using BlazeDS

Sep 30, 2009

When I pass a Actionscript Value Object that contains a Date variable using BlazeDS it is not getting transferring as a java.util.Date object correctly. When the setBaseDatefunction gets called on the Java side the baseDate value is NULL. The weird thing is if I rename the variable on the Java side to private Date date; and create a public void setDate( Date date) function it works. The problem is I need to pass 2 different dates so I can't uses this work around.

Here are my 2 classes:
AS3
package com.shua.flex.valueobjects {
[Bindable]
[RemoteClass(alias='com.shua.valueObjects.myVO')]
public class myVO {
public var label:String;
public var endDate:Date;
[Code] .....

View 3 Replies

Java :: BlazeDS Not Mapping AS Objects Correctly?

Mar 25, 2011

I have 2 java classes that are the same (imagine the getters and setters):

class ScheduledEvent {
private String eventName;
private List<eventValues> values; [code]....

Now there is a reason why there are two classes that are the same.When something is "scheduled", I should get the ScheduleEvent object and when an event is started, I should get the StartEvent object.And depending on the object I get back, I do different things.My problem is that, on the backend, it will send me the ScheduleEvent object, but once it got to the flex side (via BlazeDS), it becomes a StartEvent....

At first, I thought it's because these two events have exactly the same variables, so I tried changing ScheduledEvent by adding a dummy variable (String foobar) but that didn't seem to make a difference.

EDIT: I'm using BlazeDS messaging system.That's why I am not using "one java method call to one responder" approach. So, in the message.body, I should be getting ScheduledEvent but I keep receiving StartEvent. I'm wondering if it's because the two objects have the same property and BlazeDS doesn't know how to map them correctly... I even put a break point in the java service layer, to make sure that the appropriate object is being sent back and it is... But by the time BlazeDS serializes and deserializes it to the flex side, it is now a StartEvent.

View 1 Replies

Actionscript :: Flex - Debug AMF (BlazeDS) Serialization Of Java Objects?

Jun 11, 2009

I'm using BlazeDS to remote some Java objects that I'm consuming in a Flex application. I'm getting a type coercion error with one of my classes that I can't for the life of me figure out. I have other classes that are working fine using the same data types, and I've gone over my mapping a dozen times. I'm following all of the necessary conventions for getters and setters as far as I know...

Anyhow, my question is: how can I debug this problem? Running the Flex app in debug mode spits out some generic errors to the console that don't really help much (TypeError: Error #1034: Type Coercion failed: cannot convert Object@5d1d809 to valueObjects.SomeClass.).

View 5 Replies

Java :: RemoteObject In BlazeDS Environment: Serializing Objects From JAXB / XJC-generated Classes

May 10, 2011

I'm developing a webapp with Java backend and Flash (pure ActionScript) frontend using BlazeDS. I'm using the RemoteObject stuff to send objects, using custom serialization, where I need to implement Externalizable (Java) and IExternalizable (AS) interfaces. This works fine so far.

But now I need to send objects from Java to Flash, whose classes are generated with JAXB/XJC. Of course these generated Java classes don't implement the Externalizable interface, so it seems that I can't use my approach here. One possibility seems to be writing a XJC plugin which makes the classes implement Externalizable. But this looks like a tough job...

View 2 Replies

Flex :: Use DTOs Or Domain Objects When Connecting To Blazeds/java/jpa Using Remote-services?

Jul 24, 2011

I am working on an Adobe Flex front-end with a Java back-end using JPA for persistence. he protocol I am using is remote objects (AMF) implemented with BlazeDS.I started out with a service-facade and entity DAOs, but without any specific DTOs. The same POJOs, the domain objects, were passed in the service-facade as those used as DTOs passed to the Hibernate DAOs.However, the latest few days I have been thinking whether this is a good approach or not. The latest article on the subject I read was this one:Interesting JPA Pattern blogThe situation:Say I have POJO Book with a unidirection ManyToOne relation with the POJO Category (i.e. each book may only be associated with one category, but the same category may be associated with many books). I see some alternatives:Alternative 1:I expose a method/operation addUpdateBook(Book book). In the implementation of this operation I add/update both the book and the referenced category.

View 1 Replies

AS3 :: Xml - Get Closest Date To Today - Show Only The Up Coming Event - Relative To Current Date

May 28, 2010

I have a XML file with a few concert dates. In my flash/AS3 file, I would like to show only the up coming event, relative to current date. Like this:

Event 01: 30-05-2010
Event 02: 02-06-2010
Event 03: 05-06-2010

Today is 28-05-2010, so I need to list Event 01. On 01-06-2010 I need to list Event 02. I have the basic AS3 code for listing the XML working, but I'm having trouble filtering the result.

View 2 Replies

Flash :: Pass A Date Without TimeZone?

Jan 14, 2012

I need to pass my Date information to a webservice in the following Format:

(yyyy-MM-dd'T'HH:mm) 2008-03-12T00:00

But Flash returns me the date object as below format:

Sat Jan 14 11:32:03 GMT+0530 2012

Is there anyway I can modify the date object to hold the datetime as in the format below ,i.e:

(yyyy-MM-dd'T'HH:mm) 2008-03-12T00:00

View 1 Replies

ActionScript 3.0 :: Get Timezone Code From Date?

Jan 28, 2009

I have time in UTC format coming from a different application. Now i can convert it into browsers timezone and show the time properly.However the problem is I want to show the Short code for time zone instead of TZD that is used by default.

View 0 Replies

ActionScript 3.0 :: Find Out Client Machine TimeZone In Specific Format Using Flex Date?

Sep 12, 2011

I have a requierement in my project that i need to store 'US/Eastern EST' and day light saving 'US/Eastern EDT'  in data base if client machine is in US/Eastern time zone. Because this gives clear identification instead of justing the chars like 'EST'. There is CDT in US region as well as Chaina too so can't relay just on three chars like 'EST'/'EDT'.

View 3 Replies

Java :: Performance - Code Doesnot(only Sometimes) Compiles In Java+flex (+ BlazeDS+Tomcat ) Combined Project.a

Aug 13, 2010

i am working on a flex+java combined project.My IDE and computer configuration is as follows:

[Code]...

When i make a small change in Flex code (eg, reposition of a button...anything), and run the project on server, it does make any change on output. Actually it depends on my luck... because it makes change in output randomly.what is is happening? tried rebuild, republish, clean , restart server, restarting the IDE, restarting the computer all available feature i could think. Also, i created a simple flex project on IDE and compiled it..... everything is compiled and displayed on output.

View 2 Replies

Java :: Implement A Web App With Blazeds+java+flex+tomcat?

Mar 23, 2010

I'm coding a web app in flex blazeds and Java. I installed the Eclipse plugins for using WTP mixed project. I'm using flex's server that uses an emulate of tomcat when i ran my flex service the web app got the datas, everythings is ok. the problem is when i copy the project with all files generated by flex in my tomcat or the blazeds's tomcat, it doesn't work, this is becasue i want to implement my app on a server the error is:[code]
i don't know why tomcat doesn't find the class of flex.messaging.endpoints.AMFEndpoint that is used for my-amf 'URL...'. all works well in the emulated server that flex has.

View 4 Replies

Java :: Java, BlazeDS And Config File For Application?

Nov 11, 2010

I'm programming Rich web applications with Flex and Java on Flex Builder 3 using blazeDS and SharedObjects.Now I need that my program will use configuration file.so, I need that my Java class will read it at the first time but the default path of java to read and write files is c:program filesFlex Builder 3 and not my application directory inside the tomcat webapps directory How can I read the config file from the java class without write the path hardcoded in the java?

View 1 Replies

AS3 :: Flash - Check For Objects Intercepting A Line Of Sight?

May 9, 2011

I've for a while now been trying to work out an efficient way to see if something is in something else's line of sight. A good example is having a sphere that fires a rocket at you if it can see you - but obviously not if you're behind a wall.

Here's how I generally went about doing this:

function cast(end:GameObject, walls:Array, accuracy:uint=10):Object
{
var xp:Number = skin.x;
var yp:Number = skin.y;

[Code].....

Works, but as we know this will get extremely slow with each new rocket added or as the amount of impassable objects increases.

I'm assuming there's a really simple efficient way that I'm missing - I mean, all games do it (Diablo, etc) with hundreds of enemies that don't do anything unless you're visible.

View 3 Replies

AS :: Javascript - Differences Between Regular Expressions In Java And ECMA-262

Jun 22, 2011

I need to convert Java regular expressions into Actionscript regular expressions. There apparently aren't any premade converters, so I'm trying to write one myself. Is there any resource that'd list all the differences? I'm aware of regular-expressions.info, but there doesn't seem to be a comprehensive listing of differences there.

View 2 Replies

Actionscript 3 :: Xml Serialization - Convert Date To Java.util.Date Through A Xml?

Jan 14, 2011

I want to convert Date(ActionScript 3) to java.util.Date through a xml. First, write a user defined ActionScript class like this.

[Code]...

Finally, In server side of Java, I want to convert this xml to Java class like this for using JAXB Unmarshaller.

[Code]...

View 3 Replies

ActionScript 3.0 :: Difference Between AS Date And Java Date?

Nov 20, 2009

Why there are differences between AS Date and Java Date? I have a startTime field in an ActionScript class and also have a startTime in the related Java class. The time set in AS is new Date(2009,11,19,10,35,50); and then I find it has the value of 2009-12-19T10:35:50.000-0500 in the Java object.

View 0 Replies

Java :: Enable RDS Support For BlazeDS?

Jun 19, 2009

I'm using BlazeDS 3 in my application. The dependencies for the BlazeDS libraries are downloaded from a public maven repository. However I can't enable the RDS support on the server because of some missing library. Does anyone know where this class is located: flex.rds.server.servlet.FrontEndServlet.

View 2 Replies

Java - BlazeDS Destination Destroy()?

Oct 22, 2009

I have a BlazeDS destination and the scope is set to request. Is there a way to get BlazeDS to call destroy() when the request is complete? Is there another way to know when the request is complete?

I know I can use finalize(), but that is only called when garbage collection occurs.

View 2 Replies

Java :: Use Blazeds With A Custom Classloader?

Mar 18, 2010

has anybody tried using a custom classloader with BlazeDS? We have a web application using BlazeDS and we can convert Java objects in to ActionScript object and back without problems in the main application. However, we also have a plug-in mechanism based on a custom classloader.BlazeDS cannot map the types contained in jar files of that custom classloader since I don't know how to tell it to BlazeDS.The livedocs of TypeMarshallingcontext show a setClassloader() method, but since the context seems to be a singleton, I assume this will not work if you have multiple custom classloaders (we have 1 for each plugin that is deployed

View 1 Replies

Flex Integration With Blazeds Using Java?

May 20, 2011

My name is Rahul.I am new to flex. I am trying to integrate flex with blazeds using java. I have written some code as per my knowledge. But it is not connecting to database. I am pasting my code here.Please look into this and let me know if i have done any mistakes over there:

[Code...

If i try to execute the Feedback.mxml then i am getting "Sorry your feedback is not entered" as output.I dont know where the problem is.I think flex is connected successfully but problem is in java code.

View 2 Replies

Java :: Get Ip Address Of Client In BlazeDS?

Nov 9, 2011

I am using blazeDS remote object. I need to get a client ip address from clien request. Is it any way to get ip address and system information in blazeDS java.

View 1 Replies

Java :: Bringing Together Flex And BlazeDS

Mar 16, 2012

I'm starting a flex+blazeds project. First I coded some server classes, and modified xmls (in WEB-INF). Now I want to test it with client. There (in Flash Builder) it's needed to specify path to folder where server lives. The problem is that I cannot find it. In the same time [URL] is found in browser.

View 1 Replies

Actionscript 3 :: Write "Intercepting Filter Pattern" Like Java's Servlet Filter In Flex?

Feb 10, 2011

I want to know how to write "Intercepting Filter Pattern" like Java's servlet filter in Flex.

And I want to insert it into the classes which have a role of server communicating.

View 1 Replies

Java :: Changing Subtopics In BlazeDS And Flex?

Aug 14, 2009

I using messaging in Flex-BlazeDS. When the AIR client starts it connects to a destination and a specific subtopic. During runtime, the user can use a combo box to subscribe to different sets of live data coming in, this combo box change event changes the subtopic by:

messagingConsumer.subtopic = subtopicComboBox.selectedLabel;
messagingProducer.subtopic = subtopicComboBox.selectedLabel;
messagingConsumer.subscribe();

A message is then sent to the server with the new subtopic name as well so the server knows to send to a new subtopic. This whole mechanism seems very glitchy and I'm wondering if anyone else has tried this and succeeded? Most times it works the first time and the after that either the messages dont get sent or I get server errors like:

[BlazeDS]Endpoint with id 'my-streaming-amf' cannot service the streaming request as either the supplied FlexClient id 'B07F3285-A408-816E-4697-F13F9B17E32C is not valid, or the FlexClient with that id is not valid.

Also sometimes when I change subtopics it will cause the FlexSession and FlexClient to be destroyed instead of just the MessageClient. Once that FlexSession gets destroyed it messes up all kinds of things including logging out the user.

Perhaps I'm over complicating things by changing subtopics to listen to different sets of live data, if anyone has any other ideas on how to accomplish dynamic changing of destinations or subtopics please list those as well.

View 1 Replies

Java :: BlazeDS Turnkey Configuration For Mysql?

Nov 15, 2009

What is the configuration and code required to use mysql within a BlazeDS turnkey

View 2 Replies

Java :: Way To Secure A Flex-BlazeDS Application?

Feb 24, 2010

What's the best way to secure a Flex-BlazeDS application? I've googled it an several solutions came up.UPDATE after question from jsight:Flex would login, so on the RemoteObject I'll set Credentials I don't know if there comes authentication and authorization with BlazeDS (WebORB for instance does and WebORB looked at BlazeDS for their product) SSL not needed 've seen some links on the internet talking about spring security, so I'll check that out.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved