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

Source for file server_Round3GroupDImport3.php

Documentation is available at server_Round3GroupDImport3.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_Round3GroupDImport3.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_GroupDImport3 {
  28.     function &echoStruct($inputStruct)
  29.     {
  30.         $ns '{http://soapinterop.org/xsd}';
  31.         if (is_object($inputStruct&& strtolower(get_class($inputStruct)) == 'soapstruct')
  32.             return $inputStruct->__to_soap($ns.'return');
  33.         else {
  34.             if (is_object($inputStruct)) {
  35.                 $inputStruct get_object_vars($inputStruct);
  36.             }
  37.             $struct =new SOAPStruct($inputStruct['varString'],$inputStruct['varInt'],$inputStruct['varFloat']);
  38.             return $struct->__to_soap($ns.'return');
  39.         }
  40.     }
  41.  
  42.     function &echoStructArray($inputStructArray)
  43.     {
  44.     $ra = array();
  45.     if ($inputStructArray{
  46.         $c count($inputStructArray);
  47.         for ($i = 0; $i $c$i++{
  48.             $ra[$inputStructArray[$i]->__to_soap('item');
  49.         }
  50.     }
  51.     return $ra;
  52.     }
  53. }
  54.  
  55.  
  56. // http://www.whitemesa.com/r3/interop3.html
  57. // http://www.whitemesa.com/r3/plan.html
  58.  
  59. $groupd =new SOAP_Interop_GroupDImport3();
  60. $server =new SOAP_Server();
  61. $server->_auto_translation = true;
  62.  
  63. $server->addObjectMap($groupd,'http://soapinterop/');
  64. $server->addObjectMap($groupd,'http://soapinterop.org/xsd');
  65.  
  66. $server->bind('http://localhost/soap_interop/wsdl/import3.wsdl.php');
  67. if (isset($_SERVER['SERVER_NAME'])) {
  68.     $server->service(isset($HTTP_RAW_POST_DATA)?$HTTP_RAW_POST_DATA:NULL);
  69. else {
  70.     // allows command line testing of specific request
  71.     $test '<?xml version="1.0" encoding="UTF-8"?>
  72.  
  73. <SOAP-ENV:Envelope  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  74.  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  75.  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  76.  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  77.  xmlns:ns4="http://soapinterop.org/xsd"
  78.  xmlns:ns5="http://soapinterop/"
  79.  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  80. <SOAP-ENV:Body>
  81.  
  82. <ns5:echoStructArray>
  83. <inputArray xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="ns4:SOAPStruct[3]" SOAP-ENC:offset="[0]">
  84. <item>
  85. <varString xsi:type="xsd:string">arg</varString>
  86. <varInt xsi:type="xsd:int">34</varInt>
  87. <varFloat xsi:type="xsd:float">325.325</varFloat></item>
  88. <item>
  89. <varString xsi:type="xsd:string">arg</varString>
  90. <varInt xsi:type="xsd:int">34</varInt>
  91. <varFloat xsi:type="xsd:float">325.325</varFloat></item>
  92. <item>
  93. <varString xsi:type="xsd:string">arg</varString>
  94. <varInt xsi:type="xsd:int">34</varInt>
  95. <varFloat xsi:type="xsd:float">325.325</varFloat></item></inputArray></ns5:echoStructArray>
  96. </SOAP-ENV:Body>
  97. </SOAP-ENV:Envelope>';
  98.     $server->service($test,'',TRUE);
  99. }
  100. ?>

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