Java :: Support Both HTTP And HTTPS Channels In Flex/BlazeDS?

Jun 17, 2009

I've been trying to find the right configuration for supporting both http/s requests in a Flex app. I've read all the docs and they allude to doing something like the following:

<default-channels>
<channel ref="my-secure-amf">
<serialization>[code]..........

I'm running with Tomcat 5.5.17 and Java 5.The BlazeDS docs say this is the best practice. Is there a better way? With this config, there seems to be 2-3 retries associated with each channel defined in the default-channels element so it always takes ~20s before the my-amf channel connects via a http request. Is there a way to override the 2-3 retries to say, 1 retry for each channel?

View 4 Replies


Similar Posts:


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

Flex :: Create Channels At Runtime Using BlazeDS?

Aug 12, 2010

So as you may or may not know, BlazeDS (open source version of LiveCycle Data Services) is a nice way to get your server-side Java and client-side Flex application to play together. Unfortunately, it does have several pitfalls that need to be corrected. I'll try to explain one of them here.

All of BlazeDS's configuration is written via XML files in the flex/ folder of your webapp. The default names are separated for clarity, such as services-config.xml, remoting-config.xml, messaging-config.xml, etc. In these configuration files (particularly services-config.xml), Channels are defined; these setup URIs and objects used to capture and send information between the server and the client. In these config files, it is quite common to use a syntax like so:

[Code]...

Unfortunately, what they don't tell you is that some of these key-in replacements (ie: {context.root}) are not replaced dynamically upon execution but upon compilation of the WAR file you intend to distribute. Obviously not a good idea when switching domains.

So, instead I seek to dynamically define these channels. According to the documentation, that's all good and fine, but it only works if the channel already exists when the webapp is launched. I feel like that sort of defeats the point. So my question is, how do you truly create channels dynamically so that both the client and the server recognize their existence?

View 1 Replies

Flex :: How To Configure BlazeDS To Work Over HTTPS

Oct 5, 2011

I'm trying to configure BlazeDS to work over HTTPS. We've got Apache in the front that is set to redirect all http traffic to https. Apache then communicates with the application (a JBoss AS 5.1) via http. I've tried a lot of configurations for BlazeDS, and finally the following solution worked for me:

services-config.xml
<services-config><services>
<service-include file-path="remoting-config.xml" />
<service-include file-path="messaging-config.xml" />
</services><channels>
[Code] .....

The thing here is that in my-secure-amf channel, I use mx.messaging.channels.SecureAMFChannel in the channel-definition, and flex.messaging.endpoints.AMFEndpoint (not flex.messaging.endpoints.SecureAMFEndpoint). This has probably something with the Apache-Jboss setup to do, but I haven't found anything that explains what the different tags actually define. To get some sense in all of this, what happens when defining channels and endpoint, using different urls and classes?

View 1 Replies

Flex :: Switch From HTTP To HTTPS In Application?

Dec 21, 2009

I am building a FLEX web application that also has a payment module where the user needs to enter his credit card details.

The whole Flex application runs on HTTP. However, whenever the user lands on a page where we ask for credit card details, we want these details to be sent over HTTPS.In this page we need information from the model of the application, because it holds certain selection the user did, the state the application is in, etc.

Do I need to make this page a Module that runs on HTTPS?

Or can I just configure the specific 'credit card' services (we have a JAVA back end) so that these run on HTTPS?

View 1 Replies

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 :: 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

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

Flex :: Access Https Resource If Swf Is Served From Http?

Jan 24, 2011

My swf is being served via http protocol. I don't really see this being easily changed. There's a resource that a website has opened up via their api that I need to access but it is using https protocol. Because of this my swf can't access the resource because of security settings.

Option 1 would be to serve my swf via https. I can't do this at the moment.

Option 2 would be set secure="false" property of the cross domain policy file. I can't do this, I dont have access.

View 1 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

Flex :: Blazeds - Keeping Alive HTTP Session For Long

