SOAP
[ class tree: SOAP ] [ index: SOAP ] [ all elements ]

Source for file TEST.php

Documentation is available at TEST.php

  1. <?php
  2. /**
  3.  * This file contains the code for a local transport layer for testing
  4.  * purposes.
  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 license@php.net so we can
  13.  * mail you a copy immediately.
  14.  *
  15.  * @category   Web Services
  16.  * @package    SOAP
  17.  * @author     Jan Schneider <jan@horde.org>
  18.  * @copyright  2008 The PHP Group
  19.  * @license    http://www.php.net/license/2_02.txt  PHP License 2.02
  20.  * @link       http://pear.php.net/package/SOAP
  21.  */
  22.  
  23. require_once 'SOAP/Transport.php';
  24.  
  25. /**
  26.  * Test transport for SOAP.
  27.  *
  28.  * @access  public
  29.  * @package SOAP
  30.  * @author  Jan Schneider <jan@horde.org>
  31.  */
  32. {
  33.     /**
  34.      * Sends and receives SOAP data.
  35.      *
  36.      * @param string $msg     Outgoing SOAP data.
  37.      * @param array $options  Options.
  38.      *
  39.      * @return string|SOAP_Fault
  40.      */
  41.     function send($msg$options = array())
  42.     {
  43.         $_SERVER['REQUEST_METHOD''POST';
  44.         $this->outgoing_payload = $msg;
  45.         ob_start();
  46.         $server = clone($options['server']);
  47.         $server->service($msg);
  48.         $this->incoming_payload = ob_get_contents();
  49.         ob_end_clean();
  50.         return $this->incoming_payload;
  51.     }
  52.  
  53. }

Documentation generated on Mon, 04 Aug 2008 20:00:33 -0400 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.