The new WebService implementation due out soon in Flex 2.0.1 Hotfix 2
(developed during the LCDS 2.5 timeframe) should fix this problem.
 
FWIW, there is a Base64Encoder in rpc.swc that is not yet documented
(but will be in the next version of Flex). Here's how you can use it
now:
 
import mx.utils.Base64Encoder;
 
// ...
 
var encoder:Base64Encoder = new Base64Encoder();
encoder.encode(myPassword);
var encodedPassword:String = encoder.drain();
 
 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jamiebadman
Sent: Friday, May 04, 2007 6:46 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Setting ByteArray to a specific string value ?



Ok, I'm not even sure if the topic is right... here's what I'm 
trying to do...

I need to call a webservice which has as a parameter a base 64 
binary field. This needs to contain a password field in an encrypted 
(string) form. This has been provided to me as a string and it is 
this exact value I need to send to the webservice.

So I tried first sending it as a string but when I run ethereal 
(which shows me what's actually being sent to the webservice) I see 
that no data is being sent for the password.

So I tried using ByteArray instead - and this shows data being sent -
but not the data I tried to store in the ByteArray... I tried 
storing the string into the ByteArray using writeUTF, 
writeMultiByte, looping through the string and storing each char 
code in each ByteArray element... no luck as yet - the value of the 
ByteArray being sent to the Service always seems to have a value 
different from the value I'm trying to set it to!

I'm certain this is a case of pure ignorance on my part - does 
anyone both understand what I'm trying to do and also understand why 
it's not right ?! If so... help!!!!

Thanks,

Jamie.



 

Reply via email to