Oct 30, 2009

Any standard way to keep alive the http session as long user has open the flex app in the browser? I played around with the polling mechanism of blazeds. But it had no affect on the http session.

View 3 Replies

Java :: Flex Accessing Https Service Of The Same Domain That Swf Is Loaded

Aug 2, 2011

I am developing a flex application with flex 4.1 sdk and java backend (runs on Glassfish 3.1 via http). For security reasons I decided to move my authentication process to https until a session id is obtained. Therefore I changed the filter settings to use ssl for login and logout pages(just two pages due to performance reasons. The data-size sent to client is large and I do not want to slow down the system). Glassfish forwarded these pages to 8181 port (which is HTTPS port). Everything is ok for the java part. However flex defines the 8181 port as a different domain and then problems arise. Due to flash's same-origin policy it cannot load the secured content. Normally a crossdomain.xml is the solution but I am accessing content of the same domain through a different port. What will be the solution ?

View 1 Replies

Java :: Flex File Upload With HTTPS - No Access To User Principal

Dec 29, 2009

We're trying to upload a file from a flex client to a JEE app.
In a full HTTPS environment
JEE server is JBoss 5
Using BlazeDS 'Custom' authentication (username and password are entered through a flex form)
Using BlazeDS per session authentication
In regular AMF calls, we can access user principal and use role mechanism. However, in our upload servlet, we have no access to user principal.
request.getUserPrincipal() // returns null

View 2 Replies

Flex :: Develop The HTTPS Application Using Java - Remote Objects Or HTTPServices

Feb 8, 2010

I need to develop the HTTPS application using Flex and Java. But i have idea about remote objects or HTTPServices. which one is the best for developing HTTPS application.

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 :: 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

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 :: 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 :: 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

Java :: Deploy A Flex+blazeds Application?

Mar 23, 2010

I developed an application using flex+java+blazeds with tomcat that provide flex enviroment.I want to deploy my application using tomcat but I can't, how can I deploy my app?

View 2 Replies

Spring - Flex Blazeds Java NoSuchMethodException?

Aug 29, 2010

We have a Flex-BlazeDS-Spring-JMS application. The issue is sometimes we get a Blazeds error: NoSuchMethodException. It is not able to find the Java service. The weird issue with this it does not happen all the item...1 time it goes through and returns the result, the 2nd time it fails, 3rd time fails and so on. Also not all methods fail, only 2 method calls fail.

[Code]...

View 2 Replies

Custom Marshalling From Java To Flex Via BlazeDS?

Oct 29, 2010

My team are putting together a proof-of-concept Flex application sitting on top of a Spring-based server using BlazeDS.We do quite a lot of date calculations, so we use Joda Time extensively throughout the code and in our domain model.We're now trying to figure out how we can continue to use Joda Time in our DTOs that are sent back-and-forth with the Flex frontend via BlazeDS.

Our goal is to use the Actionscript 3 data type Date on the Flex side and have that map to our use of Joda time's DateTime, LocalDate and LocalTime types on the Java side.We can solve the problem of converting Actionscript 3's Date type when calling Java with a custom type marshaller plugged into BlazeDS, but this appears to only be invoked for the Flex->Java/BlazeDS direction and not for the Java/BlazeDS->Flex direction.

I'm now looking at custom PropertyProxy implementations for BlazeDS, but this doesn't look like the right thing either.The other idea was to implement Externalizable on our Java DTOs, but this seems like too much work, especially when I look at the BlazeDS rival GraniteDS and that shows plugging in Joda Time support in their documentation with a simple type converter!

View 3 Replies

Java :: Flex - BlazeDS Not Handling Inner Class DTO?

Aug 19, 2011

I've noticed BlazeDS has certain things it does not support and it is often difficult to find this out. Ex: polymorphism is not.One must create methods with different names as methods with the same name with different parameters create a conflict.I'm trying to find out if BlazeDS does not support Java static and non-static inner classes.

