From 9e3a175d3c0aaf0e4753eb6b0d79ad54d0bfac05 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@users.sourceforge.net>
Date: Fri, 10 Aug 2007 21:48:06 +0000
Subject: [PATCH] Fix: renommage de soapclient en soapclient_nusoap pour eviter
 conflit avec module Soap de PHP5

---
 build/tgz/tar.exclude                                |  1 +
 .../nusoap/lib/class.soap_transport_http.php         |  2 +-
 htdocs/includes/nusoap/lib/class.soapclient.php      | 10 +++++-----
 htdocs/includes/nusoap/lib/nusoap.php                | 12 ++++++------
 htdocs/oscommerce_ws/clients/index.php               |  2 +-
 htdocs/oscommerce_ws/clients/osc_customer.class.php  |  2 +-
 htdocs/oscommerce_ws/commandes/index.php             |  2 +-
 htdocs/oscommerce_ws/commandes/osc_order.class.php   |  2 +-
 htdocs/oscommerce_ws/index.php                       |  2 +-
 htdocs/oscommerce_ws/produits/OSCvente.php           |  2 +-
 htdocs/oscommerce_ws/produits/index.php              |  2 +-
 htdocs/oscommerce_ws/produits/osc_product.class.php  |  2 +-
 .../oscommerce_ws/ws_server/lib/class.soapclient.php |  8 ++++----
 htdocs/oscommerce_ws/ws_server/lib/nusoap.php        | 12 ++++++------
 htdocs/oscommerce_ws/ws_server/lib/nusoapmime.php    |  2 +-
 htdocs/societe/checkvat/checkVatPopup.php            |  4 ++--
 htdocs/webservices/client.php                        |  4 ++--
 17 files changed, 36 insertions(+), 35 deletions(-)

diff --git a/build/tgz/tar.exclude b/build/tgz/tar.exclude
index f9784198702..3adff537f9e 100644
--- a/build/tgz/tar.exclude
+++ b/build/tgz/tar.exclude
@@ -39,6 +39,7 @@ htdocs/includes/modules/modEditeur.class.php
 htdocs/includes/modules/modPostnuke.class.php
 htdocs/includes/triggers/interface_user.class.php
 htdocs/includes/triggers/interface_contractfrombill.class.php-NORUN
+htdocs/oscommerce_ws/ws_client_demo
 htdocs/theme/rodolphe
 scripts/lolix
 CVS
diff --git a/htdocs/includes/nusoap/lib/class.soap_transport_http.php b/htdocs/includes/nusoap/lib/class.soap_transport_http.php
index 078850080ea..d31dd008f68 100644
--- a/htdocs/includes/nusoap/lib/class.soap_transport_http.php
+++ b/htdocs/includes/nusoap/lib/class.soap_transport_http.php
@@ -832,7 +832,7 @@ class soap_transport_http extends nusoap_base {
 			($http_status >= 400 && $http_status <= 417) ||
 			($http_status >= 501 && $http_status <= 505)
 		   ) {
-			$this->setError("Unsupported HTTP response status $http_status $http_reason (soapclient->response has contents of the response)");
+			$this->setError("Unsupported HTTP response status $http_status $http_reason (soapclient_nusoap->response has contents of the response)");
 			return false;
 		}
 
diff --git a/htdocs/includes/nusoap/lib/class.soapclient.php b/htdocs/includes/nusoap/lib/class.soapclient.php
index cb3e8f18c52..3f5da46f63f 100644
--- a/htdocs/includes/nusoap/lib/class.soapclient.php
+++ b/htdocs/includes/nusoap/lib/class.soapclient.php
@@ -5,12 +5,12 @@
 
 /**
 *
-* soapclient higher level class for easy usage.
+* soapclient_nusoap higher level class for easy usage.
 *
 * usage:
 *
 * // instantiate client with server info
-* $soapclient = new soapclient( string path [ ,boolean wsdl] );
+* $soapclient = new soapclient_nusoap( string path [ ,boolean wsdl] );
 *
 * // call method, get results
 * echo $soapclient->call( string methodname [ ,array parameters] );
@@ -22,7 +22,7 @@
 * @version  $Id$
 * @access   public
 */
