2 Replies Latest reply on Sep 15, 2012 7:45 AM by ferry 77

    How to access SOAP web service with authentication, HTTP basic Authentication

    ferry 77

      Dear All

      i use Flash Builder 4.5, flex 4..1, i am developing a flex client to soap webservices hosted over Glassfish 2 Java server, the web services is protected by HTTP Basic Authentication, everythime i run my code , the prombt for username and password show up, i need to pass user name and password through action script, i followed the flollowing (but was for http web service, not soap) but really did not work.


      http://stackoverflow.com/questions/490806/http-basic-authentication-with-httpservice-objec ts-in-adobe-flex-air





      private function authAndSend(service:HTTPService):void
      var encoder:Base64Encoder = new Base64Encoder();
      .insertNewLines = false; // see below for why you need to do this

      .headers = {Authorization:"Basic " + encoder.toString()};                                               



      Also i noticed in debug mode, always that WARNNING raised up


      Warning: Ignoring 'secure' attribute in policy file from http://fpdownload.adobe.com/pub/swz/crossdomain.xml.  The 'secure' attribute is only permitted in HTTPS and socket policy files.  See http://www.adobe.com/go/strict_policy_files for details.





      any idea ?