cvs: pear /SOAP Disco.php Server.php WSDL.php

From: Date: Mon, 08 Sep 2003 17:30:29 +0000
Subject: cvs: pear /SOAP Disco.php Server.php WSDL.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-12551@lists.php.net to get a copy of this message
arnaud Mon Sep 8 13:30:29 2003 EDT Modified files: /pear/SOAP Server.php Disco.php WSDL.php Log: * patches from Andre Christ (isset checks, error return) Index: pear/SOAP/Server.php diff -u pear/SOAP/Server.php:1.43 pear/SOAP/Server.php:1.44 --- pear/SOAP/Server.php:1.43 Mon Sep 8 13:24:00 2003 +++ pear/SOAP/Server.php Mon Sep 8 13:30:29 2003 @@ -17,7 +17,7 @@ // | Authors: Dietrich Ayala <dietrich@ganx4.com> Original Author | // +----------------------------------------------------------------------+ // -// $Id: Server.php,v 1.43 2003/09/08 17:24:00 arnaud Exp $ +// $Id: Server.php,v 1.44 2003/09/08 17:30:29 arnaud Exp $ // require_once 'SOAP/Base.php'; @@ -41,7 +41,7 @@ * originaly based on SOAPx4 by Dietrich Ayala http://dietrich.ganx4.com/soapx4 * * @access public - * @version $Id: Server.php,v 1.43 2003/09/08 17:24:00 arnaud Exp $ + * @version $Id: Server.php,v 1.44 2003/09/08 17:30:29 arnaud Exp $ * @package SOAP::Client * @author Shane Caraveo <shane@php.net> Conversion to PEAR and updates * @author Dietrich Ayala <dietrich@ganx4.com> Original Author @@ -306,7 +306,7 @@ if ($request_headers) { if (!is_a($request_headers,'soap_value')) { $this->_raiseSoapFault("parser did not return SOAP_Value object: $request_headers",'','','Server'); - return NULL; + return null; } if ($request_headers->value) { // handle headers now @@ -321,7 +321,7 @@ if (!$f_exists && $header_val->mustunderstand && $myactor) { $this->_raiseSoapFault("I don't understand header $header_val->name.",'','','MustUnderstand'); - return NULL; + return null; } // we only handle the header if it's for us @@ -335,7 +335,8 @@ $hr =& $this->callMethod($header_method, $header_data); # if they return a fault, then it's all over! if (PEAR::isError($hr)) { - return $hr->message(); + $this->_raiseSoapFault($method_response); + return null; } $header_results[] = array_shift($this->buildResult($hr, $this->return_type, $header_method, $header_val->namespace)); } @@ -400,7 +401,8 @@ $method_response =& $this->callMethod($this->call_methodname, $request_data); if (PEAR::isError($method_response)) { - return $method_response->message(); + $this->_raiseSoapFault($method_response); + return null; } if ($this->__options['parameters'] || !$method_response || $this->__options['style']=='rpc') { Index: pear/SOAP/Disco.php diff -u pear/SOAP/Disco.php:1.7 pear/SOAP/Disco.php:1.8 --- pear/SOAP/Disco.php:1.7 Mon Sep 8 13:21:11 2003 +++ pear/SOAP/Disco.php Mon Sep 8 13:30:29 2003 @@ -16,7 +16,7 @@ // | Author: Dmitri Vinogradov <dimitri@vinogradov.de> | // +----------------------------------------------------------------------+ // -// $Id: Disco.php,v 1.7 2003/09/08 17:21:11 arnaud Exp $ +// $Id: Disco.php,v 1.8 2003/09/08 17:30:29 arnaud Exp $ require_once 'SOAP/Base.php'; @@ -217,23 +217,27 @@ $method_namespace = $namespace; } # INPUT - $input_message =& $this->_wsdl['definitions']['message'][]; - $input_message['attr']['name'] = $method_name . 'Request'; - foreach ($method_types['in'] as $name => $type) { - list($typens,$type) = $this->_getTypeNs($type); - $part =& $input_message['part'][]; - $part['attr']['name'] = $name; - $part['attr']['type'] = $typens . ':' . $type; + if (isset($method_types['in']) && is_array($method_types['in'])) { + $input_message =& $this->_wsdl['definitions']['message'][]; + $input_message['attr']['name'] = $method_name . 'Request'; + foreach ($method_types['in'] as $name => $type) { + list($typens,$type) = $this->_getTypeNs($type); + $part =& $input_message['part'][]; + $part['attr']['name'] = $name; + $part['attr']['type'] = $typens . ':' . $type; + } } # OUTPUT - $output_message =& $this->_wsdl['definitions']['message'][]; - $output_message['attr']['name'] = $method_name . 'Response'; - foreach ($method_types['out'] as $name => $type) { - list($typens,$type) = $this->_getTypeNs($type); - $part =& $output_message['part'][]; - $part['attr']['name'] = $name; - $part['attr']['type'] = $typens . ':' . $type; + if (isset($method_types['out']) && is_array($method_types['out'])) { + $output_message =& $this->_wsdl['definitions']['message'][]; + $output_message['attr']['name'] = $method_name . 'Response'; + foreach ($method_types['out'] as $name => $type) { + list($typens,$type) = $this->_getTypeNs($type); + $part =& $output_message['part'][]; + $part['attr']['name'] = $name; + $part['attr']['type'] = $typens . ':' . $type; + } } # PORTTYPES Index: pear/SOAP/WSDL.php diff -u pear/SOAP/WSDL.php:1.50 pear/SOAP/WSDL.php:1.51 --- pear/SOAP/WSDL.php:1.50 Tue Aug 5 12:48:29 2003 +++ pear/SOAP/WSDL.php Mon Sep 8 13:30:29 2003 @@ -17,7 +17,7 @@ // | Authors: Dietrich Ayala <dietrich@ganx4.com> Original Author | // +----------------------------------------------------------------------+ // -// $Id: WSDL.php,v 1.50 2003/08/05 16:48:29 arnaud Exp $ +// $Id: WSDL.php,v 1.51 2003/09/08 17:30:29 arnaud Exp $ // require_once 'SOAP/Base.php'; require_once 'SOAP/Fault.php'; @@ -39,7 +39,7 @@ * implement IDL type syntax declaration so we can generate WSDL * * @access public - * @version $Id: WSDL.php,v 1.50 2003/08/05 16:48:29 arnaud Exp $ + * @version $Id: WSDL.php,v 1.51 2003/09/08 17:30:29 arnaud Exp $ * @package SOAP::Client * @author Shane Caraveo <shane@php.net> Conversion to PEAR and updates * @author Dietrich Ayala <dietrich@ganx4.com> Original Author @@ -1874,7 +1874,7 @@ 'namespace' => $this->tnsPrefix, 'address' => array('location' => 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'] . - ($_SERVER['QUERY_STRING']? '?' . $_SERVER['QUERY_STRING'] : '')), + (isset($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : '')), 'type' => 'soap'); }

« previous php.pear.cvs (#12551) next »