Hi,
I just had a discussion with a developer who currently works on a flash application which uses the API to pull data in.
It works fine in the developer verions, but does not get any data in a normal player. Due to the developer this is caused by the missing crossdomain.xml on the ws.webtrends.com server. Does anyone have the same experience and ideally a solution?
@Webtrends: Can you please verify that and place a crossdomain.xml on your server?
Meanwhile I found out that this definitly this is the problem.
Hope we get it soon on the ws.webtrends.com as it is present on the statse.webtrends.com anyways.
Hi Eric,
sounds good. Do you already have a rough timeline, by when it will be available?
Cheers
Sebastian
Hi Eric,
was good to meet you in person at the engage.
Sadly I can not access the http://ws.webtrends.com/crossdomain.xml from here - can you?
Btw. will you gather the projects from the developer day and present them here? Would be good for new ideas and a starting point for own projects!
Hi Sebastian, sorry for the delay here. We had deployed the xml file to each path, but hadn't deployed it to the root directory. This has now been done, so you can now access the crossdomain.xml directly via the root (eg, http://ws.webtrends.com/crossdomain.xml).
Thanks for your patience, and let us know if there's anything else you need.
Hi Eric,
thanks - already got a mail from Matt letting me know it is online.
Now I just need the developer to adjust the path and we can start using the Flex Dashboard tomorrow ![]()
Sebastian
An easier resolution to this is for the client to put a proxy page and crossdomain.xml on their server. In other words - just a simple relay page that will push the api call and get the response. As well, this is a best security practice since you don't want to embed credentials within a flash or AIR file - which are easily hacked.
So - build a proxy page that holds your credentials and passes the data. Put up a crossdomain.xml file on your server. Then point your flash file to the proxy page on your own server. A proxy page is simple to build, just grab the post and then send the API call and echo the response. If you do want to save credentials in flash or AIR, use some kind of encrypted key that your proxy page will authenticate.
I would not advise Webtrends to put a crossdomain.xml file on their site since this would enable anyone to distribute a flash file with credentials in it. It's a security risk waiting to happen.
Hi Douglas,
sounds sensible - especially the security part.
Do you have the code for such a proxy page at hand accidentially? Would be great if you could share it as I currently don't know how it should look like.
Especially I do not understand why it should work with an proxy page if it is not working from Flash directly? Could you explain a bit more please?
Sebastian
Hi Sebastian,
It would depend what language you're programming in. I'm often working in PHP, so I build a proxy.php file on the server where the Flash app is loading from. I post the API request from the flash file to the proxy page without credentials. The proxy page adds the user credentials and passes the request to the API. The response is simply echo'd back by the proxy.php page. If you're working in PHP, I've attached a PHP file that would work - you just need to pass the Webtrends API request URL to it.
Cheers!
Doug
Hey,
thanks Douglas. Will try it on our servers next week.
The client will change the server infrastructure in two weeks and were not able to let me know if PHP will be available.
But the PHP code is a good basis to build upon anyways.
Sebastian