web services - How to pass Authorization header from Flex WebService? -


I have a basic authority mechanism on the server for WSDL / SOAP. How can I send the "authorization" header through Flex WebSaver?

Simple example:

  var ws: WebService = new WebService (); Ws.wsdl = "http: // localhost: 8000 / api / service.wsdl" var Encoder: Base 64 encoder = new base 64 encoder; Encoder.InternetNewline = wrong; Encoder.encode ("SomeUser: SomePassword"); Ws.httpHeaders = {AUTHORIZATION: "Basic" + Encoder.Ststring ()}; Ws.loadWSDL (); Var Operation: Operation = ws.get_info; Operation.send ();  

And I'm getting an error:

  Error # 2096: HTTP request header can not be set through action script.  

Flex applications and servers are in the same domain. Also I have the crossdomain.xml file in the root of the server (), but never called by Flex (I know from the log file). I will provide this file anyway:

  & lt ;? XML version = "1.0"? & Gt; & Lt ;! DOCTYPE cross-domain-policy system "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> & Lt; Cross-domain-policy & gt; & Lt; Allowed-access-domain = "*" /> & Lt; Site-control permission-cross-domain-policies = "all" /> & Lt; Allow-http-request-headers- to domain = "*" header = "*" /> & Lt; / Cross-domain-policy & gt;  

Thanks, Zenovi

I have never had to do Flex First, but what version of the Flash plugin is running? Version 9.0.115.0 blocks the use of that header altogether, while later versions of your cross domain. Allows with Xml configuration.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -