2 Replies Latest reply on Mar 24, 2008 8:22 PM by drsoldat

    Desperate for help with Flex app against ASP.NET webservice...

    drsoldat
      Dear God... please somebody help me...

      I just spent 1.5 hours on the phone with Adobe just to find out that any real flex tech support will set me back another $1200...

      Here is my request...

      I simply want to build an simple interactive application that feeds off of my existing ASP.NET web service.

      I found a Flex sample on the web and edited it only modestly to look as follows:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
      <mx:WebService id="MS" wsdl=" http://XINONIXLT01/MacroService/Core.asmx?WSDL" showBusyCursor="true" useProxy="false">
      <mx:operation name="EnumProviders">
      </mx:operation>
      </mx:WebService>
      <mx:VBox>
      <mx:Button click="MS.EnumProviders.send()" width="93"></mx:Button>
      <mx:Label text="{MS.EnumProviders.result}" x="26" y="42" width="558" height="350"></mx:Label>
      </mx:VBox>
      </mx:Application>

      Notice that the WSDL file is totally accessible and that EnumProviders takes no input parameters and simply returns a string.

      When I run the application I get the following error:

      [RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL ( http://XINONIXLT01/MacroService/Core.asmx?WSDL)"
      at mx.rpc.wsdl::WSDLLoader/faultHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\ws dl\WSDLLoader.as:98]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:\dev\3.0.x\frameworks\pro jects\rpc\src\mx\rpc\AbstractInvoker.as:168
      at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::faultHandler()[E:\dev\3.0.x\frameworks\project s\rpc\src\mx\rpc\AbstractInvoker.as:220
      at mx.rpc::Responder/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Responder.as:49 ]
      at mx.rpc::AsyncRequest/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest .as:103]
      at DirectHTTPMessageResponder/securityErrorHandler()[E:\dev\3.0.x\frameworks\projects\rpc\sr c\mx\messaging\channels\DirectHTTPChannel.as:368]
      at flash.events::EventDispatcher/dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at flash.net::URLLoader/redirectEvent()

      What is the problem? What am I doing wrong?

      Please note that this web service is mature and all functions have been tested thoroughly...

      Any help would be greatly appreciated...

        • 1. Re: Desperate for help with Flex app against ASP.NET webservice...
          ntsiii Level 3
          "...Security error ..." Typically indicates a security problem.

          Do you understand about the Flash Player security sandbox architecture, and crossdomain.xml policy files?

          Some additional observations:

          I advise setting resultFormat="e4x" and working with XML. The default causes Flex to create a tree of dynamic objects. This is rarely the best solution.

          When binding to a result (which I strenuously advise against) use "lastResult":
          text="{MS.EnumProviders.lastResult}"

          With binding, once you get the security issue behind you, if your data does not display, you are screwed. There is no way to debug the problem.

          Instead, use a result handler function. First, you will know your call has returned. Second, you can inspect the format using toXMLString(). Third, you can craft and test the dataProvider and dataField specifications. And do other stuff too.

          Do make sure you can hit the ?wsdl from a browser.

          I am using .net weservices with Flex fairly heavily at the moment.
          Tracy
          • 2. Re: Desperate for help with Flex app against ASP.NET webservice...
            drsoldat Level 1
            YES! thanks you saved me... I made my way through the troubles with bits and pieces of your response... it all works now.

            And not a moment too soon as I was just about to be forced to punch myself in the coxsackie!!!

            Thanks again
            Dr.