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

Source for file server_Round3GroupDCompound2.php

Documentation is available at server_Round3GroupDCompound2.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_Round3GroupDCompound2.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_GroupDCompound2 {
  28.  
  29.     function echoEmployee(&$employee)
  30.     {
  31.         return $employee->__to_soap('result_Employee');
  32.     }
  33.     
  34. }
  35.  
  36. // http://www.whitemesa.com/r3/interop3.html
  37. // http://www.whitemesa.com/r3/plan.html
  38.  
  39. $options = array('use' => 'literal''style' => 'document');
  40. $groupd = new SOAP_Interop_GroupDCompound2();
  41. $server = new SOAP_Server($options);
  42. $server->_auto_translation = true;
  43.  
  44. $server->addObjectMap($groupd'http://soapinterop.org/employee');
  45.  
  46. $server->bind('http://localhost/soap_interop/wsdl/compound2.wsdl.php');
  47. if (isset($_SERVER['SERVER_NAME'])) {
  48.     $server->service(isset($HTTP_RAW_POST_DATA$HTTP_RAW_POST_DATA : NULL);
  49. else {
  50.     $test '<?xml version="1.0" encoding="UTF-8"?>
  51.     
  52.     <SOAP-ENV:Envelope  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  53.      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  54.      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  55.      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  56.      xmlns:ns4="http://soapinterop.org/person"
  57.      xmlns:ns5="http://soapinterop.org/employee"
  58.     >
  59.     <SOAP-ENV:Body>
  60.     
  61.     <ns5:x_Employee>
  62.     <ns5:person>
  63.     <ns4:Name>Shane</ns4:Name>
  64.     <ns4:Male>true</ns4:Male></ns5:person>
  65.     <ns5:salary>1000000</ns5:salary>
  66.     <ns5:ID>12345</ns5:ID></ns5:x_Employee>
  67.     </SOAP-ENV:Body>
  68.     </SOAP-ENV:Envelope>';
  69.     $server->service($test''true);
  70. }

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