Rumah >pembangunan bahagian belakang >tutorial php > 请问PHP调用C#的WEBSERVICE有关问题
请教PHP调用C#的WEBSERVICE问题
代码写法:
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->header("content-type:text/html;charset=utf-8"); $client = new SoapClient("http://s.dailiangu.com:8011/WebLocalData.asmx?WSDL"); $p = $client->Return_Package(array('UN'=>'dailiantang','PS'=>'xieyanjobb1306','TopCount'=>'2')); var_dump($p);//结果从这里分析 echo "<br><hr>"; $ss = get_object_vars($p); print_r($ss);
header("Content-type:text/html;charset=utf-8"); $client = new SoapClient("http://s.dailiangu.com:8011/WebLocalData.asmx?WSDL"); $p = $client->Return_Package(array('UN'=>'dailiantang','PS'=>'xieyanjobb1306','TopCount'=>'5')); $se = $p->Return_PackageResult->any; $dom = simplexml_load_string($se); foreach($dom->NewDataSet->Get_WebLocalData as $datas) { foreach($datas as $k=>$v) echo "$k : $v <br>"; echo '<br>'; } <div class="clear"> </div>