Thursday, July 5, 2007

https webservice issue( bug fixed)

problem:

Steps to reproduce:

Call a webservice via https, via either an MXML component or pure Actionscript.

I'm not using FDS/LiveCycle, I have crossdomain.xml setup properly and it all works fine in Flex 2. It also works fine via http in Flex 3; it's just https that's the problem.

Actual Results:

[RPC Fault faultString="[MessagingError message='Destination
'DefaultHTTPS' has no channels defined and the application does not
define any default channels.']" faultCode="InvokeFailed"
faultDetail="Unable to load WSDL. If currently online, please verify
the URI and/or format of the WSDL


Expected Results:

Data should be returned from the webservice as it does over http


Workaround (if any): None. Setting useProxy to false programatically doesn't work.

see ref: here

solution:

quote:
In your pure AS case, you're calling useProxy=false BEFORE setting the wsdl property,
the work around requires that it is always set useProxy=false AFTER setting the wsdl
property (and BEFORE calling loadWSDL()).


in our case :
we have to change
authenticateService.wsdl = AUTHENTICATION_SERVICE_WSDL;
authenticateService.loadWSDL( );
to
authenticateService.wsdl = AUTHENTICATION_SERVICE_WSDL;
authenticateService.destination = "DefaultHTTPS";
authenticateService.useProxy = false;
authenticateService.loadWSDL();
authenticateService.addEventListener("fault", httpFault);


ref here

1 comment:

Eric said...

Thanks for the tip - after an hour of frustration, I found your post and it saved me. Thanks!