Fix: Avoid errors into rpm packages

This commit is contained in:
Laurent Destailleur
2011-08-03 16:46:46 +00:00
parent b30d4ff557
commit 02e4a29baa
3 changed files with 43 additions and 46 deletions

View File

@@ -1,7 +1,7 @@
<?php <?php
/* /*
$Id$ $Id: class.nusoap_base.php,v 1.7 2011/08/03 16:46:46 eldy Exp $
NuSOAP - Web Services Toolkit for PHP NuSOAP - Web Services Toolkit for PHP
@@ -18,8 +18,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software along with this program. If not, see <http://www.gnu.org/licenses/>.
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
The NuSOAP project home is: The NuSOAP project home is:
http://sourceforge.net/projects/nusoap/ http://sourceforge.net/projects/nusoap/
@@ -79,7 +78,7 @@ $GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel'] = 9;
* *
* @author Dietrich Ayala <dietrich@ganx4.com> * @author Dietrich Ayala <dietrich@ganx4.com>
* @author Scott Nichol <snichol@users.sourceforge.net> * @author Scott Nichol <snichol@users.sourceforge.net>
* @version $Id$ * @version $Id: class.nusoap_base.php,v 1.7 2011/08/03 16:46:46 eldy Exp $
* @access public * @access public
*/ */
class nusoap_base { class nusoap_base {
@@ -103,7 +102,7 @@ class nusoap_base {
* @var string * @var string
* @access private * @access private
*/ */
var $revision = '$Revision$'; var $revision = '$Revision: 1.7 $';
/** /**
* Current error string (manipulated by getError/setError) * Current error string (manipulated by getError/setError)
* *
@@ -141,7 +140,7 @@ class nusoap_base {
* @access public * @access public
*/ */
var $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema'; var $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema';
/** /**
* charset encoding for outgoing messages * charset encoding for outgoing messages
* *
@@ -408,7 +407,7 @@ class nusoap_base {
$this->debug("in serialize_val: name=$name, type=$type, name_ns=$name_ns, type_ns=$type_ns, use=$use, soapval=$soapval"); $this->debug("in serialize_val: name=$name, type=$type, name_ns=$name_ns, type_ns=$type_ns, use=$use, soapval=$soapval");
$this->appendDebug('value=' . $this->varDump($val)); $this->appendDebug('value=' . $this->varDump($val));
$this->appendDebug('attributes=' . $this->varDump($attributes)); $this->appendDebug('attributes=' . $this->varDump($attributes));
if (is_object($val) && get_class($val) == 'soapval' && (! $soapval)) { if (is_object($val) && get_class($val) == 'soapval' && (! $soapval)) {
$this->debug("serialize_val: serialize soapval"); $this->debug("serialize_val: serialize soapval");
$xml = $val->serialize($use); $xml = $val->serialize($use);
@@ -982,7 +981,7 @@ function iso8601_to_timestamp($datestr){
function usleepWindows($usec) function usleepWindows($usec)
{ {
$start = gettimeofday(); $start = gettimeofday();
do do
{ {
$stop = gettimeofday(); $stop = gettimeofday();

View File

@@ -1,7 +1,7 @@
<?php <?php
/* /*
$Id$ $Id: nusoap.php,v 1.15 2011/08/03 16:46:46 eldy Exp $
NuSOAP - Web Services Toolkit for PHP NuSOAP - Web Services Toolkit for PHP
@@ -18,8 +18,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software along with this program. If not, see <http://www.gnu.org/licenses/>.
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
The NuSOAP project home is: The NuSOAP project home is:
http://sourceforge.net/projects/nusoap/ http://sourceforge.net/projects/nusoap/
@@ -79,7 +78,7 @@ $GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel'] = 9;
* *
* @author Dietrich Ayala <dietrich@ganx4.com> * @author Dietrich Ayala <dietrich@ganx4.com>
* @author Scott Nichol <snichol@users.sourceforge.net> * @author Scott Nichol <snichol@users.sourceforge.net>
* @version $Id$ * @version $Id: nusoap.php,v 1.15 2011/08/03 16:46:46 eldy Exp $
* @access public * @access public
*/ */
class nusoap_base { class nusoap_base {
@@ -103,7 +102,7 @@ class nusoap_base {
* @var string * @var string
* @access private * @access private
*/ */
var $revision = '$Revision$'; var $revision = '$Revision: 1.15 $';
/** /**
* Current error string (manipulated by getError/setError) * Current error string (manipulated by getError/setError)
* *
@@ -1004,7 +1003,7 @@ function usleepWindows($usec)
* Mainly used for returning faults from deployed functions * Mainly used for returning faults from deployed functions
* in a server instance. * in a server instance.
* @author Dietrich Ayala <dietrich@ganx4.com> * @author Dietrich Ayala <dietrich@ganx4.com>
* @version $Id$ * @version $Id: nusoap.php,v 1.15 2011/08/03 16:46:46 eldy Exp $
* @access public * @access public
*/ */
class nusoap_fault extends nusoap_base { class nusoap_fault extends nusoap_base {
@@ -1092,7 +1091,7 @@ class soap_fault extends nusoap_fault {
* *
* @author Dietrich Ayala <dietrich@ganx4.com> * @author Dietrich Ayala <dietrich@ganx4.com>
* @author Scott Nichol <snichol@users.sourceforge.net> * @author Scott Nichol <snichol@users.sourceforge.net>
* @version $Id$ * @version $Id: nusoap.php,v 1.15 2011/08/03 16:46:46 eldy Exp $
* @access public * @access public
*/ */
class nusoap_xmlschema extends nusoap_base { class nusoap_xmlschema extends nusoap_base {
@@ -2064,7 +2063,7 @@ class XMLSchema extends nusoap_xmlschema {
* xsd:anyType and user-defined types. * xsd:anyType and user-defined types.
* *
* @author Dietrich Ayala <dietrich@ganx4.com> * @author Dietrich Ayala <dietrich@ganx4.com>
* @version $Id$ * @version $Id: nusoap.php,v 1.15 2011/08/03 16:46:46 eldy Exp $
* @access public * @access public
*/ */
class soapval extends nusoap_base { class soapval extends nusoap_base {
@@ -2166,7 +2165,7 @@ class soapval extends nusoap_base {
* *
* @author Dietrich Ayala <dietrich@ganx4.com> * @author Dietrich Ayala <dietrich@ganx4.com>
* @author Scott Nichol <snichol@users.sourceforge.net> * @author Scott Nichol <snichol@users.sourceforge.net>
* @version $Id$ * @version $Id: nusoap.php,v 1.15 2011/08/03 16:46:46 eldy Exp $
* @access public * @access public
*/ */
class soap_transport_http extends nusoap_base { class soap_transport_http extends nusoap_base {
@@ -3471,7 +3470,7 @@ class soap_transport_http extends nusoap_base {
* *
* @author Dietrich Ayala <dietrich@ganx4.com> * @author Dietrich Ayala <dietrich@ganx4.com>
* @author Scott Nichol <snichol@users.sourceforge.net> * @author Scott Nichol <snichol@users.sourceforge.net>
* @version $Id$ * @version $Id: nusoap.php,v 1.15 2011/08/03 16:46:46 eldy Exp $
* @access public * @access public
*/ */
class nusoap_server extends nusoap_base { class nusoap_server extends nusoap_base {
@@ -4594,7 +4593,7 @@ class soap_server extends nusoap_server {
* *
* @author Dietrich Ayala <dietrich@ganx4.com> * @author Dietrich Ayala <dietrich@ganx4.com>
* @author Scott Nichol <snichol@users.sourceforge.net> * @author Scott Nichol <snichol@users.sourceforge.net>
* @version $Id$ * @version $Id: nusoap.php,v 1.15 2011/08/03 16:46:46 eldy Exp $
* @access public * @access public
*/ */
class wsdl extends nusoap_base { class wsdl extends nusoap_base {
@@ -6532,7 +6531,7 @@ class wsdl extends nusoap_base {
* *
* @author Dietrich Ayala <dietrich@ganx4.com> * @author Dietrich Ayala <dietrich@ganx4.com>
* @author Scott Nichol <snichol@users.sourceforge.net> * @author Scott Nichol <snichol@users.sourceforge.net>
* @version $Id$ * @version $Id: nusoap.php,v 1.15 2011/08/03 16:46:46 eldy Exp $
* @access public * @access public
*/ */
class nusoap_parser extends nusoap_base { class nusoap_parser extends nusoap_base {
@@ -7183,7 +7182,7 @@ class soap_parser extends nusoap_parser {
* *
* @author Dietrich Ayala <dietrich@ganx4.com> * @author Dietrich Ayala <dietrich@ganx4.com>
* @author Scott Nichol <snichol@users.sourceforge.net> * @author Scott Nichol <snichol@users.sourceforge.net>
* @version $Id$ * @version $Id: nusoap.php,v 1.15 2011/08/03 16:46:46 eldy Exp $
* @access public * @access public
*/ */
class nusoap_client extends nusoap_base { class nusoap_client extends nusoap_base {

View File

@@ -1,6 +1,6 @@
<?php <?php
/* /*
$Id$ $Id: nusoapmime.php,v 1.9 2011/08/03 16:46:46 eldy Exp $
NuSOAP - Web Services Toolkit for PHP NuSOAP - Web Services Toolkit for PHP
@@ -17,8 +17,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software along with this program. If not, see <http://www.gnu.org/licenses/>.
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
The NuSOAP project home is: The NuSOAP project home is:
http://sourceforge.net/projects/nusoap/ http://sourceforge.net/projects/nusoap/
@@ -48,7 +47,7 @@ require_once('Mail/mimePart.php');
* *
* @author Scott Nichol <snichol@users.sourceforge.net> * @author Scott Nichol <snichol@users.sourceforge.net>
* @author Thanks to Guillaume and Henning Reich for posting great attachment code to the mail list * @author Thanks to Guillaume and Henning Reich for posting great attachment code to the mail list
* @version $Id$ * @version $Id: nusoapmime.php,v 1.9 2011/08/03 16:46:46 eldy Exp $
* @access public * @access public
*/ */
class nusoap_client_mime extends nusoap_client { class nusoap_client_mime extends nusoap_client {
@@ -69,7 +68,7 @@ class nusoap_client_mime extends nusoap_client {
* @access private * @access private
*/ */
var $mimeContentType; var $mimeContentType;
/** /**
* adds a MIME attachment to the current request. * adds a MIME attachment to the current request.
* *
@@ -94,7 +93,7 @@ class nusoap_client_mime extends nusoap_client {
$info['filename'] = $filename; $info['filename'] = $filename;
$info['contenttype'] = $contenttype; $info['contenttype'] = $contenttype;
$info['cid'] = $cid; $info['cid'] = $cid;
$this->requestAttachments[] = $info; $this->requestAttachments[] = $info;
return $cid; return $cid;
@@ -140,7 +139,7 @@ class nusoap_client_mime extends nusoap_client {
$params['encoding'] = '8bit'; $params['encoding'] = '8bit';
$params['charset'] = $this->soap_defencoding; $params['charset'] = $this->soap_defencoding;
$mimeMessage->addSubpart($soapmsg, $params); $mimeMessage->addSubpart($soapmsg, $params);
foreach ($this->requestAttachments as $att) { foreach ($this->requestAttachments as $att) {
unset($params); unset($params);
@@ -165,7 +164,7 @@ class nusoap_client_mime extends nusoap_client {
$output = $mimeMessage->encode(); $output = $mimeMessage->encode();
$mimeHeaders = $output['headers']; $mimeHeaders = $output['headers'];
foreach ($mimeHeaders as $k => $v) { foreach ($mimeHeaders as $k => $v) {
$this->debug("MIME header $k: $v"); $this->debug("MIME header $k: $v");
if (strtolower($k) == 'content-type') { if (strtolower($k) == 'content-type') {
@@ -174,13 +173,13 @@ class nusoap_client_mime extends nusoap_client {
$this->mimeContentType = str_replace("\r\n", " ", $v); $this->mimeContentType = str_replace("\r\n", " ", $v);
} }
} }
return $output['body']; return $output['body'];
} }
return parent::getHTTPBody($soapmsg); return parent::getHTTPBody($soapmsg);
} }
/** /**
* gets the HTTP content type for the current request. * gets the HTTP content type for the current request.
* *
@@ -195,7 +194,7 @@ class nusoap_client_mime extends nusoap_client {
} }
return parent::getHTTPContentType(); return parent::getHTTPContentType();
} }
/** /**
* gets the HTTP content type charset for the current request. * gets the HTTP content type charset for the current request.
* returns false for non-text content types. * returns false for non-text content types.
@@ -233,7 +232,7 @@ class nusoap_client_mime extends nusoap_client {
$params['include_bodies'] = true; $params['include_bodies'] = true;
$params['decode_bodies'] = true; $params['decode_bodies'] = true;
$params['decode_headers'] = true; $params['decode_headers'] = true;
$structure = Mail_mimeDecode::decode($params); $structure = Mail_mimeDecode::decode($params);
foreach ($structure->parts as $part) { foreach ($structure->parts as $part) {
@@ -250,12 +249,12 @@ class nusoap_client_mime extends nusoap_client {
$this->responseAttachments[] = $info; $this->responseAttachments[] = $info;
} }
} }
if (isset($return)) { if (isset($return)) {
$this->responseData = $root; $this->responseData = $root;
return $return; return $return;
} }
$this->setError('No root part found in multipart/related content'); $this->setError('No root part found in multipart/related content');
return ''; return '';
} }
@@ -278,7 +277,7 @@ if (!extension_loaded('soap')) {
* *
* @author Scott Nichol <snichol@users.sourceforge.net> * @author Scott Nichol <snichol@users.sourceforge.net>
* @author Thanks to Guillaume and Henning Reich for posting great attachment code to the mail list * @author Thanks to Guillaume and Henning Reich for posting great attachment code to the mail list
* @version $Id$ * @version $Id: nusoapmime.php,v 1.9 2011/08/03 16:46:46 eldy Exp $
* @access public * @access public
*/ */
class nusoap_server_mime extends nusoap_server { class nusoap_server_mime extends nusoap_server {
@@ -299,7 +298,7 @@ class nusoap_server_mime extends nusoap_server {
* @access private * @access private
*/ */
var $mimeContentType; var $mimeContentType;
/** /**
* adds a MIME attachment to the current response. * adds a MIME attachment to the current response.
* *
@@ -324,7 +323,7 @@ class nusoap_server_mime extends nusoap_server {
$info['filename'] = $filename; $info['filename'] = $filename;
$info['contenttype'] = $contenttype; $info['contenttype'] = $contenttype;
$info['cid'] = $cid; $info['cid'] = $cid;
$this->responseAttachments[] = $info; $this->responseAttachments[] = $info;
return $cid; return $cid;
@@ -370,7 +369,7 @@ class nusoap_server_mime extends nusoap_server {
$params['encoding'] = '8bit'; $params['encoding'] = '8bit';
$params['charset'] = $this->soap_defencoding; $params['charset'] = $this->soap_defencoding;
$mimeMessage->addSubpart($soapmsg, $params); $mimeMessage->addSubpart($soapmsg, $params);
foreach ($this->responseAttachments as $att) { foreach ($this->responseAttachments as $att) {
unset($params); unset($params);
@@ -395,7 +394,7 @@ class nusoap_server_mime extends nusoap_server {
$output = $mimeMessage->encode(); $output = $mimeMessage->encode();
$mimeHeaders = $output['headers']; $mimeHeaders = $output['headers'];
foreach ($mimeHeaders as $k => $v) { foreach ($mimeHeaders as $k => $v) {
$this->debug("MIME header $k: $v"); $this->debug("MIME header $k: $v");
if (strtolower($k) == 'content-type') { if (strtolower($k) == 'content-type') {
@@ -404,13 +403,13 @@ class nusoap_server_mime extends nusoap_server {
$this->mimeContentType = str_replace("\r\n", " ", $v); $this->mimeContentType = str_replace("\r\n", " ", $v);
} }
} }
return $output['body']; return $output['body'];
} }
return parent::getHTTPBody($soapmsg); return parent::getHTTPBody($soapmsg);
} }
/** /**
* gets the HTTP content type for the current response. * gets the HTTP content type for the current response.
* *
@@ -425,7 +424,7 @@ class nusoap_server_mime extends nusoap_server {
} }
return parent::getHTTPContentType(); return parent::getHTTPContentType();
} }
/** /**
* gets the HTTP content type charset for the current response. * gets the HTTP content type charset for the current response.
* returns false for non-text content types. * returns false for non-text content types.
@@ -463,7 +462,7 @@ class nusoap_server_mime extends nusoap_server {
$params['include_bodies'] = true; $params['include_bodies'] = true;
$params['decode_bodies'] = true; $params['decode_bodies'] = true;
$params['decode_headers'] = true; $params['decode_headers'] = true;
$structure = Mail_mimeDecode::decode($params); $structure = Mail_mimeDecode::decode($params);
foreach ($structure->parts as $part) { foreach ($structure->parts as $part) {
@@ -479,11 +478,11 @@ class nusoap_server_mime extends nusoap_server {
$this->requestAttachments[] = $info; $this->requestAttachments[] = $info;
} }
} }
if (isset($return)) { if (isset($return)) {
return $return; return $return;
} }
$this->setError('No root part found in multipart/related content'); $this->setError('No root part found in multipart/related content');
return; return;
} }