0 Replies Latest reply on Mar 1, 2012 3:51 AM by ravi7april

    flex4.5 to Java communication problem

    ravi7april

      Hi All,

       

      Realised this problem very common in flex technology, but no where i found solution, here is my problem:

       

      My Java code is deployed on Websphere application server6.1, including JSPs.

      Flex, js, html, jpg are placed on Apache Tomcat webserver.

       

      At runtime, JSP is loading swf file and swf has to invoke java code to get data and display.

      swf to java invocation is not happening, because of that we are getting blank swf file.

       

      We have services-config.xml (in .ear file on WAS)

      <channel-definition id="unsecured-amf" class="mx.messaging.channels.AMFChannel">

      <endpoint url="http://{server.name}:8080/cr/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>

      <properties>

        <add-no-cache-headers>false</add-no-cache-headers>

      </properties>

      </channel-definition>

       

      for swf i have provided compiler arguments as:

      -services "C:\Development\WEB-INF\flex\services-config.xml" -locale=en_US,de_DE -allow-source-path-overlap=true -source-path=locale/{locale}"

       

      In Action Script:

      public function getContent(contentIds:String):AsyncToken{

            Alert.show("from getContent");  

            token =homePageContentService.getContentIds(contentIds);   

         

          return token;

      }

       

      Alert.show("from getContent");   - is showing up message, but getContentIds(...) method on Java side is not getting invoked.

       

      http://localhost:8080/cr/messagebroker/amf - is showing blank page, i assume there is no problem here.

      http://localhost/messagebroker/amf - 404 error - could be the problem here ?

       

      Please suggest where i am doing wrong, let me know if you need any more info.

       

      Regards,

      Garlapati