From 62a03181333c335b6b948fbc8f3a2efa09c0a7e0 Mon Sep 17 00:00:00 2001 From: Thomas Cort Date: Tue, 20 Nov 2007 06:19:05 -0500 Subject: [PATCH] Add skeleton code for an AddTranslation method. The AddTranslation SOAP method will allow authorized users to add translations. This is useful in a hosted environment where uploading a large SQL database may be difficult. --- docs/xml-instance-documents.txt | 29 ++++++++++++++++++++++++++-- tools/tt-client.php | 27 ++++++++++++++++++++------ www/soap.php | 5 +++++ www/soap.wsdl | 42 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 95 insertions(+), 8 deletions(-) diff --git a/docs/xml-instance-documents.txt b/docs/xml-instance-documents.txt index af5fb9a..19182df 100644 --- a/docs/xml-instance-documents.txt +++ b/docs/xml-instance-documents.txt @@ -11,8 +11,8 @@ http://www.gnu.org/software/hello/ http://localhost/distfiles/hello-2.3.tar.gz - GNU General Public License v3 or Later - http://localhost/license/GPLv3orLater + GNU General Public License v3 or Later + http://localhost/license/GPLv3orLater Bonjour, le monde. @@ -32,3 +32,28 @@ This program is running as process number %(pid)d. This program is running as process number $pid. + + + + user + pass + + + hello + 2.3 + http://www.gnu.org/software/hello/ + http://localhost/distfiles/hello-2.3.tar.gz + + GNU General Public License v3 or Later + http://localhost/license/GPLv3orLater + + + en + hello, world + fr + Bonjour, le monde. + + + + true + diff --git a/tools/tt-client.php b/tools/tt-client.php index bd33081..3ab01d9 100644 --- a/tools/tt-client.php +++ b/tools/tt-client.php @@ -21,15 +21,30 @@ require_once('../www/lib/nusoap.php'); $soapurl = "http://localhost/soap.php"; -$soapaction = "http://www.tux.name/tt/Translate"; +$soapaction = "http://www.tux.name/tt/AddTranslation"; $soapclient = new nusoap_client($soapurl); $soapmsg = $soapclient->serializeEnvelope(' - - en - fr - hello, world - + + + user + pass + + + hello + 2.3 + http://www.gnu.org/software/hello/ + http://localhost/distfiles/hello-2.3.tar.gz + + GNU General Public License v3 or Later + http://localhost/license/GPLv3orLater + + + en + hello, world + fr + Bonjour, le monde. + ','',array(),'document', 'literal'); diff --git a/www/soap.php b/www/soap.php index 2df9010..b036d47 100644 --- a/www/soap.php +++ b/www/soap.php @@ -35,6 +35,11 @@ function Suggest($language, $partial_message) { } } +function AddTranslation($auth, $package, $source_language, $source_message, $target_language, $target_message) { + + return array("success" => true); +} + function Translate($source_language, $target_language, $message) { global $base_url; diff --git a/www/soap.wsdl b/www/soap.wsdl index ff49fee..17c1097 100644 --- a/www/soap.wsdl +++ b/www/soap.wsdl @@ -50,6 +50,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -71,6 +94,12 @@ + + + + + + @@ -82,6 +111,10 @@ + + + + @@ -98,6 +131,15 @@ + + + + + + + + + -- 2.11.4.GIT