1 Reply Latest reply on Apr 19, 2009 1:05 PM by Michael Borbor

    Flex application setup using RemoteObject



         I have been learning flex for some time and now wanna make server side integration. I have to use Remote object and make RPC calls for my java apis. Can someone please send me some link/reference with complete integration details


      1. required compiler arguments

      2. details regarding config files in WEB-INF/flex.



      I followed the points mentioned at this site but am facing some issues. I am getting following error during an RPC call:


      1. failure: Channel.Security.Error error Error #2048: Security sandbox violation:http://localhost.tribalfusion.com:8400/login/SampleLogin.swf cannot load data fromhttps://localhost.tribalfusion.com:8400/login/messagebroker/amfsecure. url: 'https://localhost.tribalfusion.com:8400/login/messagebroker/amfsecure'


      and sometimes I get error that "Cannot connect to swrvice userservicedest"


      Details of project:


      Files in WEB-INF/flex:


      messaging-config.xml, proxy-config.xml, remoting-config.xml, services-config.xml


      1. messaging-config.xml:



      <?xml version="1.0" encoding="UTF-8"?>

      <service id="message-service"




              <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />

              <!-- <adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/> -->




              <channel ref="my-polling-amf"/>






      2. remoting-config.xml:


      <?xml version="1.0" encoding="UTF-8"?>

      <service id="remoting-service"




              <adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/>




              <channel ref="my-amf"/>

              <channel ref="my-secure-amf"/>



          <destination id="userservicedest">







      3. services-config.xml has following code




              <service-include file-path="remoting-config.xml" />

              <service-include file-path="proxy-config.xml" />

              <service-include file-path="messaging-config.xml" />      




      4. Compiler argument: -services "C:\BlazeDS\tomcat\webapps\login\WEB-INF\flex\services-config.xml" -locale en_US



      Please let me know what I am missing and give me some reference.



        • 1. Re: Flex application setup using RemoteObject
          Michael Borbor Level 4

          How did you setup your project? The thing is that your project is an domain1.com and BlazeDS is in domain2.com so Flash Player due to the security sandbox won't allow you to load data from domain2.com so you could go in two ways one is to put your compile flex app in the same directory that your BlazeDS instance or write a crossdomain.xml file.


          I hope that this somehow helps you to solve your problem.