server_round2_groupB.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?
  2. //
  3. // +----------------------------------------------------------------------+
  4. // | PHP Version 4 |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 1997-2018 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 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> Port to PEAR and more |
  17. // | Authors: Dietrich Ayala <dietrich@ganx4.com> Original Author |
  18. // +----------------------------------------------------------------------+
  19. class SOAP_Interop_GroupB {
  20. function echoStructAsSimpleTypes ($struct)
  21. {
  22. return array('outputString' => $struct->varString,
  23. 'outputInteger' => $struct->varInt,
  24. 'outputFloat' => $struct->varFloat);
  25. }
  26. function echoSimpleTypesAsStruct($string, $int, $float)
  27. {
  28. return (object)array("varString" => $string,
  29. "varInt" => $int,
  30. "varFloat" => $float);
  31. }
  32. function echoNestedStruct($struct)
  33. {
  34. return $struct;
  35. }
  36. function echo2DStringArray($ary)
  37. {
  38. return $ary;
  39. }
  40. function echoNestedArray($ary)
  41. {
  42. return $ary;
  43. }
  44. }
  45. $server = new SoapServer((isset($_SERVER['HTTPS'])?"https://":"http://").$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/interopB.wsdl.php");
  46. $server->setClass("SOAP_Interop_GroupB");
  47. $server->handle();
  48. ?>