Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make a HTTPS call using HttpService in flex

I want to make an https call using HttpService. My code is working perfect when the url is http, but when i can the url to https is gives me the following error :

[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]

How should I make a Https call??

Regards Zeeshan

like image 583
Zeeshan Rang Avatar asked Jan 13 '10 00:01

Zeeshan Rang


1 Answers

Is your SWF hosted on the same domain? If so, is it being served over HTTPS as well? If the answer is no to either of those questions, you'll need a crossdomain.xml file at the root of the server hosting the service you want to call. You might check out this Adobe article on the subject.

For example, this would allow a SWF served over HTTP on example.com to access HTTPS services on your server:

crossdomain.xml

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM
    "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">

<cross-domain-policy>
    <allow-access-from domain="example.com" secure="false"/>
</cross-domain-policy>

Ensure that the crossdomain.xml file is accessible from the root of your domain (ie: http://myserver.com/crossdomain.xml).

Hope that helps.

like image 147
RJ Regenold Avatar answered Sep 30 '22 13:09

RJ Regenold