Another developer and I worked thru this function and really had a hard time making heads or tails of everything. In my first post I added a working version from Flash MX Pro. I just need to pass a username and password (hard coded in the AS) to the webservice in order to retreive the XML. Any more help would be much appreciated. We've been trying to work this our for quite a while now.
Thanks, Mark --- In [email protected], "Mark" <[EMAIL PROTECTED]> wrote: > > 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 [email protected], "jamiebadman" <jamie.badman@> > 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. >

