Java :: Flex Application Resets Connection When Using XmlSocket?

Mar 23, 2010

[URL]

I am using the same java server given there. and I am creating the XmlSocket in a flex air application. When I run my air application I get a java.net.SocketException connection reset at the java server.

Both are stand alone applications on my desktop.

Flex Code:

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="init()">

[Code].....

View 1 Replies


Similar Posts:


Java :: Flex To Failed Connection, Scrapbook Successful Connection?

Sep 13, 2011

Im trying to make connection from flex to java and from java to mysql. I managed to connect to java, but having error that class not found: com.mysql.jdbc.Driver. But i downloaded mysql.jar, included it added to library, and connection works when i testing it from clipse scrapbook. Dont know what to do, i spend last couple days on this.

Class.forName("com.mysql.jdbc.Driver");
String username = "username";
String password = "password";

[code]....

Basically the solution was simple. Everybody keeps saying to put jar into lib folder, so i done it, but i wasnt realised that i have to put into my servers lib directory, not app lib directory and this miserable mistake cost so much. Anyway i hope this will help for some newbie like me.In this particular situation im using red5, so i putted it into my red5 dist/lib directory and "surprisingly" its started to work.

View 1 Replies

Java :: When To Use Socket And When To Use XMLSocket In Flex

May 18, 2011

In what situations should i use Socket class or XMLSocket when trying to connect from Flex to a Java Server that is going to listen to a port?

View 1 Replies

ActionScript 3.0 :: Xmlsocket With Wireless Connection?

Jan 19, 2009

i am using this code to connect to socket

Code:
function configureListeners(dispatcher:IEventDispatcher):void {
dispatcher.addEventListener(DataEvent.DATA, dataHandler);
dispatcher.addEventListener(Event.CONNECT, connectHandler);
dispatcher.addEventListener(Event.CLOSE, closeHandler);
dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);

[Code]...

View 2 Replies

Java :: Connection Between Flex And Failing On Server

May 5, 2011

I am working on a project using flex/java/blazeds. This worked fine on local host however now that i have uploaded to a tomcat server(online), after having an error with the service uri, this error has now seemingly been solved, yet I am receiving another error which is as follows:

[Code]...

View 1 Replies

ActionScript 3.0 :: XMLSocket Loses Connection After 3 Seconds?

Oct 29, 2009

am getting now really crazy over this.I wrote a shockwave application that connects to a server (this one I wrote in PHP) via XMLSockets. My problem now is that exactly after 3 seconds the client disconnects automatically from the server.Maybe some of you could review my code to give me a hint where the problem is located - note that I use ExternalInterface and call the functions with JavaScript.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="setup();">

[code]......

View 3 Replies

Java :: Detect When Flex Client Closes The Connection?

May 13, 2010

I have a Flex application that connects to a BlazeDS server using the StreamingAMF channel. On the server-side the logic is handled by a custom adapter that extends ActionScriptAdapter and implements FlexSessionListener and FlexClientListener interfaces.

I am asking how can I detect which "flex-client" has closed a connection when for example the user is closing the browser? (so I can clean some infos inside the database)

I tried using the following:

1. To manually manage the command messages:

