Expand my Community achievements bar.

Referencing remote services

Avatar

Level 1
Hi



I'm having some beginner problems. I've setup BlazeDS and
have created my remote service. All works fine when I deploy
everything to the server but I would like to be able to compile my
Flex project and view it locally while calling the remote service
on the web server. I've had success doing this with PyAMF but can't
get it setup with BlazeDS.



From my understanding I need to first edit the
services-config.xml file. I've done this and set it to resolve
my-amf to the server:



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

<endpoint url="
http://combinationstudios.com:8400/samples/messagebroker/amf"
class="flex.messaging.endpoints.AMFEndpoint"/>

<properties>

<polling-enabled>false</polling-enabled>

</properties>

</channel-definition>



However when I compile the app the SWF is still trying to
connect to services locally - when I trace HTTP requests it's point
here:
http://localhost:8400/samples/messagebroker/amf

rather than
http://combinationstudios.com:8400/samples/messagebroker/amf



Is there something in the compiler settings I need to define
or another XML file needs to be configured.



Thank a lot

Ben
3 Replies

Avatar

Former Community Member
Hey ben,



how do you configure your remoteObject in flex?? There is an
endpoint option in there.



<mx:RemoteObject id="ro" endpoint="/aceadmin/weborb.wo"
..... >



Try to set the endpoint to your remote server and see if that
works... I never tried it corss domain, only to point it to a other
service within my own domain.



Ries



Avatar

Level 1
Hi Ries



Thanks for your tip - I missed that one.



Edited: I was having some connection issues but a Tomcat
restart solved them. I have had to add 'localhost' as an authorised
domain which is not good. Any ideas on how I can lock this down but
retain access to the service outside of the domain from my
localhost?



Thanks,

Ben

Avatar

Former Community Member
Hey Ben,



no sorry... I don't know that since I never done it cross
domain.



Ries