This content has been marked as final. Show 3 replies
Unfortunately, with Flex 2 - connecting to a Java application server is a little more involved.
You need to have a java application server setup, have your flex application in a war file/directory and have Flex 2 Data Service s installed on your applicaiton server. You need to edit two configuration files service-config.xml and remoting-config.xml and add them to your flex war. Then, in your flex mxml code you can have the following:
fault="mx.controls.Alert.show(event.fault.message, 'Remote Object Error')">
<mx:method name="getInitDataFor" result="someMethod(event);"/>
Then in your action script:
You'll then recieve the reply at:
public function someMethod(event:ResultEvent):void
var result:* = event.result;
This is, of course, a very high level overview.....
your best bet is to go through the Flex Data Services documentation for the whole set up. The Flex 2 Developers Guide has a chapter on how to set this up - http://www.adobe.com/support/documentation/en/flex/
Lots of useful information there, I really appreciate it!
I have been on this for a week now, and it's not easy :-(
I have installed the Flex 2 Data Service, and it's running on a jrun4 application server on my windows machine. The application that I'm trying to connect to is on an oracle server with an j2ee root defined on it.
So the defaultGatewayUrl is then set as a channel or someting in the xml files that You mentioned?
The part with the flex war I did't understand, but perhaps the documentation is the best way as You wrote.
Thanks a lot! (and more information is appreciated, from You Andy or others with same issues :-) )
How should the service-config.xml and remoting-config.xml look like, when I have a java application lying on a server with this address: http://myserver:7778/myApp ?? And where is the formProviderRO set? My last question is about the war file. When I made the project in Flex I chose the 'Compile application locally in Flex', how will the change in the xml-files then take place?
Hope You can help me awclemen :-) (Or others!)