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

Source for file server_Round3GroupDCompound1.php

Documentation is available at server_Round3GroupDCompound1.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_Round3GroupDCompound1.php,v 1.5 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_GroupDCompound1 {
  28.  
  29.     function echoPerson($person)
  30.     {
  31.         return $person->__to_soap('result_Person');
  32.     }
  33.  
  34.     function echoDocument($document)
  35.     {
  36.         $ns '{http://soapinterop.org/xsd}';
  37.         return new SOAP_Value($ns 'result_Document'$ns 'x_Document'$document);
  38.     }
  39.  
  40. }
  41.  
  42. // http://www.whitemesa.com/r3/interop3.html
  43. // http://www.whitemesa.com/r3/plan.html
  44.  
  45. $options = array('use' => 'literal''style' => 'document');
  46. $groupd = new SOAP_Interop_GroupDCompound1();
  47. $server = new SOAP_Server($options);
  48. $server->_auto_translation = true;
  49.  
  50. $server->addObjectMap($groupd'http://soapinterop/');
  51. $server->addObjectMap($groupd'http://soapinterop.org/xsd');
  52.  
  53. $server->bind('http://localhost/soap_interop/wsdl/compound1.wsdl.php');
  54. if (isset($_SERVER['SERVER_NAME'])) {
  55.     $server->service(isset($HTTP_RAW_POST_DATA$HTTP_RAW_POST_DATA : null);
  56. else {
  57.     // allows command line testing of specific request
  58.     $test '<?xml version="1.0" encoding="UTF-8"?>
  59.  
  60. <SOAP-ENV:Envelope  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  61.  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  62.  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  63.  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  64.  xmlns:ns4="http://soapinterop.org/xsd"
  65. >
  66. <SOAP-ENV:Body>
  67.  
  68. <ns4:x_Document>Test Document Here</ns4:x_Document>
  69. </SOAP-ENV:Body>
  70. </SOAP-ENV:Envelope>';
  71.     $server->service($test''true);
  72. }

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