public class UserDTO {
private String name;
private AddressDTO adddress;
private PhoneDTO phone;

[code]...

The example code above will compile and the getUser method will work. A call to the updateUser or updatePhone methods on the other hand results in a BlazeDS error. Is there a special way to use inner classes in Flex or are inner classes not supported?

Here is an example of the error messages produced:

[BlazeDS]Cannot create class of type 'com.test.dto.UserDTO.PhoneDTO'.
flex.messaging.MessageException: Cannot create class of type 'com.test.dto.UserDTO.PhoneDTO'. Type 'com.test.dto.UserDTO.PhoneDTO' not found.

Example Flex code:

var thisPhone:PhoneDTO = new PhoneDTO();
thisPhone.phoneNumber = "8885551212";
updateTagsResult.token = userService.updatePhone(thisPhone);

View 2 Replies

Java :: Does Flex Not Support Hashmaps

Sep 28, 2009

I have a Flex object which collects a DTO from the server. All the fields arrive filled in correctly except for the one that is a HashMap. It arrives as null.I've tried giving it a type of both ArrayCollection and Dictionary, but that hasn't fixed it.Does anyone know if there's an inherent incomaptability between Java HashMap and Flex?If not, what might I be doing wrong here? I'm looking at my jboss console and I see the data being populated correctly in the server side before delivery to the client.

View 3 Replies

Java :: Flex BlazeDS Dashboard - Use Spring / JDBC Or Hibernate?

Nov 4, 2009

I am developing a IT Monitoring Dashboard for the company I work at. The system will primarily perform monitoring of files, databases and servers. There will be a small part of the system which will allow the users to configure static data about the system eg: file locations, server names etc...

So as the app. will be a dashboard a lot of the application will consist of publishing data to the flex client to update all the monitoring views. So there will be limited database activity ie: insert/update/deletes.

[Code]...

View 4 Replies

Java - Connecting Non-flex Client To Server Running BlazeDS?

Aug 27, 2010

I have Flex/AIR app that connects to a tomcat server via BlazeDS. I'm not finding that I have to integrate an old webapp (struts/jsp) and I'd like to keep that webapp untouched except for login, authentication and session handling. Also a 3rd java app that uses httpclient.

Currently I have some blazeDS remote objects to handle login/logout with a few RPC calls. In turn, FlexSession objects are created and handled. Is there a way to use httpclient and javascript to call those blazeds RPCs so I dont have to recode and have 3 different means to handle logins and sessions?

View 1 Replies

Flex :: Connection Between Java / Using Blazeds Returns Error #2048

May 4, 2011

I have been developing an application(a website to be more precise) which consists of a flex front end which is constantly sending and receiving data from the back end which is programmed in java. The connection between the two components is being done through blazeds. This worked fine while I was running it locally, however when I uploaded both sides of the application to a tomcat server(online) the following error is being returned when a connection between the components should occur:URL...I have read around about this error and many seem to getting this error when making connections between different servers, unlike here, where the connection is occurring within the same server.

View 1 Replies

Java :: Flex Session Parameters In Remote Object BlazeDS?

Jun 23, 2011

I have my flex object embedded to JSP page.The JSP page retrieves user information like user name and group from portal profile object and stores in http session parameters. The flex Object makes a remote call to Employee.class to perform persona based operation.

I retrieved the session id in JSP and also in the Employee.class both are same. But I am not able to retrieve the username stored in the http session from FlexSession. I read in the internet that the FelxSession will hold all httpSession information as well. It's always coming as null. Correct me if I am wrong.

[Code]...

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 :: How Set Flex Server Location For BlazeDS Maven Build

Apr 1, 2012

As a first step getting a Hello World Flex-to-Java application to compile and run I followed: [URL] And it ran successfully. However now I wish to automate the build in Maven. How to specify the Flex Server location in the pom.xml?

View 1 Replies







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