* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ * $Source$ */ /** \file htdocs/webservices/client.php \brief Page demo client appel WebServices Dolibarr \version $Revision$ */ require_once("../master.inc.php"); require_once(NUSOAP_PATH.'/nusoap.php'); // Include SOAP $WS_DOL_URL = $dolibarr_main_url_root.'/webservices/server.php'; $WS_METHOD = 'getVersions'; // Set the parameters to send to the WebService $parameters = array("param1"=>"value1"); // Set the WebService URL dolibarr_syslog("Create soapclient for URL=".$WS_DOL_URL); $soapclient = new soapclient($WS_DOL_URL); if ($soapclient) { } // Call the WebService method and store its result in $result. dolibarr_syslog("Call method ".$WS_METHOD); $result = $soapclient->call($WS_METHOD,$parameters); // Show page with result header("Content-type: text/html; charset=utf8"); print ''."\n"; echo ''."\n"; echo '
'; echo '' . htmlspecialchars($soapclient->request, ENT_QUOTES) . ''; echo "
'; print_r($result); echo ''; echo '
' . htmlspecialchars($soapclient->response, ENT_QUOTES) . ''; echo ''."\n";; echo ''."\n";; ?>