diff --git a/htdocs/webservices_client.php b/htdocs/webservices_client.php index c40de08620a..a1773b05a60 100644 --- a/htdocs/webservices_client.php +++ b/htdocs/webservices_client.php @@ -23,53 +23,53 @@ \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.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 + +$WS_DOL_URL = $dolibarr_main_url_root.'/webservices.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($client->request, ENT_QUOTES) . ''; - -echo "
'; -print_r($result); +echo ''."\n"; +echo ''; +echo 'WebService Test: '.$WS_METHOD.' '; +echo ''."\n"; + +echo ''."\n"; + +echo "Question
"; +echo 'Function
'; +echo $WS_METHOD; +echo 'Request
'; +echo '' . htmlspecialchars($client->request, ENT_QUOTES) . ''; + +echo "Réponse
"; +echo 'Result
'; +echo ''; +print_r($result); echo ''; -echo 'Response
'; -echo '' . htmlspecialchars($client->response, ENT_QUOTES) . ''; - -echo ''."\n";; +echo 'Response
'; +echo '' . htmlspecialchars($client->response, ENT_QUOTES) . ''; + +echo ''."\n";; echo ''."\n";; -?> +?>