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

Source for file server_Round3GroupDDocLit.php

Documentation is available at server_Round3GroupDDocLit.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_Round3GroupDDocLit.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_GroupDDocLit {
  28.  
  29.     // wsdlns:SoapInteropEmptySABinding
  30.     function echoString($inputString)
  31.     {
  32.         return new SOAP_Value('{http://soapinterop.org/xsd}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('{http://soapinterop.org/xsd}echoStringArrayReturn'null$ra);
  44.     }
  45.  
  46.     function echoStruct($inputStruct)
  47.     {
  48.         $ns '{http://soapinterop.org/xsd}';
  49.         if (is_object($inputStruct&&
  50.             strtolower(get_class($inputStruct)) == 'soapstruct'{
  51.             return $inputStruct->__to_soap($ns.'echoStructReturn');
  52.         else {
  53.             if (is_object($inputStruct)) {
  54.                 $inputStruct get_object_vars($inputStruct);
  55.             }
  56.             $struct = new SOAPStruct($inputStruct['varString']$inputStruct['varInt']$inputStruct['varFloat']);
  57.             return $struct->__to_soap($ns.'echoStructReturn');
  58.         }
  59.     }
  60.  
  61. }
  62.  
  63. // http://www.whitemesa.com/r3/interop3.html
  64. // http://www.whitemesa.com/r3/plan.html
  65.  
  66. $options = array('use'=>'literal''style'=>'document');
  67. $groupd = new SOAP_Interop_GroupDDocLit();
  68. $server = new SOAP_Server($options);
  69. $server->_auto_translation = true;
  70.  
  71. $server->addObjectMap($groupd'http://soapinterop.org/WSDLInteropTestDocLit');
  72. $server->addObjectMap($groupd'http://soapinterop.org/xsd');
  73.  
  74. $server->bind('http://localhost/soap_interop/wsdl/InteropTestDocLit.wsdl.php');
  75.  
  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:echoStructParam>
  91. <ns4:varString>arg</ns4:varString>
  92. <ns4:varInt>34</ns4:varInt>
  93. <ns4:varFloat>325.325</ns4:varFloat></ns4:echoStructParam>
  94. </SOAP-ENV:Body>
  95. </SOAP-ENV:Envelope>';
  96.     $server->service($test''true);
  97. }

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