-class soapclient extends nusoap_base  {
+class soapclient_nusoap extends nusoap_base  {
 
 	var $username = '';
 	var $password = '';
@@ -89,7 +89,7 @@ class soapclient extends nusoap_base  {
 	* @param	integer $response_timeout set the response timeout
 	* @access   public
 	*/
-	function soapclient($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30){
+	function soapclient_nusoap($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30){
 		parent::nusoap_base();
 		$this->endpoint = $endpoint;
 		$this->proxyhost = $proxyhost;
@@ -669,7 +669,7 @@ class soapclient extends nusoap_base  {
 				unset($paramCommentStr);
 			}
 		}
-		$evalStr = 'class soap_proxy_'.$r.' extends soapclient {
+		$evalStr = 'class soap_proxy_'.$r.' extends soapclient_nusoap {
 	'.$evalStr.'
 }';
 		return $evalStr;
diff --git a/htdocs/includes/nusoap/lib/nusoap.php b/htdocs/includes/nusoap/lib/nusoap.php
index dfb13d065d1..5634e16e7f7 100644
--- a/htdocs/includes/nusoap/lib/nusoap.php
+++ b/htdocs/includes/nusoap/lib/nusoap.php
@@ -2824,7 +2824,7 @@ class soap_transport_http extends nusoap_base {
 			($http_status >= 400 && $http_status <= 417) ||
 			($http_status >= 501 && $http_status <= 505)
 		   ) {
-			$this->setError("Unsupported HTTP response status $http_status $http_reason (soapclient->response has contents of the response)");
+			$this->setError("Unsupported HTTP response status $http_status $http_reason (soapclient_nusoap->response has contents of the response)");
 			return false;
 		}
 
@@ -6387,12 +6387,12 @@ class soap_parser extends nusoap_base {
 
 /**
 *
-* soapclient higher level class for easy usage.
+* soapclient_nusoap higher level class for easy usage.
 *
 * usage:
 *
 * // instantiate client with server info
-* $soapclient = new soapclient( string path [ ,boolean wsdl] );
+* $soapclient = new soapclient_nusoap( string path [ ,boolean wsdl] );
 *
 * // call method, get results
 * echo $soapclient->call( string methodname [ ,array parameters] );
@@ -6404,7 +6404,7 @@ class soap_parser extends nusoap_base {
 * @version  $Id$
 * @access   public
 */
-class soapclient extends nusoap_base  {
+class soapclient_nusoap extends nusoap_base  {
 
 	var $username = '';
 	var $password = '';
@@ -6471,7 +6471,7 @@ class soapclient extends nusoap_base  {
 	* @param	integer $response_timeout set the response timeout
 	* @access   public
 	*/
-	function soapclient($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30){
+	function soapclient_nusoap($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30){
 		parent::nusoap_base();
 		$this->endpoint = $endpoint;
 		$this->proxyhost = $proxyhost;
@@ -7051,7 +7051,7 @@ class soapclient extends nusoap_base  {
 				unset($paramCommentStr);
 			}
 		}
-		$evalStr = 'class soap_proxy_'.$r.' extends soapclient {
+		$evalStr = 'class soap_proxy_'.$r.' extends soapclient_nusoap {
 	'.$evalStr.'
 }';
 		return $evalStr;
diff --git a/htdocs/oscommerce_ws/clients/index.php b/htdocs/oscommerce_ws/clients/index.php
index 76301cee8ac..ead4790d4ac 100644
--- a/htdocs/oscommerce_ws/clients/index.php
+++ b/htdocs/oscommerce_ws/clients/index.php
@@ -42,7 +42,7 @@ require_once("../includes/configure.php");
 $parameters = array("custid"=>"0");
 
 // Set the WebService URL
-$client = new soapclient(OSCWS_DIR."ws_customers.php");
+$client = new soapclient_nusoap(OSCWS_DIR."ws_customers.php");
 
 $result = $client->call("get_Client",$parameters );
 
diff --git a/htdocs/oscommerce_ws/clients/osc_customer.class.php b/htdocs/oscommerce_ws/clients/osc_customer.class.php
index c5415841308..0c8b4ab59ee 100644
--- a/htdocs/oscommerce_ws/clients/osc_customer.class.php
+++ b/htdocs/oscommerce_ws/clients/osc_customer.class.php
@@ -99,7 +99,7 @@ class Osc_customer
 		$parameters = array("custid"=>$id);
 
 		// Set the WebService URL
-		$client = new soapclient(OSCWS_DIR."/ws_customers.php");
+		$client = new soapclient_nusoap(OSCWS_DIR."/ws_customers.php");
 
 		// Call the WebSeclient->fault)rvice and store its result in $obj
 		$obj = $client->call("get_Client",$parameters );
diff --git a/htdocs/oscommerce_ws/commandes/index.php b/htdocs/oscommerce_ws/commandes/index.php
index 14cec607d54..afe041b3896 100644
--- a/htdocs/oscommerce_ws/commandes/index.php
+++ b/htdocs/oscommerce_ws/commandes/index.php
@@ -41,7 +41,7 @@ require_once("../includes/configure.php");
 $parameters = array("orderid"=>"0");
 
 // Set the WebService URL
-$client = new soapclient(OSCWS_DIR."ws_orders.php");
+$client = new soapclient_nusoap(OSCWS_DIR."ws_orders.php");
 
 $result = $client->call("get_Order",$parameters );
 
diff --git a/htdocs/oscommerce_ws/commandes/osc_order.class.php b/htdocs/oscommerce_ws/commandes/osc_order.class.php
index 9928bcd1f98..213d384d3fd 100644
--- a/htdocs/oscommerce_ws/commandes/osc_order.class.php
+++ b/htdocs/oscommerce_ws/commandes/osc_order.class.php
@@ -98,7 +98,7 @@ class Osc_order
 		$parameters = array("orderid"=>$id);
 
 		// Set the WebService URL
-		$client = new soapclient(OSCWS_DIR."/ws_orders.php");
+		$client = new soapclient_nusoap(OSCWS_DIR."/ws_orders.php");
 
 		// Call the WebSeclient->fault)rvice and store its result in $obj
 		$obj = $client->call("get_Order",$parameters );
diff --git a/htdocs/oscommerce_ws/index.php b/htdocs/oscommerce_ws/index.php
index 0586cd4bb4b..ba2bc6867d9 100644
--- a/htdocs/oscommerce_ws/index.php
+++ b/htdocs/oscommerce_ws/index.php
@@ -52,7 +52,7 @@ require_once("./includes/configure.php");
 $parameters = array();
 
 // Set the WebService URL
-$client = new soapclient(OSCWS_DIR."ws_orders.php");
+$client = new soapclient_nusoap(OSCWS_DIR."ws_orders.php");
 
 /* 
 /* Chiffre d'affaire 
diff --git a/htdocs/oscommerce_ws/produits/OSCvente.php b/htdocs/oscommerce_ws/produits/OSCvente.php
index a0c1cb5cc14..d6569685932 100644
--- a/htdocs/oscommerce_ws/produits/OSCvente.php
+++ b/htdocs/oscommerce_ws/produits/OSCvente.php
@@ -104,7 +104,7 @@ if ($_GET["action"] == 'vendre' )
 		$parameters = array("prod"=>$prod);
 
 		// Set the WebService URL
-		$client = new soapclient(OSCWS_DIR."ws_articles.php");
+		$client = new soapclient_nusoap(OSCWS_DIR."ws_articles.php");
 	
 		// Call the WebService and store its result in $result.
 		$result = $client->call("create_article",$parameters );	
diff --git a/htdocs/oscommerce_ws/produits/index.php b/htdocs/oscommerce_ws/produits/index.php
index 9686b6015d6..c242183a6e9 100644
--- a/htdocs/oscommerce_ws/produits/index.php
+++ b/htdocs/oscommerce_ws/produits/index.php
@@ -44,7 +44,7 @@ require_once("../includes/configure.php");
 $parameters = array();
 
 // Set the WebService URL
-$client = new soapclient(OSCWS_DIR."ws_articles.php");
+$client = new soapclient_nusoap(OSCWS_DIR."ws_articles.php");
 
 $result = $client->call("get_listearticles",$parameters );
 if ($client->fault) {
diff --git a/htdocs/oscommerce_ws/produits/osc_product.class.php b/htdocs/oscommerce_ws/produits/osc_product.class.php
index bf69ca35e86..34b07d88810 100644
--- a/htdocs/oscommerce_ws/produits/osc_product.class.php
+++ b/htdocs/oscommerce_ws/produits/osc_product.class.php
@@ -93,7 +93,7 @@ class Osc_product
 		$parameters = array("id"=>$id,"ref"=>$ref);
 
 		// Set the WebService URL
-		$client = new soapclient(OSCWS_DIR."/ws_articles.php");
+		$client = new soapclient_nusoap(OSCWS_DIR."/ws_articles.php");
 
 		// Call the WebSeclient->fault)rvice and store its result in $obj
 		$obj = $client->call("get_article",$parameters );
diff --git a/htdocs/oscommerce_ws/ws_server/lib/class.soapclient.php b/htdocs/oscommerce_ws/ws_server/lib/class.soapclient.php
index 96f6b26ce12..c21f04b5636 100644
--- a/htdocs/oscommerce_ws/ws_server/lib/class.soapclient.php
+++ b/htdocs/oscommerce_ws/ws_server/lib/class.soapclient.php
@@ -10,7 +10,7 @@
 * usage:
 *
 * // instantiate client with server info
-* $soapclient = new soapclient( string path [ ,boolean wsdl] );
+* $soapclient = new soapclient_nusoap( string path [ ,boolean wsdl] );
 *
 * // call method, get results
 * echo $soapclient->call( string methodname [ ,array parameters] );
@@ -22,7 +22,7 @@
 * @version  $Id$
 * @access   public
 */
-class soapclient extends nusoap_base  {
+class soapclient_nusoap extends nusoap_base  {
 
 	var $username = '';
 	var $password = '';
@@ -89,7 +89,7 @@ class soapclient extends nusoap_base  {
 	* @param	integer $response_timeout set the response timeout
 	* @access   public
 	*/
-	function soapclient($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30){
+	function soapclient_nusoap($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30){
 		parent::nusoap_base();
 		$this->endpoint = $endpoint;
 		$this->proxyhost = $proxyhost;
@@ -669,7 +669,7 @@ class soapclient extends nusoap_base  {
 				unset($paramCommentStr);
 			}
 		}
-		$evalStr = 'class soap_proxy_'.$r.' extends soapclient {
+		$evalStr = 'class soap_proxy_'.$r.' extends soapclient_nusoap {
 	'.$evalStr.'
 }';
 		return $evalStr;
diff --git a/htdocs/oscommerce_ws/ws_server/lib/nusoap.php b/htdocs/oscommerce_ws/ws_server/lib/nusoap.php
index fdf83948857..1156e0d3a16 100644
--- a/htdocs/oscommerce_ws/ws_server/lib/nusoap.php
+++ b/htdocs/oscommerce_ws/ws_server/lib/nusoap.php
@@ -2824,7 +2824,7 @@ class soap_transport_http extends nusoap_base {
 			($http_status >= 400 && $http_status <= 417) ||
 			($http_status >= 501 && $http_status <= 505)
 		   ) {
-			$this->setError("Unsupported HTTP response status $http_status $http_reason (soapclient->response has contents of the response)");
+			$this->setError("Unsupported HTTP response status $http_status $http_reason (soapclient_nusoap->response has contents of the response)");
 			return false;
 		}
 
@@ -6387,12 +6387,12 @@ class soap_parser extends nusoap_base {
 
 /**
 *
-* soapclient higher level class for easy usage.
+* soapclient_nusoap higher level class for easy usage.
 *
 * usage:
 *
 * // instantiate client with server info
-* $soapclient = new soapclient( string path [ ,boolean wsdl] );
+* $soapclient = new soapclient_nusoap( string path [ ,boolean wsdl] );
 *
 * // call method, get results
 * echo $soapclient->call( string methodname [ ,array parameters] );
@@ -6404,7 +6404,7 @@ class soap_parser extends nusoap_base {
 * @version  $Id$
 * @access   public
 */
-class soapclient extends nusoap_base  {
+class soapclient_nusoap extends nusoap_base  {
 
 	var $username = '';
 	var $password = '';
@@ -6471,7 +6471,7 @@ class soapclient extends nusoap_base  {
 	* @param	integer $response_timeout set the response timeout
 	* @access   public
 	*/
-	function soapclient($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30){
+	function soapclient_nusoap($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30){
 		parent::nusoap_base();
 		$this->endpoint = $endpoint;
 		$this->proxyhost = $proxyhost;
@@ -7051,7 +7051,7 @@ class soapclient extends nusoap_base  {
 				unset($paramCommentStr);
 			}
 		}
-		$evalStr = 'class soap_proxy_'.$r.' extends soapclient {
+		$evalStr = 'class soap_proxy_'.$r.' extends soapclient_nusoap {
 	'.$evalStr.'
 }';
 		return $evalStr;
diff --git a/htdocs/oscommerce_ws/ws_server/lib/nusoapmime.php b/htdocs/oscommerce_ws/ws_server/lib/nusoapmime.php
index 7334c9a9317..61909c91f47 100644
--- a/htdocs/oscommerce_ws/ws_server/lib/nusoapmime.php
+++ b/htdocs/oscommerce_ws/ws_server/lib/nusoapmime.php
@@ -45,7 +45,7 @@ require_once('Mail/mimePart.php');
 * @version  $Id$
 * @access   public
 */
-class soapclientmime extends soapclient {
+class soapclientmime extends soapclient_nusoap {
 	/**
 	 * @var array Each array element in the return is an associative array with keys
 	 * data, filename, contenttype, cid
diff --git a/htdocs/societe/checkvat/checkVatPopup.php b/htdocs/societe/checkvat/checkVatPopup.php
index 343019af3d8..cd1641d8012 100644
--- a/htdocs/societe/checkvat/checkVatPopup.php
+++ b/htdocs/societe/checkvat/checkVatPopup.php
@@ -65,8 +65,8 @@ else
 						"vatNumber" => $_REQUEST["vatNumber"]);
 	
 	// Set the WebService URL
-	dolibarr_syslog("Create soapclient for URL=".$WS_DOL_URL);
-	$soapclient = new soapclient($WS_DOL_URL);
+	dolibarr_syslog("Create soapclient_nusoap for URL=".$WS_DOL_URL);
+	$soapclient = new soapclient_nusoap($WS_DOL_URL);
 	
 	// Call the WebService and store its result in $result.
 	dolibarr_syslog("Call method ".$WS_METHOD);
diff --git a/htdocs/webservices/client.php b/htdocs/webservices/client.php
index 14be5ce3a35..5387db0c970 100644
--- a/htdocs/webservices/client.php
+++ b/htdocs/webservices/client.php
@@ -35,8 +35,8 @@ $WS_METHOD  = 'getVersions';
 $parameters = array("param1"=>"value1");
 
 // Set the WebService URL
-dolibarr_syslog("Create soapclient for URL=".$WS_DOL_URL);
-$soapclient = new soapclient($WS_DOL_URL);
+dolibarr_syslog("Create soapclient_nusoap for URL=".$WS_DOL_URL);
+$soapclient = new soapclient_nusoap($WS_DOL_URL);
 if ($soapclient)
 {
 	
-- 
GitLab