SoapClient 调用web service
参考如下,特别注意参数的数组写法
View Code
try { $client = new SoapClient('http://xxxService?wsdl'); //var_dump( $client->__getFunctions() ); //var_dump( $client->__getTypes() ); $result = $client->__soapCall("doTrans", array('parameters'=>array('arg0'=>$param))); //$result = $client->__Call("doTrans", array('parameters'=>array('arg0'=>$param))); printf("Result = %s", $result->return); } catch (Exception $e) { printf("Message = %s",$e->__toString()); }