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

Source for file server_Round3GroupDDocLitParams.php

Documentation is available at server_Round3GroupDDocLitParams.php

  1. <?php
  2. //
  3. // +----------------------------------------------------------------------+
  4. // | PHP Version 4                                                        |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 1997-2003 The PHP Group                                |
  7. // +----------------------------------------------------------------------+
  8. // | 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        |
  10. // | available at through the world-wide-web at                           |
  11. // | http://www.php.net/license/2_02.txt.                                 |
  12. // | If you did not receive a copy of the PHP license and are unable to   |
  13. // | obtain it through the world-wide-web, please send a note to          |
  14. // | license@php.net so we can mail you a copy immediately.               |
  15. // +----------------------------------------------------------------------+
  16. // | Authors: Shane Caraveo <Shane@Caraveo.com>                           |
  17. // +----------------------------------------------------------------------+
  18. //
  19. // $Id: server_Round3GroupDDocLitParams.php,v 1.4 2003/08/05 16:56:43 arnaud Exp $
  20. //
  21. require_once 'SOAP/Server.php';
  22. require_once 'params_classes.php';
  23.  
  24. // http://www.whitemesa.com/r3/interop3.html
  25. // http://www.whitemesa.com/r3/plan.html
  26.  
  27. class SOAP_Interop_GroupDDocLitParams {
  28.     function &echoString($inputString)
  29.     {
  30.     return new SOAP_Value('return','string',$inputString);
  31.     }
  32.  
  33.     function &echoStringArray($inputStringArray)
  34.     {
  35.     $ra = array();
  36.     if ($inputStringArray{
  37.     foreach($inputStringArray as $s{
  38.         $ra[=new SOAP_Value('item','string',$s);
  39.     }
  40.     }
  41.     return new SOAP_Value('return',NULL,$ra);
  42.     }
  43.  
  44.     function &echoStruct($inputStruct)
  45.     {
  46.         if (is_object($inputStruct&& get_class($inputStruct)=='soapstruct')
  47.             return $inputStruct->__to_soap('return');
  48.         else {
  49.             if (is_object($inputStruct)) {
  50.                 $inputStruct get_object_vars($inputStruct);
  51.             }
  52.             $struct =new SOAPStruct($inputStruct['varString'],$inputStruct['varInt'],$inputStruct['varFloat']);
  53.             return $struct->__to_soap('return');
  54.         }
  55.     }
  56.  
  57.     function echoVoid()
  58.     {
  59.     return NULL;
  60.     }
  61. }
  62.  
  63.  
  64. // http://www.whitemesa.com/r3/interop3.html
  65. // http://www.whitemesa.com/r3/plan.html
  66.  
  67. $options = array('use'=>'literal','style'=>'document');
  68. $groupd =new SOAP_Interop_GroupDDocLitParams();
  69. $server =new SOAP_Server($options);
  70. $server->_auto_translation = true;
  71.  
  72. $server->addObjectMap($groupd,'http://soapinterop/');
  73. $server->addObjectMap($groupd,'http://soapinterop.org/xsd');
  74.  
  75. $server->bind('http://localhost/soap_interop/wsdl/InteropTestDocLitParameters.wsdl.php');
  76. if (isset($_SERVER['SERVER_NAME'])) {
  77.     $server->service(isset($HTTP_RAW_POST_DATA)?$HTTP_RAW_POST_DATA:NULL);
  78. else {
  79.     // allows command line testing of specific request
  80.     $test '<?xml version="1.0" encoding="UTF-8"?>
  81.  
  82. <SOAP-ENV:Envelope  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  83.  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  84.  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  85.  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  86.  xmlns:ns4="http://soapinterop.org/xsd"
  87. >
  88. <SOAP-ENV:Body>
  89.  
  90. <ns4:echoVoid/>
  91. </SOAP-ENV:Body>
  92. </SOAP-ENV:Envelope>';
  93.     $server->service($test,'',TRUE);
  94. }
  95. ?>

Documentation generated on Mon, 11 Mar 2019 14:54:35 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.