I’m trying to access a webservice with an SSL connection from an AIR application, I can access the webservice and retrieve the data without SSL, but when I try and access it through it I end up getting the 2032 Stream Error. As if what I was attempting to access wasn’t available (which in fact it is, since I can easilly access it through my browsers).
I am doing the following:
private var server:String = "";
private var contentType:String = "";
private var method:String = "";
private var connector:connectionTest = null;
private var serverURL:URLLoader = new URLLoader();
public function Connector(a2:String, a3:String, mainClass:connectionTest)
{
server = "url";
contentType = a2;
method = a3;
connector = mainClass;
}
public function callService(callback:String, request:Object):void{
var url:URLRequest = new URLRequest(server);
var encoder2:JSONEncoder = new JSONEncoder(request);
var requestedString:String = "0" + encoder2.getString();
url.contentType = contentType;
url.method = method;
url.data = "callback=" + callback;
url.data +="&request=" + encodeURI(requestedString);
url.authenticate = true;
serverURL.addEventListener(IOErrorEvent.IO_ERROR, treatIO);
serverURL.addEventListener(Event.COMPLETE, loadData);
try{
serverURL.load(url);
}catch(e:ArgumentError){trace("ArgError: " + e.message);}
catch(e:SecurityError){trace("SecError: " + e.message);}
}
private function treatIO(e:IOErrorEvent):void{
trace(e.text);
}
private function loadData(e:Event):void{
trace("loaded");
connector.htmlObject.htmlText = serverURL.data as String;
trace(serverURL.data);
}
explanation: mainClass is an mxml file with just a button and an html object in it.
Note: I have done the recommended thing of adding to Flex the certificate.
Anyone out there that can assist with this?
Edit:
I also tried with the URLStream class and it still doesn’t handle it, seems like I can’t actually get a connection to the server…
Even tho I do connect to it in a browser or even SoapUI
We faced the same problem on some machines (Win7 64bit), unfortunatelly still not solved. Maybe this is relevant:
http://forums.adobe.com/message/4028647#4028647