Hello,

I have a problem to access a WSDL file from Flex's WebService class
over HTTPS on IE.

I have tried using Flex Builder 2 / 3 but the problem is the same. 
The web-server I am using is appWeb.
Note that the same code works ok when I run it over HTTP (both IE and
FF), and also over HTTPS but only from FireFox.
The only problem is running it from IE over HTTPS.
 
Analyzing the tcpdump I have compared the attempt to fetch the SWDL
file from the flex code to a similar request done from the IE
web-browser by typing the WSDL address in the URL field (This works ok
and the browser displays the WSDL file). It seems that after the
initial handshake the TCP connection is closed and the flex code
doesn't open a new connection (like the IE does in the direct attempt).
 
I am using the following lines of code in Flex:
 
var webService:WebService = new WebService();
webService.showBusyCursor = true;
webService.useProxy = false;
webService.wsdl = "https://<IP_ADDRESS>/MyService.wsdl";
webService.endpointURI =
"https://<IP_ADDRESS>/SoapServer.php?serviceName=MyService";
webService.addEventListener(LoadEvent.LOAD, handleLoad);
webService.useProxy = false;

I have received the following error: 
 
[SWF] C:\f2rca\_workspace\List\bin\List-debug.swf - 1,187,356 bytes
after decompression
'DDDB2F4F-F7C5-676C-DDC6-819D636D5140' producer set destination to
'DefaultHTTP'.
warning: unable to bind to property 'callType' on class 'Object'
(class is not an IEventDispatcher)
warning: unable to bind to property 'callType' on class 'Object'
(class is not an IEventDispatcher)
warning: unable to bind to property 'callType' on class 'Object'
(class is not an IEventDispatcher)
warning: unable to bind to property 'callType' on class 'Object'
(class is not an IEventDispatcher)
Initializing WebService:
https://135.64.100.135/SoapServer.php?serviceName=MyService, debug is:
true
Registering schema namespace: http://www.w3.org/1999/XMLSchema
Registering schema namespace: http://www.w3.org/2000/10/XMLSchema
Registering schema namespace: http://www.w3.org/2001/XMLSchema
Registering schema namespace: http://schemas.xmlsoap.org/soap/encoding/
Registering schema namespace: http://xml.apache.org/xml-soap
Registering schema namespace: http://rpc.xml.coldfusion
'971164BA-D5DE-788B-5557-819D668A052A' producer set destination to
'DefaultHTTP'.
'971164BA-D5DE-788B-5557-819D668A052A' producer set destination to
'DefaultHTTPS'.
'3F645199-B68B-75BC-66C6-819D669A66F1' producer set destination to
'DefaultHTTP'.
'direct_http_channel' channel endpoint set to http:
Creating WSDL object for https://135.64.100.135/MyService.wsdl
'C556A8DB-47F4-E47F-5B0F-819D66A92E33' producer set destination to
'DefaultHTTP'.
Loading document https://135.64.100.135/MyService.wsdl for destination
'DefaultHTTPS'
'971164BA-D5DE-788B-5557-819D668A052A' producer sending message
'AB4382D2-D12F-A510-D1FE-819D66A9E2DB'
'direct_http_channel' channel sending message:
(mx.messaging.messages::HTTPRequestMessage)#0
  body = (Object)#1
  clientId = (null)
  contentType = "application/x-www-form-urlencoded"
  destination = "DefaultHTTPS"
  headers = (Object)#2
  httpHeaders = (Object)#3
  messageId = "AB4382D2-D12F-A510-D1FE-819D66A9E2DB"
  method = "GET"
  recordHeaders = false
  timestamp = 0
  timeToLive = 0
  url = "https://135.64.100.135/MyService.wsdl";
'971164BA-D5DE-788B-5557-819D668A052A' producer connected.
'971164BA-D5DE-788B-5557-819D668A052A' producer acknowledge of
'AB4382D2-D12F-A510-D1FE-819D66A9E2DB'.
'971164BA-D5DE-788B-5557-819D668A052A' producer fault for
'AB4382D2-D12F-A510-D1FE-819D66A9E2DB'.
[RPC Fault faultString="HTTP request error"
faultCode="Server.Error.Request" faultDetail="Unable to load WSDL. If
currently online, please verify the URI and/or format of the WSDL
(https://135.64.100.135/MyService.wsdl)"]
 at
mx.rpc.soap::WSDLParser/mx.rpc.soap:WSDLParser::dispatchFault()[C:\dev\enterprise_bali\frameworks;mx\rpc\soap;WSDLParser.as:209]
 at
mx.rpc.soap::WSDLParser/http://www.adobe.com/2006/flex/mx/internal::httpFaultHandler()[C:\dev\enterprise_bali\frameworks;mx\rpc\soap;WSDLParser.as:203]
 at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\dev\enterprise_bali\frameworks;mx\rpc;AbstractInvoker.as:146]
 at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\dev\enterprise_bali\frameworks;mx\rpc;AbstractInvoker.as:195]
 at
mx.rpc::Responder/fault()[C:\dev\enterprise_bali\frameworks;mx\rpc;Responder.as:56]
 at
mx.rpc::AsyncRequest/fault()[C:\dev\enterprise_bali\frameworks;mx\rpc;AsyncRequest.as:107]
 at
DirectHTTPChannel.as$139::DirectHTTPMessageResponder/errorHandler()[C:\dev\enterprise_bali\frameworks;mx\messaging\channels;DirectHTTPChannel.as:323]
 at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()
 at [io]


I also tried replacing the WSDL file with the following php script
(after reading a post on the subject) but it didn't solve the problem:
<?php
 
$browser= (ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['USER_AGENT'])) ?
"IE" : "FF";
ob_end_clean();
if ($browser == "IE")
{
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header('Pragma: private');
}
else
{
    header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
    header("Pragma: no-cache");
    header("Expires: " . gmdate("D, d M Y H:i:s") . " GMT");
}
 
readfile(dirname(__FILE__) . '/MyService.wsdl');
 
?>


Reply via email to