Home  >  Article  >  Backend Development  >  求大神帮忙,php如何从WCF服务取数据

求大神帮忙,php如何从WCF服务取数据

WBOY
WBOYOriginal
2016-06-13 11:50:41639browse

求大神帮忙,php怎么从WCF服务取数据
Serivce接口:MemberService 方法login(int teamId,string username,string password)
Php代码:


$teamId=1;
$username="aa";
$pasword="123456";
$soap=new SoapClient("http://localhost/TeamLoggingWebHost/MemberService.svc?wsdl");
$result=$soap->login($teamId,$username,$password);

我是新手最近学php要从WCF服务上去数据,我在网上找资料说是按上面的取,我试过了结果报错。最好能有例子。
------解决方案--------------------
WCF 不是 SOAP,虽然 WCF 也可以使用SOAP做通信格式
假定你的  WCF 支持 SOAP,那么参数格式需根据 WSDL 的指示去写

$result=$soap->login($teamId,$username,$password);
这样的参数传递,在 SOAP 中也是很少见的

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