2 Replies Latest reply on Jun 2, 2009 6:28 AM by Peter Farland

    endpoints for remote objects...

    l_r_larson Level 1

      Hello --

       

      This is all very exciting....

       

      How do the endpoints work within the declarations tag when you create the service through the Data/Services panel? For example, I have a working ultra simple demo that uses this:

       

      endpoint="http://localhost:/flex2gateway/"

       

      If I change that to:

       

      endpoint="http://127.0.0.1:/flex2gateway/"

       

      I get a send failure. Since I would need to change the endpoint if I were to deply to a production server, it would have to change obviously.

       

      I am missing some key part of this new paradigm -- what is it?

       

      Larry Larson

       

      NYC

        • 1. Re: endpoints for remote objects...
          Sreenivas R Adobe Employee

          Hi,

           

          We are still working on the export feature to support moving the application a production server.

           

          Have you tried removing the colon in the URL ?

           

          Thanks

          Sreenivas

          • 2. Re: endpoints for remote objects...
            Peter Farland Level 3

            Hi Larry,

             

            The Flash Player does not let you contact a domain other than that which was used to load the SWF (to avoid this restriction your remote server has to host a crossdomain.xml policy file allowing the domain hosting your SWF to contact it). This domain matching is a strict comparison and does not use DNS lookup to check that 127.0.0.1 is the same as localhost. E.g. if you loaded a SWF from http://localhost/myapp/myapp.swf you could not contact http://127.0.0.1/flex2gateway/ unless there was a http://127.0.0.1/crossdomain.xml file that allowed SWFs served from the localhost domain to contact it.

             

            That said, if you are sure that you will host your SWF on the same domain as your flex2gateway, then you could make use of the {server.name} and {server.port} tokens instead as these will be replaced by RemoteObject at runtime with the corresponding values in the URL used to load the SWF. Can you try this:

             

            endpoint="http://{server.name}:{server.port}/flex2gateway/"

             

            You may also want to consider whether you need to use a secure https connection to contact the flex2gateway. If you do need to use https your SWF must also be loaded via https (unless you want to set up a crossdomain.xml file and relax this restriction for the localhost domain and set secure="false", although this is not recommended in production).

             

            Rgds,

                Pete