I have developed a flex project
It brings out the result from an xml file through an url.
It works when i run from flex builder..
I had made a copy of swf file of that mxml file and run seperately by keeping in my desktop..
No values are fetched from the url... What is the solution for this...
You are probably hitting the security sandbox in Flex. Either put the SWF on the same host as the data that it is requesting or setup a proxy on the server the SWF is on to forward requests to the server with the data.
Flex Builder automatically adds apps to the trusted sandbox so that you don't see errors when you make network requests.
Related
I'm trying to resolve a Flex remote object Coldfusion call. I'm getting the following error.
[MessingError message='Destination 'ColdFusion' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']
When I access my CFC through a cfm page, they work. Due to the way the servers are configured, I'm having issues setting up flex with a coldfusion service when I create a new project because I'm developing on a machine, but have to push everything to the server where CF is located. I'm also wondering if the way CF is setup may be an issue. The company is running Coldfusion from the c:\inetpub directory with IIS and out of the same webroot directory they are running WordPress/MySQL (6 WP sites to be exact). Any suggestions would be appreciated.
I will also add that when I create the flex project I can not set ColdFusion as the web server whether local (1.This machine doesn't run a local instance due to office permissions) and 2.) They don't have the J2EE setup.
The first thing I would check is what you get when you go to: http://www.domain.com/flex2gateway. That should give you a blank page, but if you get anything else (such as a 404) the flex gateway isn't running.
The other thing to make sure is that you set your services compiler argument on flash builder to the coldfusion services-config.xml file in the WEB-INF/flex directory.
-services c:/Coldfusion/wwwroot/WEB-INF/flex/services-config.xml
I have zero knowledge on flex and need help to determine what is preventing my web service from being called.
We have a working application in production and the developer who wrote it has left.
I am trying to build it on my machine and I can see a web service call in fiddler being made with the URL "/Services.asmx/MethodName" (as a GET request).
I have set my break point in the asmx web service and it is not being hit. All I get in the flex front end is a pop up with " The remote server failed to respond and may be offline. http://MachineName/Services.asmx/MethodName"
The web service is in the same application as the web app that hosts the SWF file.
I have the cross domain policy file in place.
What I noticed in fiddler is the URL is "/Services.asmx/MethodName" and not "/WebApp/Services.asmx/MethodName" (not sure if this makes a difference) where WebApp is the IIS virtual directory to the web application that hosts the SWF.
Any ideas?
JD
If you are Web-services and your web-application is same domain then just pass the whole path like "http://..../Services.asmx" for creating web-service api instance in ActionScript 3.0 (for flex). and use this instance name to call your web-service method.
Please read this article from Adobe help for your perfect answer
I'm trying to access local file system from Flex web application.
I know it is pretty difficult, but I think there must be a way. Is there a way that Flex app can use AIR components or maybe web application can call some AIR module in order to choose files and upload?
There is no direct way that a web based Flex/Flash application can access AIR based APIs. They aren't built into the Flash Player, but are rather extensions built into the AIR runtime. You can't access them directly because they aren't there.
If you have an AIR app installed on the user's local machine you can, in theory, use that app as a proxy with localConnection. That way the AIR app can access the file system directly, triggered by the browser based app. I'm not sure how user interaction would work, though.
If you have server software installed on the client machine, you can trigger file processing commands from Flex using RmoteObject/HTTPService/WebService commands. This wouldn't give the user any interaction ability and is not usually practical unless you have strong control over your client machines.
Either approach would present an app installation nightmare; which almost defeats the purpose of a browser based app in the first place.
You can use FileReference's methods to ask user to select files to open (load into flash, upload into server) or save (from server or bytes from flash).
I've got a flex app that hits a remote SOAP service and populates a list with the results.
It works fine when i run it through flex builder, but when i compile the application and move it onto a webserver it can't access the services.
I've tried it from a standalone webserver and on my own machine. I'm assuming that there's a security issue that i've missed as i can't think of any other reason why it's ok in flex builder but not when compiled on the same box.
Thanks all.
Is it a crossdomain.xml issue?
The web server running the SOAP service needs crossdomain.xml file to allow your flash movie to access it. See http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html
I'm using Flex Builder 3 to connect to a bunch of back-end code via the AMF gateway. Another developer packaged up all the AMF Gateway code into a war file. Here's my development process:
Deploy most recent AMF-gateway.war file into local jboss server
War file gets unpacked into [jboss]/server/tmp/deploy/tmp23241AMF-gateway-exp.war/
Run Flex Builder. Point application project at AMF Gateway tmp folder in 3 places (Flex server root folder, Flex build output folder, Flex compiler 'additional arguments' (pointing to location of services-config.xml).
This setup means that whenever you start a debug session in Flex Builder, it dumps working versions of the files into the AMF-gateway folder on the jboss server (which is aliased as /AMF-gateway). The thing is, every time I restart jboss or deploy an updated AMF-gateway.war file, it gets unpacked into a new temp folder with a new name, and I need to change all the references in the Flex project. This happens several times a day, and it's annoying. Can I streamline this configuration? I tried using an alias to that folder -- figuring I could script the change -- but Flex Builder didn't seem to like it.
If I remember correctly, you can create a directory in JBoss that the server will treat as an exploded war file. I don't have a copy of JBoss handy to check, but I remember creating a directory such as "context-name.war" and being able to develop against that. So instead of copying your packaged .war file to the deploy directory, you could unzip it directly to that directory. If I remember correctly JBoss will monitor the web.xml file for changes and if it's overwritten it will redeploy the context.
Instead of using an XML approach: (i.e. SOAP/WSDL/REST), try using AMF to port to a different gateway such as C# to the database directly.
http://specialmoves.com/labs/code/flash-data-transfer-using-fluorinefx