server_round2_groupB.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?
  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 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. //
  20. // $Id$
  21. //
  22. class SOAP_Interop_GroupB {
  23. function echoStructAsSimpleTypes ($struct)
  24. {
  25. return array('outputString' => $struct->varString,
  26. 'outputInteger' => $struct->varInt,
  27. 'outputFloat' => $struct->varFloat);
  28. }
  29. function echoSimpleTypesAsStruct($string, $int, $float)
  30. {
  31. return (object)array("varString" => $string,
  32. "varInt" => $int,
  33. "varFloat" => $float);
  34. }
  35. function echoNestedStruct($struct)
  36. {
  37. return $struct;
  38. }
  39. function echo2DStringArray($ary)
  40. {
  41. return $ary;
  42. }
  43. function echoNestedArray($ary)
  44. {
  45. return $ary;
  46. }
  47. }
  48. $server = new SoapServer((isset($_SERVER['HTTPS'])?"https://":"http://").$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/interopB.wsdl.php");
  49. $server->setClass("SOAP_Interop_GroupB");
  50. $server->handle();
  51. ?>