wood burning stoves 2.0*
The moose likes Flex and the fly likes Flex to web service communication problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Flex
Bookmark "Flex to web service communication problem" Watch "Flex to web service communication problem" New topic
Author

Flex to web service communication problem

Goran Markovic
Ranch Hand

Joined: Sep 26, 2008
Posts: 399
Hi, just as title state, I have problem during web service --> Flex communication.
I am using WebService ActionScript class, to make a connection to it, but I got some odd behavior.
When I try to access remote web service (particulary : http://109.74.206.146:8080/jax_ws/quarkservice?wsdl ) from my Flex Builder IDE, everything is fine. Even more, when I goes to my project folder and click ProjectName.swf file, without any server running on my pc, the file is executed, communication with web service is faultless performed, and response is retrieved.
However, when I try to export as a build release, and to engage it to my localhost Tomcat, or if i try to copy ProjectName.swf to any another location on my had drive, from the project place, where is stored, I got :




So, the same file engaged from the FlexBuilder or directly invoked from the project's folder, where it reside, works perfectly.
When I try to invoke it from ANY OTHER location, including deployment on my local Tomcat (or even simply from my desktop), I got the exception above.
So, does anyone know what is the problem?
Thanks
Goran Markovic
Ranch Hand

Joined: Sep 26, 2008
Posts: 399
Hi. I thought that was only when I access the web service, outside localhost, but also error occurs when I try to access also the Servlet, outside the localhost ( my faultHandler is invoked, when I try that).
I do not get it, what is a problem, since I can access everything from my Flex Builder, but cannot anything outside of it?
Goran Markovic
Ranch Hand

Joined: Sep 26, 2008
Posts: 399
Hi. Just to provide a solution, if anyone else encounters the same problem.
The crossdomain.xml file, with a following content :


should be stored on application server, where from the service/servlet is provided by. In the case of Tomcat, this file SHOULD NOT be stored, into the root of the application, which we are invoking (I though it should stay there, logically) but it stays inside ROOT folder (cute, isn't it ).
In the case of another application servers, like JBoss, I believe (not test), that this file (crossdomain.xml), should stay inside 'default' folder (as a default configuration instance of JBoss), but I haven't test yet.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Flex to web service communication problem