Adobe Connect User Community
Menu

#1 2014-12-16 01:28:56

kvb1111

Not able to connect web service API from Flash application

Hi,

i have developed a flash application (SWF) and uploaded to one meeting in adobe connect. Users could able to access the flash application. My Flash applications supposed to know the user details who currently logged in. For that i tried to get the user info from my flash file using Web servicee API. But i am getting the below error.

Request for resource at http://xxxx.adobeconnect.com/api/xml?action=common-info by requestor from file:///C|/Users/xxxxxxxx/Documents/flash%20projects/service1.swf is denied due to lack of policy file permissions.

I have done a bit research and hoping that problem with cross domain file. Can you please help me what might be the problem? and how i can update cross domain file?

NOTE : when i try the same api call in browser and also from .net programs i could get the results. When i send request from flash file then only getting error. At the same time i could get the data from my own web service using the same flash file.

Thanks..

Offline

#2 2014-12-16 10:58:19

Jorma_at_CoSo

Re: Not able to connect web service API from Flash application

I think you would find the Collaboration Builder SDK more useful when creating a custom Flash application to run in a Connect meeting.

http://www.adobe.com/devnet/adobeconnect.html/

When making API calls, you (or the application) should be logged into Connect with Administrator rights. Users in the room (especially guest users) will have limited abilities to make API calls, so that could be part of the problem in their instance of your SWF.

Offline

#3 2015-01-26 13:50:07

develliot

Re: Not able to connect web service API from Flash application

What Jorma said,

If you are having any issues with the cross domain policy then if you make a custom pod and log in with the custom pod then you are loading code from and calling the API on the same domain.

To check if your xdomain policy has any weird config you can check it here:

https://xxxxxxx.adobeconnect.com/crossdomain.xml

To get started with custom pods I recommend this video it explains how make them, if you understand flash and as3:

https://www.youtube.com/watch?v=oz4vRIBTy3k

I don't know why you are getting issues because I can hit my API with a local AIR app a local flash app running in a browser and flash custom pod in a virtual room with no issues:

I used a pattern to log in that looks like this:

cookie is the string I get from common-info

public function login(userName:String, password:String):void
        {
            setDomainAndServerURL();
            
            var loader:URLLoader = new URLLoader();
            var req:URLRequest
          
            
                req = newURLRequest(_connectServerURL+LOGIN_URL+"&domain"+_domain+"&login="+userName+
"&password="+password+"&session="+_cookie);
            
            
            req.method = URLRequestMethod.GET;
            req.contentType = "application/x-www-form-urlencoded";
            loader.addEventListener(Event.COMPLETE, logInSuccess);
            loader.addEventListener(IOErrorEvent.IO_ERROR, ioError);
            loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityError);
            //finally send (or load) the request
            loader.load(req);        
        }

I would feel more comfortable getting it working with HTTP POST but I couldn't get that working with POST. If any one else has please let me know.

Offline

Board footer