Feb 21 2008

SOAP headers in Flex and WS-Security

Tag: FlashSven Dens @ 5:00 pm

Dear readers,

I just spent 2 entire days trying to figure out how to consume a SOAP Webservice that requires a SOAP-header and WS-Security in Flex. Hopefully this post will help you out if you’re looking to do the same thing.

Download demo files here.

Let me start off by saying that the Import Web Service (WSDL) wizard in Flex 3 doesn’t work as it should!
The generated classes return invalid XML to the SOAP-request, and adding headers to your request is completely neglected.
But I did get it to work using the classical <mx:Webservice> tag and some hand-coding.

Here’s how to do it:

Continue reading “SOAP headers in Flex and WS-Security”


May 22 2007

Email and cell phone validation in AS2 and AS3

Tag: ActionScript, FlashSven Dens @ 4:04 pm

I just wrote 2 simple classes to validate email addresses and Belgian cell phone numbers in AS2 and AS3.
Might come in handy for you, they’re available for download here.

I included FLA’s for Flash8 and FlashCS3 for AS2 and AS3.
They show 2 TextInput components, one for an email address and one for a cell phone number.
The cell phone validation includes a “strip” function. Since people tend to enter their phone numbers in different ways, dots, blanks and slashes are removed from the input before validating the number.

Continue reading “Email and cell phone validation in AS2 and AS3″