Cannot access SOAP service when Flex 3 app is compiled - apache-flex

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

Related

service discovery during "Add Service Reference"

i'm building an Asp.Net app (contains the service) with Silverlight control (need to use the service) and having a problem after i discover the service and press OK button, can anyone help me please?
Try/Check the following:
Your service project is being properly build with no errors.
There is no other IIS / IIS express servers running in background.
Try to open the service address that you are trying to consume in the browser and see if it is loaded OK.
This should give you a lead on the problem.

Flex app not hitting web service

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

Flex web services and reverse proxy

I have a similar problem to the one described here and I found the answer here to be helpful but I have a few more questions.
I've setup my project using Flash Builder 4 and imported my WSDL using the web service wizard making sure I pointed to the WSDL on the proxy. However simply doing that and enabling the "ProxyPreserveHost" directive did not allow the web services to run from the application being run on the proxy server. They just hang with no error or response.
So in addition to this I added this line of code to the service class that the Flash Builder wizard created:
_serviceControl.endpointURI = "https://site.mycompany.com/MyService/MyService";
This fixed the problem but I'm not sure as to why this is a problem in the first place. The location in the WSDL is specified to be http://site.mycompany.com:80/MyService/MyService and the server should be processing that request and converting it to https.
Anyone have any ideas or examples of how to get a Flex app built in Flash Builder working with a reverse proxy in place?
Thanks!

Flex SWF not running after bring out from the Flex builder

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.

How to test Vkontakte application with local WS?

I've developed a Vkontakte application by using Adobe Flex technology with WCF as my server side. The whole thing works perfectly on localhost, but after uploading it to Vkontakte - the WS doesn't seem to work and I get this error:
faultCode:Channel.Security.Error faultString:'Security error accessing url' faultDetail:'Destination: DefaultHTTP'
How can I solve this problem? How can I test my application on Vkontakte while the WS are still referring to localhost?
It appears that I should have used the crossdomain.xml file to enable the flash file to interact with outside domains.

Resources