There is a web method like this:
Copy code The code is as follows:
[WebMethod]
public string HelloWorld ()
{
return "Hello World";
}
ok, everything is ready. The following is written in a php file:
php5 itself supports SOAP to call Web Service:
Copy the code The code is as follows:
//get localization strings from C# webservice
$client = new SoapClient('http://localhost/webservice1/Localization.asmx?wsdl');
echo "Call web service method from C# WebService:n";
$result = $client->GetLocalizationResource();
if(!is_soap_fault($result))
{
echo "return:n", $result->GetLocalizationResourceResult;
}
else
{
echo "soap call fault";
}
?>
That’s it, I will continue to introduce SOAP
http://www.bkjia.com/PHPjc/323281.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/323281.htmlTechArticleThere is a web method like this: Copy the code The code is as follows: [WebMethod] public string HelloWorld() { return "Hello World"; } ok, everything is ready. In a php file, it is written as follows:...