Home  >  Article  >  Backend Development  >  请帮忙看看PHP调用C#的webservice的有关问题

请帮忙看看PHP调用C#的webservice的有关问题

WBOY
WBOYOriginal
2016-06-13 13:33:02991browse

请帮忙看看PHP调用C#的webservice的问题

PHP code
<!--

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->__soapCall('Return_Package', array('UN'=>'xxxxxxx','PS'=>'xxxxxxx','TopCount'=>5));//
var_dump($p);//结果从这里分析

有一个方法叫Retrun_Package,要传三个参数,分别是用户名,密码和调用的条数,此处我用的XXX代替,但最后却报错了,我对PHP不是很熟悉,望各位指正。

------解决方案--------------------
哦,忘了soapClient帮我们将xml结果转成php对象类型了。

echo $p->Return_PackageResult->schema;
echo $p->Return_PackageResult->any;
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn