4 Replies Latest reply on Nov 5, 2007 12:54 AM by Ivascu Cristian

    Problem with Webservice Introspection Wizard in FB3 beta 2

    Martin-R
      The wizard finishes, and I have a nice set of AS classes from the WSDL. However, when I try and use any of the classes, I get compile errors all over the place.

      Apparently, the wizard creates references to custom events in the main service class like this:



      /**
      * Dispatches when a call to the operation GetUserInfoEx completes with success
      * and returns some data
      * @eventType GetUserInfoExSoapOutResultEvent
      */
      [Event(name="GetUserInfoExSoapOut_result", type="GetUserInfoExSoapOutResultEvent")]

      /**
      * Dispatches when a call to the operation FindUsers completes with success
      * and returns some data
      * @eventType FindUsersSoapOutResultEvent
      */
      [Event(name="FindUsersSoapOut_result", type="FindUsersSoapOutResultEvent")]


      But, no supporting classes for the event types are generated. So, I get errors when the main class tries to do stuff like:



      /**
      * @see IADUtils#addGetUserInfoEx()
      */
      public function addgetUserInfoExEventListener(listener:Function):void
      {
      addEventListener(GetUserInfoExSoapOutResultEvent.GetUserInfoExSoapOut_RESULT,listener);
      }

      /**
      * @private
      */
      private function _GetUserInfoEx_populate_results(event:ResultEvent):void
      {
      var e:GetUserInfoExSoapOutResultEvent = new GetUserInfoExSoapOutResultEvent();
      e.result = event.result as Object;
      getUserInfoEx_lastResult = e.result;
      dispatchEvent(e);
      }


      The addEventListener call and the new GetUserInfoExSoapOutResultEvent generate errors because the compiler doesn't know anything about the custom event types.

      Is this a bug in the wizard, or am I supposed to code those custom event classes myself? And, if I'm supposed to code the custom events myself, are they just normal result events, or is there some additional code I don't know about?

      There doesn't seem to be any good documentation (flex docs, tutorials, sample code, etc) on how to use the code generated by the wizard. Does anyone know of any examples?

      TIA,
      Randy