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.5 2004/06/10 07:54:03 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_GroupDDocLit {
  28.     // wsdlns:SoapInteropEmptySABinding
  29.     function &echoString($inputString)
  30.     {
  31.     return new SOAP_Value('{http://soapinterop.org/xsd}echoStringReturn','string',$inputString);
  32.     }
  33.  
  34.     function &echoStringArray($inputStringArray)
  35.     {
  36.     $ra = array();
  37.     if ($inputStringArray{
  38.     foreach($inputStringArray as $s{
  39.         $ra[=new SOAP_Value('item','string',$s);
  40.     }
  41.     }
  42.     return new SOAP_Value('{http://soapinterop.org/xsd}echoStringArrayReturn',NULL,$ra);
  43.     }
  44.  
  45.     function &echoStruct($inputStruct)
  46.     {
  47.         $ns '{http://soapinterop.org/xsd}';
  48.         if (is_object($inputStruct&& strtolower(get_class($inputStruct)) == 'soapstruct')
  49.             return $inputStruct->__to_soap($ns.'echoStructReturn');
  50.         else {
  51.             if (is_object($inputStruct)) {
  52.                 $inputStruct get_object_vars($inputStruct);
  53.             }
  54.             $struct =new SOAPStruct($inputStruct['varString'],$inputStruct['varInt'],$inputStruct['varFloat']);
  55.             return $struct->__to_soap($ns.'echoStructReturn');
  56.         }
  57.     }
  58. }
  59.  
  60.  
  61. // http://www.whitemesa.com/r3/interop3.html
  62. // http://www.whitemesa.com/r3/plan.html
  63.  
  64. $options = array('use'=>'literal','style'=>'document');
  65. $groupd =new SOAP_Interop_GroupDDocLit();
  66. $server =new SOAP_Server($options);
  67. $server->_auto_translation = true;
  68.  
  69. $server->addObjectMap($groupd,'http://soapinterop.org/WSDLInteropTestDocLit');
  70. $server->addObjectMap($groupd,'http://soapinterop.org/xsd');
  71.  
  72. $server->bind('http://localhost/soap_interop/wsdl/InteropTestDocLit.wsdl.php');
  73.  
  74. if (isset($_SERVER['SERVER_NAME'])) {
  75.     $server->service(isset($HTTP_RAW_POST_DATA)?$HTTP_RAW_POST_DATA:NULL);
  76. else {
  77.     // allows command line testing of specific request
  78.     $test '<?xml version="1.0" encoding="UTF-8"?>
  79.  
  80. <SOAP-ENV:Envelope  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  81.  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  82.  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  83.  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  84.  xmlns:ns4="http://soapinterop.org/xsd"
  85. >
  86. <SOAP-ENV:Body>
  87.  
  88. <ns4:echoStructParam>
  89. <ns4:varString>arg</ns4:varString>
  90. <ns4:varInt>34</ns4:varInt>
  91. <ns4:varFloat>325.325</ns4:varFloat></ns4:echoStructParam>
  92. </SOAP-ENV:Body>
  93. </SOAP-ENV:Envelope>';
  94.     $server->service($test,'',TRUE);
  95. }
  96. ?>

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