我厌倦了尝试将以下代码转换为2D数组, 但我不能......
$server->wsdl->addComplexType("ArrayOfString",
"complexType",
"array",
"",
"SOAP-ENC:Array",
array(),
array(array("ref"=>"SOAP-ENC:arrayType","wsdl:arrayType"=>"xsd:string[]")),
"xsd:string");
$server->wsdl->addComplexType("ArrayOf2D",
"complexType",
"array",
"",
"SOAP-ENC:Array",
array(),
array(array("ref"=>"SOAP-ENC:arrayType","wsdl:arrayType"=>"tns:ArrayOfString[]")),
"tns:ArrayOfString");
$server->register('myfunc', // method name
array(), //input
array('return'=>'tns:ArrayOf2D'), //output
'urn:hellowsdl' , // namespace
'urn:hellowsdl#hello', // soapaction
'rpc', // style
'encoded', // use
'Say hello to the caller' // documentation
);
function myfunc() {
$arr = array();
array_push( $arr, array("a","s","d") );
array_push( $arr, array("t","y","u") );
return $arr;
}