1<?php 2class SOAP_Interop_GroupI { 3 4 function echoString($inputString) 5 { 6 if (isset($inputString->inputString)) { 7 return array("return"=>$inputString->inputString); 8 } else { 9 return $inputString; 10 } 11 } 12 13 function echoInteger($inputInteger) 14 { 15 return array("return"=>$inputInteger->inputInteger); 16 } 17 18 function echoFloat($inputFloat) 19 { 20 return array("return"=>$inputFloat->inputFloat); 21 } 22 23 function echoVoid() 24 { 25 } 26 27 function echoBase64($inputBase64) 28 { 29 if (isset($inputBase64->inputBase64)) { 30 return array("return"=>$inputBase64->inputBase64); 31 } else { 32 return $inputBase64; 33 } 34 } 35 36 function echoDate($timeInstant) 37 { 38 return array("return"=>$timeInstant->inputDate); 39 } 40 41 function echoComplexType($inputComplexType) 42 { 43 if (isset($inputComplexType->inputComplexType)) { 44 return array("return"=>$inputComplexType->inputComplexType); 45 } else { 46 return $inputComplexType; 47 } 48 } 49 50 function echoIntegerMultiOccurs($input) 51 { 52 if (isset($input->inputIntegerMultiOccurs->int)) { 53 return array("return"=>$input->inputIntegerMultiOccurs->int); 54 } else { 55 return array(); 56 } 57 } 58 59 function echoFloatMultiOccurs($input) 60 { 61 if (isset($input->inputFloatMultiOccurs->float)) { 62 return array("return"=>$input->inputFloatMultiOccurs->float); 63 } else { 64 return array(); 65 } 66 } 67 68 function echoStringMultiOccurs($input) 69 { 70 if (isset($input->inputStringMultiOccurs->string)) { 71 return array("return"=>$input->inputStringMultiOccurs->string); 72 } else { 73 return array(); 74 } 75 } 76 77 function echoComplexTypeMultiOccurs($input) 78 { 79 if (isset($input->inputComplexTypeMultiOccurs->SOAPComplexType)) { 80 return array("return"=>$input->inputComplexTypeMultiOccurs->SOAPComplexType); 81 } else { 82 return array(); 83 } 84 } 85 86 function echoHexBinary($hb) 87 { 88 if (isset($hb->inputHexBinary)) { 89 return array("return"=>$hb->inputHexBinary); 90 } else { 91 return $hb; 92 } 93 } 94 95 function echoDecimal($dec) 96 { 97 return array("return"=>$dec->inputDecimal); 98 } 99 100 function echoBoolean($boolean) 101 { 102 return array("return"=>$boolean->inputBoolean); 103 } 104 105 function echoComplexTypeAsSimpleTypes($input) 106 { 107 if (isset($input->inputComplexType)) { 108 $ret = array("outputInteger" => $input->inputComplexType->varInt, 109 "outputFloat" => $input->inputComplexType->varFloat); 110 if (isset($input->inputComplexType->varString)) { 111 $ret["outputString"] = $input->inputComplexType->varString; 112 } 113 return $ret; 114 } else { 115 return array(); 116 } 117 } 118 119 function echoSimpleTypesAsComplexType($input) 120 { 121 $ret = array("varInt" => $input->inputInteger, 122 "varFloat" => $input->inputFloat); 123 if (isset($input->inputString)) { 124 $ret["varString"] = $input->inputString; 125 } 126 return array("return"=>$ret); 127 } 128 129 function echoNestedComplexType($inputComplexType) 130 { 131 if (isset($inputComplexType->inputComplexType)) { 132 return array("return"=>$inputComplexType->inputComplexType); 133 } else { 134 return $inputComplexType; 135 } 136 } 137 138 function echoNestedMultiOccurs($inputComplexType) 139 { 140 if (isset($inputComplexType->inputComplexType)) { 141 return array("return"=>$inputComplexType->inputComplexType); 142 } else { 143 return $inputComplexType; 144 } 145 } 146 147 function echoChoice($input) 148 { 149 if (isset($input->inputChoice)) { 150 return array("return"=>$input->inputChoice); 151 } else { 152 return $input; 153 } 154 } 155 156 function echoEnum($input) 157 { 158 return array("return"=>$input->inputEnum); 159 } 160 161 function echoAnyType($input) 162 { 163 if (isset($input->inputAnyType)) { 164 return array("return"=>$input->inputAnyType); 165 } else { 166 return $input; 167 } 168 } 169 170 function echoAnyElement($input) 171 { 172 if (isset($input->inputAny)) { 173 return array("return"=>$input->inputAny); 174 } else { 175 return $input; 176 } 177 } 178 179 function echoVoidSoapHeader() 180 { 181 } 182 183 function echoMeStringRequest($input) 184 { 185 return new SoapHeader("http://soapinterop.org/","echoMeStringResponse",$input); 186 } 187 188 function echoMeComplexTypeRequest($input) 189 { 190 return new SoapHeader("http://soapinterop.org/","echoMeComplexTypeResponse",$input); 191 } 192 193} 194 195$server = new SoapServer(dirname(__FILE__)."/round4_groupI_xsd.wsdl"); 196$server->setClass("SOAP_Interop_GroupI"); 197$server->handle($HTTP_RAW_POST_DATA); 198?> 199