[flexcoders] targetNamespace disappeared in Flex3

2009-02-01 Thread eyal_c
Hi,

I need to fetch the targetNamespace from a WSDL which i loaded into a
WebService object.

In Flex 2 the following code worked just fine:

var webService:WebService = new WebService();
webService.wsdl = URL
...
webService.loadWSDL();
var operation:Operation = webService[webServiceMethodName];

var targetNamespace:String = operation.targetNamespace;

When i converted my project to Flex 3 the last code didn't compile as
it seems that the 'targetNamespace' property was removed from the
Operation class.

Does anyone know how can i get the targetNamespace?

Thanks,



[flexcoders] Re: Failure to access a WSDL file from Flex's WebService class over HTTPS on IE

2008-02-26 Thread eyal_c
Hi All,
I would like to thank all who tried to help, i was finally able to
solve the problem by:
1. Install all 3 FlexBuilder hotfixes.
2. Add the following http headers:
 header(Cache-Control: must-revalidate, post-check=0, pre-check=0);
 header('Pragma: private');
 In two places:
 a. In a php script which returns the WSDL file (see code below).
 b. In the service method which handles the WS calls, i was using PHP
as server side language and the headers should be set right before we
return the result object (inside the class which handles the WS
method) and not in the service PHP script which creates the PHP
SoapServer object.

Thanks,
Eyal






--- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote:

 Hi Eyal,
 
 My direct experience is limited to working with POSTs from IE over
HTTPS. POSTs are not idempotent and are not cacheable according to the
HTTP spec. 
 See section 9.5: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
 
 snip
 Responses to this method are not cacheable, unless the response
includes appropriate Cache-Control or Expires header fields.
 /snip
 
 So one workaround for the IE issue is to always issue POSTs from the
player and not set any cache-related response headers at all. Note
that the player converts POSTs with an empty body to GETs
automatically (which is probably due to bugs in the underlying ActiveX
or Netscape Plugin APIs).
 
 For GETs, I've seen various posts online by people who claim to have
found header combinations to get IE HTTPS with no caching working but
I can't verify any of these for you based on my personal experience.
 
 Good luck,
 Seth
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of eyal_c
 Sent: Wednesday, January 23, 2008 7:50 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Failure to access a WSDL file from Flex's
WebService class over HTTPS on IE
 
 Hi,
 
 I am not sure i understood your reply, as i wrote, I also tried
 replacing the WSDL file with the following php script that handles the
 cache problem (after reading a post on the subject) 
 
 ?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');
 
 ?
 
 This didn't solve the problem... is this what you suggested?
 
 Thanks,
 Eyal
 
 --- In flexcoders@yahoogroups.com, Seth Hodgson shodgson@ wrote:
 
  This is due to a long-standing IE bug with HTTPS and cache-related
 response headers.
  
  If you're not routing your web service invocations through the LCDS
 or BlazeDS proxy service, you'll need to tweak your application server
 to tweak the response headers related to caching if the user agent
 making the request is IE and the request arrives over HTTPS.
  
  Various folks have tried different header settings and combinations
 to work around this. Google for their recommendations.
  
  Seth
  
  
  From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
 On Behalf Of eyal_c
  Sent: Wednesday, January 16, 2008 10:52 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Failure to access a WSDL file from Flex's
 WebService class over HTTPS on IE
  
  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

[flexcoders] Re: Failure to access a WSDL file from Flex's WebService class over HTTPS on IE

2008-01-23 Thread eyal_c
Hi,

I am not sure i understood your reply, as i wrote, I also tried
replacing the WSDL file with the following php script that handles the
cache problem (after reading a post on the subject) 

?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');

?

This didn't solve the problem... is this what you suggested?

Thanks,
Eyal





--- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote:

 This is due to a long-standing IE bug with HTTPS and cache-related
response headers.
 
 If you're not routing your web service invocations through the LCDS
or BlazeDS proxy service, you'll need to tweak your application server
to tweak the response headers related to caching if the user agent
making the request is IE and the request arrives over HTTPS.
 
 Various folks have tried different header settings and combinations
to work around this. Google for their recommendations.
 
 Seth
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of eyal_c
 Sent: Wednesday, January 16, 2008 10:52 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Failure to access a WSDL file from Flex's
WebService class over HTTPS on IE
 
 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

[flexcoders] Re: Failure to access a WSDL file from Flex's WebService class over HTTPS on IE

2008-01-23 Thread eyal_c
Hi,
I already saw this post, and tried to use the php code to return the
WSDL file... but it didn't help.
Thanks,
Eyal

--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED]
wrote:

 On Thursday 17 Jan 2008, Seth Hodgson wrote:
  This is due to a long-standing IE bug with HTTPS and cache-related
response
  headers.
 
 http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=fdc7b5c
 
 -- 
 Tom Chiverton
 Helping to centrally expedite enterprise-class methodologies
 on: http://thefalken.livejournal.com
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in
England and Wales under registered number OC307980 whose registered
office address is at Halliwells LLP, 3 Hardman Square, Spinningfields,
Manchester, M3 3EB.  A list of members is available for inspection at
the registered office. Any reference to a partner in relation to
Halliwells LLP means a member of Halliwells LLP.  Regulated by The
Solicitors Regulation Authority.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above
and may be confidential or legally privileged.  If you are not the
addressee you must not read it and must not use any information
contained in nor copy it nor inform any person other than Halliwells
LLP or the addressee of its existence or contents.  If you have
received this email in error please delete it and notify Halliwells
LLP IT Department on 0870 365 2500.
 
 For more information about Halliwells LLP visit www.halliwells.com.





[flexcoders] Failure to access a WSDL file from Flex's WebService class over HTTPS on IE

2008-01-17 Thread eyal_c
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