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

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