Carson, Thanks for your reply.
I can connect to the web services as long as there is an active session open, ie: I authenticate through our web gui and keep the browser open. Can you think of a possible work-around where I can authenticate an http session before calling my web services? If I can do this, I won't need to authenticate through the web service. Any ideas? Thanks, Phil --- In [email protected], "Carson Hager" <[EMAIL PROTECTED]> wrote: > > The only way you can do this is through the proxy, unfortunately. I don't know if this is a limitation of the player or the flex framework. I have only been able to coax basic auth using the Socket class but that clearly won't work with web services. > > > Carson > > > > -----Original Message----- > From: [email protected] <[email protected]> > To: [email protected] <[email protected]> > Sent: Thu Dec 14 18:27:13 2006 > Subject: [flexcoders] Re: HTTP Header Web Service Authentication > > Dave, > > I understand that. I need to authenticate using BASIC authentication. > I have form inputs where the user enters their user name and > password. I then use base64 and encode it. > > I am stuck at this point. How can I add in an HTTP header that > includes the encoded authorization string? > > This is my current web service call: > > private function init():void{ > var ws:WebService = new WebService; > var qname:QName = new QName(null, "Authorization"); > var str:String = new String("Basic Y2xhcnVzYWRtaW46Y2xhcnVzYWRtaW4="); > var header:SOAPHeader = new SOAPHeader(qname, str); > > ws.useProxy = false; > > ws.addHeader(header);ws.loadWSDL("http://sc-vmx-03:4040/clarusipc/services/InventoryService?wsdl <http://sc-vmx-03:4040/clarusipc/services/InventoryService?wsdl> "); > ws.makeObjectsBindable = true; > > var op:Operation = ws.getOperation("getPhoneCount") as Operation; > op.arguments.projectId = 1; > op.addEventListener("result", resultHandler); > op.addEventListener("fault", faultHandler); > op.resultFormat= "e4x"; > > var call:AsyncToken = op.send(); > } > > As you can see, I can easily add a SOAP header to the request. > However, this is of no use to me â" I need to send a HTTP Basic > authorization header. > > The header should be in the format "Authorization = Basic > Y2xhcnVzYWRtaW46Y2xhcnVzYWRtaW4=". > > Is this possible? If so, can you provide an example that illustrates > how to add a custom HTTP header into a web service request? > > Thanks, > Phil > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "Dave Wolf" <gatorj24@> wrote: > > > > > > What exactly are you trying to do. You can secure web service calls > > using standard HTTP authentication headers. We do this with both > > BASIC and FORM auth. > > > > -- > > Dave Wolf > > Cynergy Systems, Inc. > > Adobe Flex Alliance Partner > > http://www.cynergysystems.com <http://www.cynergysystems.com> > > http://www.cynergysystems.com/blogs <http://www.cynergysystems.com/blogs> > > > > Email: dave.wolf@ > > Office: 866-CYNERGY > > > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "phipzkillah" <pkrasko@> wrote: > > > > > > Does anyone know if it's possible to add a custom HTTP header to the > > > web service request? > > > > > > All authentication methods described through Flex seem to be oriented > > > around SOAP headers. > > > > > > Can we authenticate a web service through HTTP headers? > > > > > > This has been driving me crazy for the past few days. Any ideas or > > > suggestions?? > > > > > > -phil > > > > > >

