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 [] |