php调用 .net webservice demo

header("Content-type: text/html; charset=utf-8");

 $client = new SoapClient("http://localhost:17798/AddOrder.asmx?WSDL",array('encoding'=>'utf-8'));

$orderjson=array('orderjson'=>'orderjson');

var_dump($client->__getFunctions());

$arrResult = $client->__Call("SaveOrder2",array($orderjson));

其中orderjson为SaveOrder2方法的参数名,一定要记住需要套两层数组,直接这样$arrResult = $client->__Call("SaveOrder2",$orderjson); 调用不成功

猜你喜欢

转载自blog.csdn.net/zhangwenjie1105/article/details/48730189