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

Source for file server_Round3GroupDRpcEnc.php

Documentation is available at server_Round3GroupDRpcEnc.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_Round3GroupDRpcEnc.php,v 1.6 2007/01/22 14:53:22 yunosh 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_GroupDRpcEnc {
  28.  
  29.     // wsdlns:SoapInteropEmptySABinding
  30.     function echoString($inputString)
  31.     {
  32.         return new SOAP_Value('echoStringReturn''string'$inputString);
  33.     }
  34.  
  35.     function echoStringArray($inputStringArray)
  36.     {
  37.         $ra = array();
  38.         if ($inputStringArray{
  39.             foreach($inputStringArray as $s{
  40.                 $ra[= new SOAP_Value('item''string'$s);
  41.             }
  42.         }
  43.         return new SOAP_Value('echoStringArrayReturn'null$ra);
  44.     }
  45.  
  46.     function echoStruct($inputStruct)
  47.     {
  48.         if (is_object($inputStruct&&
  49.             strtolower(get_class($inputStruct)) == 'soapstruct'{
  50.             return $inputStruct->__to_soap('return');
  51.         else {
  52.             if (is_object($inputStruct)) {
  53.                 $inputStruct get_object_vars($inputStruct);
  54.             }
  55.             $struct = new SOAPStruct($inputStruct['varString']$inputStruct['varInt']$inputStruct['varFloat']);
  56.             return $struct->__to_soap('return');
  57.         }
  58.     }
  59.  
  60.     function echoVoid()
  61.     {
  62.         return null;
  63.     }
  64.  
  65. }
  66.  
  67. // http://www.whitemesa.com/r3/interop3.html
  68. // http://www.whitemesa.com/r3/plan.html
  69.  
  70. $groupd = new SOAP_Interop_GroupDRpcEnc();
  71. $server = new SOAP_Server();
  72. $server->_auto_translation = true;
  73.  
  74. $server->addObjectMap($groupd'http://soapinterop/');
  75. $server->addObjectMap($groupd'http://soapinterop.org/xsd');
  76. $server->addObjectMap($groupd'http://soapinterop.org/WSDLInteropTestRpcEnc');
  77.  
  78. $server->bind('http://localhost/soap_interop/wsdl/InteropTestRpcEnc.wsdl.php');
  79. $server->service(isset($HTTP_RAW_POST_DATA$HTTP_RAW_POST_DATA : null);

Documentation generated on Mon, 11 Mar 2019 15:06:27 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.