Ignore:
Timestamp:
2011/11/09 10:42:42 (15 years ago)
Author:
kotani
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/example/stockquote.php

    r21304 r21318  
    11<html><body> 
    22<? 
    3 // 
    4 // +----------------------------------------------------------------------+ 
    5 // | PHP Version 4                                                        | 
    6 // +----------------------------------------------------------------------+ 
    7 // | Copyright (c) 1997-2003 The PHP Group                                | 
    8 // +----------------------------------------------------------------------+ 
    9 // | This source file is subject to version 2.02 of the PHP license,      | 
    10 // | that is bundled with this package in the file LICENSE, and is        | 
    11 // | available at through the world-wide-web at                           | 
    12 // | http://www.php.net/license/2_02.txt.                                 | 
    13 // | If you did not receive a copy of the PHP license and are unable to   | 
    14 // | obtain it through the world-wide-web, please send a note to          | 
    15 // | [email protected] so we can mail you a copy immediately.               | 
    16 // +----------------------------------------------------------------------+ 
    17 // | Authors: Shane Caraveo <[email protected]>   Port to PEAR and more   | 
    18 // | Authors: Dietrich Ayala <[email protected]> Original Author         | 
    19 // +----------------------------------------------------------------------+ 
    20 // 
    21 // $Id: stockquote.php,v 1.7 2005/03/10 23:16:40 yunosh Exp $ 
    22 // 
    23 // include soap client class 
    24 include("SOAP/Client.php"); 
     3/** 
     4 * Stockquote client. 
     5 * 
     6 * PHP versions 4 and 5 
     7 * 
     8 * LICENSE: This source file is subject to version 2.02 of the PHP license, 
     9 * that is bundled with this package in the file LICENSE, and is available at 
     10 * through the world-wide-web at http://www.php.net/license/2_02.txt.  If you 
     11 * did not receive a copy of the PHP license and are unable to obtain it 
     12 * through the world-wide-web, please send a note to [email protected] so we can 
     13 * mail you a copy immediately. 
     14 * 
     15 * @category   Web Services 
     16 * @package    SOAP 
     17 * @author     Shane Caraveo <[email protected]>   Port to PEAR and more 
     18 * @author     Jan Schneider <[email protected]>       Maintenance 
     19 * @copyright  2003-2007 The PHP Group 
     20 * @license    http://www.php.net/license/2_02.txt  PHP License 2.02 
     21 * @link       http://pear.php.net/package/SOAP 
     22 */ 
    2523 
    26 print "<br>\n<strong>wsdl:</strong>"; 
    27 $wsdl = new SOAP_WSDL("http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl"); 
     24/* Include SOAP_Client class. */ 
     25require_once 'SOAP/Client.php'; 
     26 
     27echo '<br><strong>wsdl:</strong>'; 
     28$wsdl = new SOAP_WSDL('http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl'); 
    2829$soapclient = $wsdl->getProxy(); 
    29 print_r($soapclient->getQuote("ibm")); 
    30 print "\n\n"; 
     30$ret = $soapclient->call('getQuote', array('symbol' => 'ibm')); 
     31print_r($ret); 
    3132 
    3233if (extension_loaded('overload')) { 
    33     print "\n<br><strong>overloaded:</strong>"; 
    34     $ret = $soapclient->getQuote("ibm"); 
     34    echo '<br><strong>overloaded:</strong>'; 
     35    $ret = $soapclient->getQuote('ibm'); 
    3536    print_r($ret); 
    36     print "\n\n"; 
    3737} 
    38 unset($soapclient); 
    3938 
    40 print "\n<br><strong>non wsdl:</strong>"; 
    41 $soapclient = new SOAP_Client("http://services.xmethods.net:80/soap"); 
    42 $namespace = "urn:xmethods-delayed-quotes"; 
    43 /** 
    44  * some soap servers require a Soapaction http header.  PEAR::SOAP does 
    45  * not use them in any way, other to send them if you supply them. 
    46  * soapaction is deprecated in later SOAP versions. 
    47  */ 
    48 $soapaction = "urn:xmethods-delayed-quotes#getQuote"; 
    49 $ret = $soapclient->call("getQuote",array("symbol"=>"ibm"),$namespace,$soapaction); 
     39echo '<br><strong>non wsdl:</strong>'; 
     40$soapclient = new SOAP_Client('http://services.xmethods.net:80/soap'); 
     41$namespace = 'urn:xmethods-delayed-quotes'; 
     42/* Some SOAP servers require a Soapaction HTTP header.  PEAR::SOAP does not 
     43 * use them in any way, other to send them if you supply them.  soapaction is 
     44 * deprecated in later SOAP versions. */ 
     45$soapaction = 'urn:xmethods-delayed-quotes#getQuote'; 
     46$ret = $soapclient->call('getQuote', 
     47                         array('symbol' => 'ibm'), 
     48                         $namespace, 
     49                         $soapaction); 
    5050print_r($ret); 
    51 print "\n\n"; 
    52 unset($soapclient); 
    5351 
    5452?> 
Note: See TracChangeset for help on using the changeset viewer.