@Override
public Object manage(final CommandMessage commandMessage) {
switch (commandMessage.getOperation()) {

[Code]....

View 3 Replies

Make Real-time Connection Java And Flex?

Jun 10, 2011

I'm still new at Flex. I want to make a flex code that request data to server everytime. I use java as a server. i have successfully generate a linked-list of data at server from asterisk cli command. like this

[Code]....

View 2 Replies

ActionScript 2.0 :: XmlSocket - Multiplayer In Flash - Establish A Connection

Jan 24, 2009

I've been searching a long time to find a way to do multiplayer in flash. I came across xmlSocket. I'm trying it out really simple at first:

[Code].....

I've gotten all the policy stuff working. And this works perfectly while testing on my computer. If you're wondering, I have a python script listening on port 2950. Here's the python code:

[Code]....

Finally to the problem. No matter what I try, I can't seem to get these two applications to communicate when on different machines. When I try it, no messages even get through to python, it doesn't see anything trying to establish a connection. So I suspect it is having a problem on the flash side of things. Also, is there any way to have multiple flash apps communicating directly, rather than going through the server?

View 9 Replies

ActionScript 2.0 :: Establish A Xmlsocket Connection In Real Server?

Aug 31, 2011

I've designed a flash [as2 php xmlsocket] chatroom , it works fine in localhost but i don't know how to run on real website server.I've uploaded the files but when i run the flash it can't establish a connection.What server requirements i need for xmlsocket?

View 0 Replies

Flash :: Flex - Using Media Gateway Application - Status Is Not Getting Update Like: "Connection Failed" Or "Connection Success"

Dec 17, 2010

I got a IP Communications new account having following paramters:

[Code]...

Its showing me connecting ... Status is not getting update like: "Connection Failed" or "Connection Success". how to use the above information in this app,

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

Professional :: Android Hero Denies XMLSocket Or Socket Connection?

Jun 16, 2010

I am trying to adapt an existing flash web chat application for the Android mobile phone and I am having this really annoying issue. The server is a custom based solution and can send back both binary messages or XML. So I can use either XMLSocket class or the Socket class to get data from the server. Everything works fine when deployed and I connect from the desktop but when I try it from the android mobile I get the infamous errors #2031, followed by #2048. Now the crossdomain.xml file is rock solid and works well for desktop. When the connect socket method runs I see that the server replies with the crossdomain file but I get the error when running on the mobile. Has anyone bumped into this? Is there some limitation from the mobile phone part. I wasn't able to find anything relevant for this issue, in terms of the phone not allowing Socket or SMLSocket connections

View 5 Replies

Java :: Flex - Flash Client To Talk To A Server Through A Full-duplex Connection?

Sep 16, 2010

My client is in Flash/Flex (game with chat) and it will be talking to a Java server. What is the best way (protocol / interface) for my Flash client to talk to my server? I heard about Flash Remoting MX, but it is a request / response mechanism. I could always request something and wait for asynchronous notifications from server. Then request again, implementing something like a Comet server.Anyways, what is the industry standard for this type of communication: Flash Client talking to Java server, supporting asynchronous "push" notifications from server.

View 4 Replies

Java :: OpenPeak Flash App XMLSocket Security

Mar 12, 2010

We're trying to create an app for OpenPeak. The Flash app will act as a client to a Java server on another computer on another domain.The Flash app client connects via XMLSocket. The Java Server uses ServerSocket to receive a request and send back a message.In order to trust the server, the Flash client needs a socket master policy file to tell it that the server comes from a trustworthy domain. According to an article on Adobe, when a connection has succeeded, the Flash client automatically requests the cross-domain policy or socket master policy file on port 843.Still, even when we implement it according to the tutorials and recommendations we have read, the Flash client continues to throw the following security error:[code]We've tried logging the policy file request during testing to see if there was any call made to port 843. There was not.Interestingly, even without a policy file, the Flash client still manages to send the first data message to the server successfully. It's just when the server tries to send back a reply that the entire thing hangs for about 10 seconds before the security error above is displayed.

View 1 Replies

ActionScript 3.0 :: AIR AS3 XmlSocket <=> Java TCP/IP Socket. 00 Byte In Wrong Place?

Mar 8, 2012

I'm extending XMLSocket to work with a daemon, written in Java, that a peer is using to interface with his PLC controller.What I should be seeing from the daemon is simple digital io info in the form:

Code:
d0i,d0o,

Which represents a 'button' dowm/up. The strings are terminated with commas to make it easier for me to parse them. I've got my XMLSocket working just fine, but I'm receiving the data more like this:

Code:
socketDataHandler:
socketDataHandler: D
socketDataHandler: 4

[code]....

So, there's a null character, followed by individual chars that make up the message I'm expecting, only last "," is truncated. It does come through on the next dataEvent:

Code:
socketDataHandler: ,
socketDataHandler: D;
socketDataHandler: 4;
socketDataHandler: O;

Lastly, I checked raw data in a shell, and it looks like:

Code:
0000000: 0044 0034 0049 002c 0044 0034 004f 002c
0000010: 0044 0034 0049 002c 0044 0034 004f 002c

When dumped to hex. It is my understanding (mostly from a sdocs) that Each XML message is a complete XML document, terminated by a zero (0) byte.I can see that he's sending each CHAR separated by a 00 byte, but they are prepended, not appended like:

Code:
0000000: 44 00 34 00 49 00 2c 00 44 00 34 00 4f 00 2c 00
0000010: 44 00 34 00 49 00 2c 00 44 00 34 00 4f 00 2c 00

or even better:

Code:
0000000: 44 34 49 2c 44 34 4f 2c 00
0000010: 44 34 49 2c 44 34 4f 2c 00

View 3 Replies

Python :: Make A Flex Application Where It Gets Data From A Telnet Connection?

Feb 7, 2010

I am trying to make a flex application where it gets data from a telnet connection and I am running into a weird problem.To give a brief introduction, i want to read data from a process that exposes it through a socket. So if in the shell i type telnet localhost 8651i receive the xml and then the connection is closed (I get the following Connection closed by foreign host.)

Anyway i found a simple tutorial online for flex that essentially is a telnet client and one would expect it to work but everything follows Murphy's laws and nothing ever works.Now i have messages being printed in every event handler and all places that i can think off. When i connect to the socket nothing happens, no event handler is triggered even the connect or close handler and if i do the following the socket.connected returns false! I get no errors, try catch raises no exception. I am at a loss as to whats going wrong?

socket.connect(serverURL, portNumber);
msg(socket.connected.toString());

Is there something about telnet that i do not know and its causing this to not work. Whats more interesting is why none of the events get fired.The following is the python code that works!

def getStats(host, port):
sock = socket.socket()
sock.connect((host, port))[code]....

View 2 Replies

Java :: Can Flex Be Used For A Desktop Application

Nov 2, 2010

Can Flex be used for a desktop application whose business logic is written using Java? Everything I've read about flex uses a remoting or http protocol to communicate with the backend via a J2EE server, so I'm not sure how that would work for a desktop app (unless an embedded j2ee server was running in the app).

View 4 Replies

Flex :: Actionscript - Wrap A Java Applet Around A Flex Application?

Oct 20, 2009

I'm just learning about Flex and I'm loving it. Unfortunatly I still have to make the decision on which RIA technology to use and its dependent on, among other things, from the following case: How can we wrap a java applet around a Flex application? More specifically, I would like to wrap/integrate NASA's World Wind applet in a Flex panel, similar to what Adrew Trice did with the Google Earth API.

An alternative would be id Flex would support direct access to the 3D hardware through OpenGL or DirectX. But I do not think that that is the case yet, not even through AIR.

View 2 Replies

Flex :: Execute An External EXE From AIR Or Java Web Application

Aug 14, 2009

Need to execute an external EXE from either a Java web app (running on Glassfish on Windows Server) or from an Flex/AIR desktop app.

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

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

Flash :: Flex - Embedding A UI In A Java Application

Oct 10, 2010

What's out there that lets you do this? Are there any OSS projects or maybe something a little more popular than this:[URL]? This does exactly what I'm suggesting (i.e. cuts out the need for Swing UI for the most part) but for a number of reasons I'd be interested in any better alternatives. alternatives would need to support the Flex SDK.

View 3 Replies

Java :: Flex GUI Compatibility For Desktop Application?

Feb 10, 2012

i want to know if it is possible to create GUI for java desktop based application in Adobe FLEX.

or any other powerful framework to make rich GUI interfaces for Java desktop applications.

View 1 Replies

ActionScript 2.0 :: Flash Application Create A Connection To A Remote Application?

Aug 6, 2003

I need to make my Flash application create a connection to a remote application and have the remote application send periodic updates to my Flash animation. The remote app is written in VB 6, and does not support XML sockets. However, I don't need the ability to send or receive XML since I am going to be overriding the onLoad() event anyway.

Or maybe I do need that ability... I'm having trouble getting my onLoad() event to trigger. Right now I'm just testing the onLoad event like this:

[code]...

So, basically I'm trying to find out how I can format the data I'm sending it so that the onLoad() event triggers. I've read that the XMLSocket object listens for the Null byte, so perhaps the data I'm sending it doesn't terminate properly. I need a persistent connection from Flash to the VB app because the VB app will be the one initiating the updates to the Flash application. Is the XMLSocket the way to go here, or is there another class of objects that I'm missing?

View 1 Replies

Handle M:M Entity Relationships In Flex / Java Web Application?

Dec 21, 2010

I am struggling to come up with a way to efficiently manage Flex entities that have a many-to-many relationships between their JPA/Java counter parts.[code]Both of these entities can exist independently of each other and both have a 1:M relationship with the other. The relationship is not really owned by one side or the other.Within the application there are Flex UI's that sometimes want to see viewers based on movies and other UI's that want to see movies based on viewers.Currently both the Movies.Viewers and Viewers.Movies collections are lazy loaded by JPA which works fine. The problem is that every time I ask a viewer for it's list of movies, then they all get sent over the wire and then within Flex I end up with a bunch of Movie objects that (often, not always) duplicate the ones I already have there.

It seems inefficient at best and could likely cause errors if the duplicate objects are not dealt with.In my real application I have tons of these types of relationships all over some very large object graphs.It almost seems to me that the lazy loaded object collections need to be turned into eagerly loaded collections of foreign keys which are used to explicitly load objects on the Flex side of things. But this seems like I am writing a JPA provider in Flex! Is the correct answer to never store state in a Flex application? (Yikes)I should add that all my value objects have a UID that is created on the server side, so I could somehow use that to find/remove duplicates on the Flex side. But how?

View 2 Replies

Java :: Embed A Jar File Inside A Flex Application?

Jan 30, 2011

I have a great idea and I want to build a flex application around a .jar file. Is there a way I can go by embedding a jar file into the flex application?

View 1 Replies

Flex :: Develop A Video Chat Web Application In Java?

Apr 19, 2011

Currently we are in the design phase of an application that will allow two users to communicate with each other using chat and video (with audio), the application is a web application that currently is a java web app with Spring and hibernate, but we want to incorporate video and chat between two users and we are evaluating the options to developing it, so far we have two choices, either develop a Flex UI that leverages its video and chatting capabilities through Red5 or something like that and communicates with the Spring app using BlazeDS or a completely java based approach using (maybe) JMF and/or applets to achieve the video and chat interaction. The question is, which would be the most scalable approach to develop such an application?, what would be the approach that is the least intrusive from the end user perspective?

View 2 Replies

Java :: Flex - AIR - Build An Application To Run In Local Mode

Dec 20, 2011

I don't know really well the diference between AIR and FLEX, i do with Java tought, My question is that I want to build an application to run in local mode, but maybe in the future I want it to be available trought the web, The basic sequence diagram is the following: So I want the client to connect to a server for login information, and for storing some data, and I don't know wich one of the three technologies is the best..

View 2 Replies

Java :: Embed A Flex Component In A Pure Android Application?

Sep 7, 2010

I know it is possible to develop a full flex application using AIR for android but what I need is to embed a flex component into an already existing classic java android application.

I found some flash players in java but they all either require a JFrame or include of specific windows dlls.

View 2 Replies







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