0 Replies Latest reply on Sep 19, 2007 12:01 AM by Kyus

    Invoking Secure WebService

    Kyus
      Hi all,

      I have a webservice listening for request, and a flex application that invoke the webservice. The problem is the webservice is secure and requires user credentials when invoking its webservice operation.
      Now in Flex, if I don't specify the user credential, it will automatically prompt me with a dialog to provide username and password, and it works fine. However, the solution that I am hoping is able to provide the username and password in advance before the actual invocation.

      According to the documentation I have read so far, there is methods in mx:WebService "setCredentials()" and "setRemoteCredentials()". And the method will only work when the flag "useProxy" is set to true. I have done all that, and still it doesn't let the invocation through. And worse, now it is throwing me run time Action Script error:

      [RPC Fault faultString="[MessagingError message='Unknown destination 'DefaultHTTP'.']" faultCode="InvokeFailed" faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL ( http://localhost:8080/services/MyWebService?wsdl)"
      at mx.rpc.soap::WSDLParser/::dispatchFault()
      at mx.rpc.soap::WSDLParser/ http://www.adobe.com/2006/flex/mx/internal::httpFaultHandler()
      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()
      at Function/ http://adobe.com/AS3/2006/builtin::apply()
      at mx.rpc::AsyncDispatcher/::timerEventHandler()
      at flash.utils::Timer/flash.utils:Timer::_timerDispatch()
      at flash.utils::Timer/flash.utils:Timer::tick()

      Any helps will be really appreciated.

      K