0 Replies Latest reply on May 4, 2012 5:26 AM by SJ_FR

    BlazeDS - Setting the messagebroker/amf endpoint




      I know that this issue is widely happening but the things i found the web didn't help me so here is my case:


      I got two flex/J2EE projects, one already using BlazeDS, the other one should be upgraded to use BlazeDS.

      Both project's structures are nearly the same, so i decided to mimic what was done on the first, adapt it on the second project, but i don't master BlazeDS subject at all.


      The trouble is that Tomcat is deploying the endpoint of amf to the following URL:




      This is set in the services-config.xml file with this tag:

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

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



      The trouble is when i'm trying to use this, Flex is calling on the wrong URL: http://localhost:8080/WebContent/messagebroker/amf and so i get a 404 error.

      I don't understand why.

      The call is performed in two ways:




      import com.farata.collections.DataCollection;


      var collection:DataCollection = new DataCollection();



      collection.autoSyncEnabled = false;

      collection.autoSyncSubtopic = myTemplate;

      collection.autoCommit = false;




      <mx:Consumer id="updatesConsumer" destination="myChart.fill" message="refreshData(event);"/>


      Both ways fail.

      The weird thing is that i really mimiced the configuration of the first project which works, but no way to get it working...


      Does someone have a clue about this thing?


      Thank you by advance for your support,