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

Source for file server_Round3GroupDImport2.php

Documentation is available at server_Round3GroupDImport2.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_Round3GroupDImport2.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_GroupDImport2 {
  28.  
  29.     function echoStruct($inputStruct)
  30.     {
  31.         if (is_object($inputStruct&&
  32.             strtolower(get_class($inputStruct)) == 'soapstruct'{
  33.             return $inputStruct->__to_soap('Result');
  34.         else {
  35.             if (is_object($inputStruct)) {
  36.                 $inputStruct get_object_vars($inputStruct);
  37.             }
  38.             $struct = new SOAPStruct($inputStruct['varString']$inputStruct['varInt']$inputStruct['varFloat']);
  39.             return $struct->__to_soap('Result');
  40.         }
  41.     }
  42.    
  43. }
  44.  
  45. // http://www.whitemesa.com/r3/interop3.html
  46. // http://www.whitemesa.com/r3/plan.html
  47.  
  48. $groupd = new SOAP_Interop_GroupDImport2();
  49. $server = new SOAP_Server();
  50. $server->_auto_translation = true;
  51.  
  52. $server->addObjectMap($groupd'http://soapinterop/');
  53. $server->addObjectMap($groupd'http://soapinterop.org/xsd');
  54.  
  55. if (isset($_SERVER['SERVER_NAME'])) {
  56.     $baseurl 'http://' $_SERVER['SERVER_NAME'':' $_SERVER['SERVER_PORT''/soap_interop/';
  57.     $server->service(isset($HTTP_RAW_POST_DATA$HTTP_RAW_POST_DATA : null);
  58. else {
  59.     $baseurl 'http://localhost/soap_interop/';
  60.     $server->bind($baseurl.'wsdl/import2.wsdl.php');
  61.     // allows command line testing of specific request
  62.     $test '<?xml version="1.0" encoding="UTF-8"?>
  63.  
  64. <SOAP-ENV:Envelope  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  65.  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  66.  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  67.  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  68.  xmlns:ns4="http://soapinterop.org/xsd"
  69.  xmlns:ns5="http://soapinterop/"
  70.  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  71. <SOAP-ENV:Body>
  72.  
  73. <ns5:echoStruct>
  74. <inputStruct xsi:type="ns4:SOAPStruct">
  75. <varString xsi:type="xsd:string">arg</varString>
  76. <varInt xsi:type="xsd:int">34</varInt>
  77. <varFloat xsi:type="xsd:float">325.325</varFloat></inputStruct></ns5:echoStruct>
  78. </SOAP-ENV:Body>
  79. </SOAP-ENV:Envelope>';
  80.     $server->service($test''true);
  81. }

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