Ignore:
Timestamp:
2011/10/25 00:02:55 (13 years ago)
Author:
Seasoft
Message:

#1521 (PEAR::SOAP 配布と異なる部分がある)

  • 新しいバージョンの配布ファイルを上書きすることで解決

#1522 (PEAR::SOAP をバージョンアップ)

  • 0.11.0 -> 0.12.0
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_11-dev/data/module/SOAP/Server.php

    r20119 r21299  
    176176            /* We'll try to build our endpoint. */ 
    177177            $this->endpoint = 'http://' . $_SERVER['SERVER_NAME']; 
    178             if ($_SERVER['SERVER_PORT']) { 
     178            if (isset($_SERVER['SERVER_PORT'])) { 
    179179                $this->endpoint .= ':' . $_SERVER['SERVER_PORT']; 
    180180            } 
     
    186186        if (isset($_SERVER['CONTENT_TYPE'])) { 
    187187            if (strcasecmp($_SERVER['CONTENT_TYPE'], 'application/dime') == 0) { 
    188                 $this->_decodeDIMEMessage($data, $headers, $attachments); 
     188                $this->_decodeDIMEMessage($data, $this->headers, $attachments); 
    189189                $useEncoding = 'DIME'; 
    190190            } elseif (stristr($_SERVER['CONTENT_TYPE'], 'multipart/related')) { 
     
    193193                    stripslashes($_SERVER['CONTENT_TYPE']) . 
    194194                    "\r\n\r\n" . $data; 
    195                 $this->_decodeMimeMessage($data, $headers, $attachments); 
     195                $this->_decodeMimeMessage($data, $this->headers, $attachments); 
    196196                $useEncoding = 'Mime'; 
    197197            } 
    198             if (!isset($headers['content-type'])) { 
    199                 $headers['content-type'] = stripslashes($_SERVER['CONTENT_TYPE']); 
     198            if (!isset($this->headers['content-type'])) { 
     199                $this->headers['content-type'] = stripslashes($_SERVER['CONTENT_TYPE']); 
    200200            } 
    201201            if (!$this->fault && 
    202                 !$this->_getContentEncoding($headers['content-type'])) { 
     202                !$this->_getContentEncoding($this->headers['content-type'])) { 
    203203                $this->xml_encoding = SOAP_DEFAULT_ENCODING; 
    204204                /* Found encoding we don't understand; return a fault. */ 
     
    210210         * WSDL file. */ 
    211211        if (!$this->fault && !$test && 
    212             ($_SERVER['REQUEST_METHOD'] != 'POST' || 
    213              strncmp($headers['content-type'], 'text/xml', 8) != 0)) { 
     212            ((isset($_SERVER['REQUEST_METHOD']) && 
     213              $_SERVER['REQUEST_METHOD'] != 'POST') || 
     214             (isset($this->headers['content-type']) && 
     215              strncmp($this->headers['content-type'], 'text/xml', 8) != 0))) { 
    214216            /* This is not possibly a valid SOAP request, try to return a WSDL 
    215217             * file. */ 
    216             $this->_raiseSoapFault('Invalid SOAP request, must be POST with content-type: text/xml, got: ' . (isset($headers['content-type']) ? $headers['content-type'] : 'Nothing!'), '', '', 'Server'); 
     218            $got = isset($this->headers['content-type']) ? $this->headers['content-type'] : 'Nothing!'; 
     219            $this->_raiseSoapFault('Invalid SOAP request, must be POST with content-type: text/xml, got: ' . $got, '', '', 'Server'); 
    217220        } 
    218221 
     
    380383    { 
    381384        /* Parse response, get SOAP_Parser object. */ 
    382         $parser =& new SOAP_Parser($data, $this->xml_encoding, $attachments); 
    383         /* If fault occurred during message parsing. */ 
     385        $parser = new SOAP_Parser($data, $this->xml_encoding, $attachments); 
     386 
    384387        if ($parser->fault) { 
     388            /* Fault occurred during message parsing. */ 
    385389            $this->fault = $parser->fault; 
     390            return null; 
     391        } 
     392        if (!count($parser->root_struct_name)) { 
     393            /* No method specified. */ 
     394            $this->_raiseSoapFault('No method specified in request.'); 
    386395            return null; 
    387396        } 
     
    544553        if (is_array($requestArray)) { 
    545554            if (isset($requestArray['faultcode']) || 
    546                 isset($requestArray['SOAP-ENV:faultcode'])) { 
     555                isset($requestArray[SOAP_BASE::SOAPENVPrefix().':faultcode'])) { 
    547556                $faultcode = $faultstring = $faultdetail = $faultactor = ''; 
    548557                foreach ($requestArray as $k => $v) { 
     
    800809     * @return void 
    801810     */ 
    802     function addObjectWSDL(&$wsdl_obj, $targetNamespace, $service_name, 
     811    function addObjectWSDL($wsdl_obj, $targetNamespace, $service_name, 
    803812                           $service_desc = '') 
    804813    { 
Note: See TracChangeset for help on using the changeset viewer.