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

Source for file params_values.php

Documentation is available at params_values.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: params_values.php,v 1.6 2007/01/21 16:15:00 yunosh Exp $
  20. //
  21. require_once 'SOAP/Value.php';
  22. require_once 'params_classes.php';
  23.  
  24. $soap_test_null = NULL;
  25.  
  26. $string 'Hello World';
  27. $string_soapval =new SOAP_Value('inputString','string',$string);
  28. $string_null = NULL;
  29. $string_null_soapval =new SOAP_Value('inputString','string',$string_null);
  30. $string_entities "this is a test <hello>\n";
  31. $string_entities_soapval =new SOAP_Value('inputString','string',$string_entities);
  32. $string_utf8 utf8_encode('ỗÈéóÒ₧⅜ỗỸ');
  33. $string_utf8_soapval =new SOAP_Value('inputString','string',$string_utf8);
  34. $string_array = array('good','bad');
  35. $v[=new SOAP_Value('item','string','good');
  36. $v[=new SOAP_Value('item','string','bad');
  37. $string_array_soapval =new SOAP_Value('inputStringArray','Array',$v);
  38.  
  39. $string_array_one = array('good');
  40. $v = array();
  41. $v[=new SOAP_Value('item','string','good');
  42. $string_array_one_soapval =new SOAP_Value('inputStringArray','Array',$v);
  43.  
  44. $string_array_null = NULL;
  45. $string_array_null_soapval =new SOAP_Value('inputStringArray','Array',NULL);
  46. $string_array_null_soapval->arrayType='{http://www.w3.org/2001/XMLSchema}string';
  47.  
  48. $integer = 12345;
  49. $integer_soapval =new SOAP_Value('inputInteger','int',$integer);
  50. $integer_array = array(1,234324324,2);
  51. $v = array();
  52. $v[=new SOAP_Value('item','int',1);
  53. $v[=new SOAP_Value('item','int',234324324);
  54. $v[=new SOAP_Value('item','int',2);
  55. $integer_array_soapval =new SOAP_Value('inputIntegerArray','Array',$v);
  56.  
  57. $integer_array_null = NULL;
  58. $integer_array_null_soapval =new SOAP_Value('inputIntegerArray','Array',NULL);
  59. $integer_array_null_soapval->arrayType='{http://www.w3.org/2001/XMLSchema}int';
  60.  
  61. $float = 123.45;
  62. $float_soapval =new SOAP_Value('inputFloat','float',$float);
  63. $float_array = array(1.0,2343.24324,-2.5);
  64. $v = array();
  65. $v[=new SOAP_Value('item','float',1.0);
  66. $v[=new SOAP_Value('item','float',2343.24324);
  67. $v[=new SOAP_Value('item','float',-2.5);
  68. $float_array_soapval =new SOAP_Value('inputFloatArray','Array',$v);
  69.  
  70. $float_array_null = NULL;
  71. $float_array_null_soapval =new SOAP_Value('inputFloatArray','Array',NULL);
  72. $float_array_null_soapval->arrayType='{http://www.w3.org/2001/XMLSchema}float';
  73.  
  74. $soapstruct =new SOAPStruct('arg',34,325.325);
  75. $soapstruct_soapval $soapstruct->__to_soap();
  76. $soapstruct_header_soapval $soapstruct->__to_soap('{http://soapinterop.org/echoheader/}echoMeStructRequest');
  77. $soapstruct_array = array(&$soapstruct&$soapstruct&$soapstruct);
  78. $soapstruct_array_soapval =new SOAP_Value('inputStructArray','Array',
  79.     array(&$soapstruct_soapval,&$soapstruct_soapval,&$soapstruct_soapval));
  80.  
  81. $soapstructstruct =new SOAPStructStruct('arg',34,325.325,$soapstruct);
  82. $soapstructstruct_soapval $soapstructstruct->__to_soap();
  83. $soapstructstruct_array = array(&$soapstructstruct&$soapstructstruct&$soapstructstruct);
  84. $soapstructstruct_array_soapval =new SOAP_Value('inputStructArray','Array',
  85.     array(&$soapstructstruct_soapval,&$soapstructstruct_soapval,&$soapstructstruct_soapval));
  86.  
  87. $soaparraystruct =new SOAPArrayStruct('arg',34,325.325,array('good','bad','ugly'));
  88. $soaparraystruct_soapval $soaparraystruct->__to_soap();
  89. $soaparraystruct_array = array(&$soaparraystruct&$soaparraystruct&$soaparraystruct);
  90. $soaparraystruct_array_soapval =new SOAP_Value('inputStructArray','Array',
  91.     array(&$soaparraystruct_soapval,&$soaparraystruct_soapval,&$soaparraystruct_soapval));
  92.  
  93. $simpletypes = array(
  94.         'inputString'=>'arg',
  95.         'inputInteger'=>34,
  96.         'inputFloat'=>325.325
  97.     );
  98.  
  99. $simpletypes_soapval = array();
  100. $simpletypes_soapval[=new SOAP_Value('inputString','string','arg');
  101. $simpletypes_soapval[=new SOAP_Value('inputInteger','int',34);
  102. $simpletypes_soapval[=new SOAP_Value('inputFloat','float',325.325);
  103.  
  104. $base64 'TmVicmFza2E=';
  105. $base64_soapval =new SOAP_Value('inputBase64','base64Binary',$base64);
  106.  
  107. $hexBin '736F61707834';
  108. $hexBin_soapval =new SOAP_Value('inputHexBinary','hexBinary',$hexBin);
  109.  
  110. $decimal = 12345.67890;
  111. $decimal_soapval =new SOAP_Value('inputDecimal','decimal',$decimal);
  112.  
  113. $dateTime '2001-05-24T17:31:41Z';
  114. $dateTime_soapval =new SOAP_Value('inputDate','dateTime',$dateTime);
  115.  
  116. $boolean_true = TRUE;
  117. $boolean_true_soapval =new SOAP_Value('inputBoolean','boolean',TRUE);
  118. $boolean_false = FALSE;
  119. $boolean_false_soapval =new SOAP_Value('inputBoolean','boolean',FALSE);
  120. $boolean_one = 1;
  121. $boolean_one_soapval =new SOAP_Value('inputBoolean','boolean',1);
  122. $boolean_zero = 0;
  123. $boolean_zero_soapval =new SOAP_Value('inputBoolean','boolean',0);
  124.  
  125. # XXX I know this isn't quite right, need to deal with this better
  126. function &make_2d($x$y)
  127. {
  128.     $a = array();
  129.     for ($_x = 0; $_x $x$_x++{
  130.         $a[$_x= array();
  131.         for ($_y = 0; $_y $y$_y++{
  132.             $a[$_x][$_y= "x{$_x}y{$_y}";
  133.         }
  134.     }
  135.     return $a;
  136. }
  137.  
  138. $multidimarray make_2d(3,3);
  139. $v = array();
  140. $v[0][=new SOAP_Value('item','string','row0col0');
  141. $v[0][=new SOAP_Value('item','string','row0col1');
  142. $v[0][=new SOAP_Value('item','string','row0col2');
  143. $v[1][=new SOAP_Value('item','string','row1col0');
  144. $v[1][=new SOAP_Value('item','string','row1col1');
  145. $v[1][=new SOAP_Value('item','string','row1col2');
  146. $multidimarray_soapval =&
  147.     new SOAP_Value('input2DStringArray','Array',$v);
  148.  
  149. $multidimarray_soapval->options['flatten'= TRUE;
  150.  
  151. // Round2GroupC values
  152. $_person =new Person(32,12345,'Shane',TRUE);
  153. $person $_person->__to_soap();
  154. $_employee =new Employee($_person,12345,1000000.00);
  155. $employee $_employee->__to_soap();

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