1
votes

I've got an HTTP service I defined in Flash Builder, via the "Data Services" tab. I've got an absolute URL in there right now.

What I really want is to not define a path that includes a domain name at all--I want the service to simply call an absolute path that's on the same domain as whatever domain the SWF was served from... can I do that? When I got rid of the base URL and then gave an absolute URL path (e.g., /roster/deleteMember), Flex Builder complained that "File does not exist." Well, of course it doesn't exist, it isn't a file, it's a URL to a service call--there is no corresponding file on the filesystem.

Can anyone advise me how to do that? If I change the domain name, it wipes out all the parameter definitions for the methods, so I have to go back to each method and setup the parameters again. Rather a headache.

Now, I would have thought this would work. from the adobe documentation:


The configuration files sometimes contain special {server.name} and {server.port} tokens. These tokens are replaced with server name and port values based on the URL from which the SWF file is served when it is accessed through a web browser from a web server. Similarly, a special {context.root} token is replaced with the actual context root of a web application.


So, if you specify the endpoint as http://{server.name}:{server.port}/{context.root}, then automatically on runtime, the variables are set by the flashplayer depending on where you've been downloaded the application.

Sounds great... but it's not working for me. I can't even set those values in the Flash Builder Data Services tool. Here's a recording of what I'm getting.

http://screencast.com/t/MTk0NzNiYzY

1
Here's what the Data Services window shows the configuration of my service. I would have posted this inline in my question, but Stack Overflow will only let me post one link and no images since I'm a new Stack Overflow user. i.imgur.com/JTpPA.pngJosh

1 Answers

0
votes

I'm not sure it's possible from the DS window.

If you were doing it in code, you could use Application.application.url to get where the swf had been loaded from.