03 July 2002

This movie uses PHP/NuSOAP to call the BabelFish service.

Needed PHP-code:

$soapclient = new soapclient( $URL );
$parameters = array("translationmode"=>$translationmode, "sourcedata"=>$sourcedata);
$ret = $soapclient->
call($operation, $parameters, $namespace, $soapaction);
echo $ret ;

Flash ActionScript:


var doc = new XML(strXML);
var resp = new XML();
resp.contentType = "text/xml";
resp.onLoad = MyOnload;
resp.ignoreWhite = true;
doc.sendAndLoad( pURL, resp );

doc is the SOAP-request which is then send to the PHP-script which returns data from the requested service. After looking at all other possibilities for Flash to consume SOAP-webservices, this seems to be the most simple way of doing things.

Bottomline: As far as I can see Flash always needs some kind of server-side scripting, whether it be PHP, ASP, Flash Remoting or something else, to get around the cross-domain security issues

Update: the Translat0r is now also online here


3:40:53 PM | comment [] | 


Click here to visit the Radio UserLand website.

Subscribe to "Tim Knip's Groovey Weblog" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.
© Copyright 2003 Tim Knip, Updated: 15/02/2003; 19:06:59.