Posted in PHP onApril 22, 2011
其中有个web method像这样的:
[WebMethod] public string HelloWorld() { return "Hello World"; }
ok,一切就绪。在某php文件中如下写法:
php5本身就支持SOAP调用Web Service:
<?php //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"; } ?>
这样就OK了,会继续介绍SOAP
PHP中调用ASP.NET的WebService的代码
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@