0 Replies Latest reply on Aug 30, 2007 10:50 AM by drama1628

    Flex app not returning string value

    drama1628
      Hi guys,

      I am new to flex. I have been working on this issue for several days. I was able to get fds working with tomcat. I was able to get a custom flex app(very simple one which contains only a button) to display on the browser running off apache. However, when I press the button, it is suppose to call the java method to return a string value. Nothing returns when I press the button. Is there something wrong?

      This is my java:

      public class Test
      {
      public static void main( String[] args )
      {
      new Test();
      }

      public Test()
      {
      System.out.println("Method return value:" + getReturnValueFromMethod() );
      }

      public String getReturnValueFromMethod()
      {
      return "123456abcdefg";
      }
      }


      This is the mxml:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="vertical">
      <mx:RemoteObject id="myRemoteObject"
      destination="demoService"/>
      <mx:Button label="Get String" click="myRemoteObject.getReturnValueFromMethod()"/ >
      <mx:Label text="{myRemoteObject.getReturnValueFromMethod.las tResult}"/>
      </mx:Application>


      Does anyone have any ideas? please help

      Thanks