I want to connect a Flex application to my Java services.
So I tried the "hello world" of GraniteDS:
It works perfectly.
Now, more complicated, I want to use MY services
a. I put my jar in lib directory
b. I update my services-config.xml with a new destination (my service)
c. I update the HelloWorld.mxml of the example:
<mx:RemoteObject id="srv" destination="myService" />
<mx:Panel styleName="Panel" title="Hello World Sample">
<mx:Label text="Enter your name:"/>
<mx:TextInput id="nameInput" />
<mx:Button label="Say Hello" click="srv.myMethod(nameInput.text)"/>
I have one very important question:
myMethod has complex objects in parameters, not a simple String like the
example. It has in parameter one Java object that I made: "MyMethodRequest" and
this object has several attribute like login, password, locale and timezone. So
the question is: how can I call myMethod in Flex (with good param, not
"nameInput.text" param)? Morevover, I prefer to do that in Proxy.as rather than
mxml (I use PureMVC architecture)
If you have the solution, thank you very much!