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

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