Try this:
// SOAP Request
var thisXMLReq:String = '<?xml version="1.0" encoding="utf-8"?>' +
'<SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body
xmlns:ns1="http://cfc"><ns1:authenticateUser
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><username
xsi:type="xsd:string">username</username><password
xsi:type="xsd:string">password</password></ns1:authenticateUser></SOAP-ENV:Body></SOAP-ENV:Envelope>';
// SOAP Request Length
var SOAPReqLen:Number = thisXMLReq.length;
// Basic authentication encoded
// see http://www.securitystats.com/tools/base64.php
var basicAuthVal:String = "B64BlahB6Blah="; //Base64 encoded string of
username:password
// add SOAP Headers
var SOAPHeaders:Array = new Array("Authorization", "Basic " +
basicAuthVal, "SOAPAction", '""', "Content-Length", SOAPReqLen, "",
"UTF-8", "Content-Type", "text/xml-SOAP; charset=utf-8");
// SOAP Request XML
var myXML_xml:XML = new XML(thisXMLReq);
// Add HTTP Headers for SOAP Request
myXML_xml.addRequestHeader(SOAPHeaders);
// XML Container for server response
var myXMLResponse_xml:XML = new XML();
// response load acton
myXMLResponse_xml.onLoad = function(success:Boolean){
trace(success);
trace("result: " + myXMLResponse_xml.toString());
};
// trigger SOAP call
myXML_xml.sendAndLoad("http://www.myserver.com/usermgmt.cfc",
myXMLResponse_xml);
I just found that on the Adobe livedocs. I'm not sure why the
username+password is base64 encoded but you might try a plaintext
version and if that doesn't work, base64 encode it.
Hope this gets you SOMEWHERE. Let us know!
On 12/18/06, Lori <[EMAIL PROTECTED]> wrote:
Yep, according to the programmer who is handling the webservice
programming he is using Windows Authentication to handle username and password.
There should be (hopefully) a way to call the webservice and send the required
authentication information, but i just dont see any example for how this can be
done with AS.
Thanks everyone for your help so far...
L-
----------------------------------------
From: "Merrill, Jason" <[EMAIL PROTECTED]>
Sent: Monday, December 18, 2006 4:26 PM
To: Flashcoders mailing list <[email protected]>
Subject: RE: [Flashcoders] Password Protected Webservice call - Help Please!
>>Seems to me like you could do the same thing without PHP at
>>all. Just use the username:[EMAIL PROTECTED] syntax in your AS
>>when making the web service call. The host browser should
>>send along the login with the request.
Jpsh if you look at my post a little closer, I wasn't suggesting PHP at
all - just showing an example of how it's done with PHP, therefore they
way it possibly translates to actionscript, (which is the same thing you
now posted), which Lori said was already tried and failed.
Jason Merrill
Bank of America
Learning & Organizational Effectiveness
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
--
Jordan Snyder (jordansnyder.com)
Applications Developer
Image Action LLC
http://www.imageaction.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com