0 Replies Latest reply on Sep 20, 2007 11:03 AM by Lucas_Marti

    Application freezes with WebService

    Lucas_Marti
      Hy,
      I'am trying to connect to a WebService of SAP. This works fine as long as I launch the application
      with the FlexBuilder. When I move the Project directory to another location and lauch it in IE or
      Firefox, the application freezes when invoking the webservice operation....

      here is the code I use:


      public function myClass(){
      ...
      webService = new WebService();
      webService.wsdl = "...";
      webService.endpointURI = "...";
      webService.loadWSDL();
      ...
      }

      public function getWSTranslation(trans:Translation):void{

      translation = trans;
      operation = webService.getOperation("_-ITIES_-FM_KOJEFXWS_TRANS_GET");
      //var token:AsyncToken = operation.send();
      try
      {
      token = operation.send(); // cursor.moveNext();
      token.addResponder(new ItemResponder(getWSTranslationResult, webServiceFaultTranslationHandler));
      }
      catch(e:Error)
      {
      //e.addResponder(new ItemResponder(getWSTranslationResult, webServiceFaultTranslationHandler));
      }

      // token = operation.send();
      // token.addResponder(new ItemResponder(getWSTranslationResult, webServiceFaultTranslationHandler));
      }

      public function getWSTranslationResult(data:Object, token:Object):void{
      if(data is ResultEvent)
      {
      translation.translationLoaded(data.result.toString());
      }
      else
      {
      logger.log("listResult: Unexpected result");
      }
      }

      public function webServiceFaultInfrastructureHandler(error:Object, token:Object=null):void
      {
      trace("MyWebServiceInterface.webServiceFaultInfrastructureHandler");
      }


      I've also tried the version in comment //.

      unfortunately none of the two handler methods is invoked.

      Is it a question of the security settings? I download an image from the same source with a SWFLoader, which works fine.

      Thanx

      Lucas