C# 如何从PHP调用.NETWeb服务
.NETWeb服务代码C# 如何从PHP调用.NETWeb服务,c#,php,.net,web-services,C#,Php,.net,Web Services,.NETWeb服务代码 [WebMethod] public string asd(){ return "asd"; } PHP代码: <?php require 'lib/nusoap.php'; $client = new SoapClient("http://localhost/nos/WebSite/Service.asmx?WSDL"); $error = $client->getError(); if ($error) { die("client c
[WebMethod]
public string asd(){
return "asd";
}
PHP代码:
<?php
require 'lib/nusoap.php';
$client = new SoapClient("http://localhost/nos/WebSite/Service.asmx?WSDL");
$error = $client->getError();
if ($error) {
die("client construction error: {$error}\n");
}
$answer = $client->call('asd');
print $answer;
$error = $client->getError();
?>
我搜索了很多并应用了所有东西,但我的代码不起作用,它只显示了一个白色页面。你的
Web.config
是什么样子的?对不起,我不太清楚你在说什么你遇到了什么问题?