Jamie, Thanks for the fast reply to this problem but it seems like you posted partial code. I feel like you left out some important pieces to the puzzle so I'm confused as to how you're calling your function and what is ModelLocator, ourService and myWebService (I'm guessing the id to the WebService tag?).
Could you fill in the gaps when you have some time? Thanks! --- In flexcoders@yahoogroups.com, "jamiebadman" <[EMAIL PROTECTED]> wrote: > > Here's how I did it a way back... not using this anymore but I'm > pretty sure it worked at the time ;-) > > import mx.rpc.soap.SOAPHeader; > > private function login():void{ > ModelLocator.getInstance().qname = new QName("http://docs.oasis- > open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext- > 1.0.xsd","Security"); > ModelLocator.getInstance().headerSecurity = new SOAPHeader > (ModelLocator.getInstance().qname, > > XML(String( "<wsse:Security " + > " xmlns:wsse='http://docs.oasis- > open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'" + > " xmlns:wsu='http://docs.oasis- > open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility- 1.0.xsd'>" > + > "<wsse:UsernameToken wsu:Id='"+username_ti.text+"'>" + > "<wsse:Username>"+username_ti.text+"</wsse:Username>" + > "<wsse:Password>"+password_ti.text+"</wsse:Password>" + > "</wsse:UsernameToken>" + > "</wsse:Security>")) ); > > ourService.addHeader(ModelLocator.getInstance().headerSecurity); > ourService.myWebService.send(); > } > > Hope this helps. > > Jamie.