This article mainly introduces php implementation calling through soap. net WebServiceasmx file, combined with the instance form analysis of php using soap to call the WebService interface skills, the need of friends can refer to the following example describes the php implementation through soap call.. Net. We will share this with you for your reference. The details are as follows:
Recently, it was used for testing in the same industry. the C # WebService interface written by net has passed the call. now we need to test the php version's call to it. after various explorations, the related PHP's webservice calling process is as follows:
1. open the php extension:
Find the configuration file php. ini and open the following extension:
extension = php_soap.dllextension = php_curl.dllextension = php_openssl.dll
2. the php code is as follows:
'Test3', 'psw' => '123'); // the call must use _ soapCall $ p = $ client->__ soapCall ('chkwele ', array ('parameters '=> $ param); print_r ($ p-> ChkWeleResult); // output the variable $ p first to see what type it is.?>
Note: After php calls a method, its soap object will automatically generate a Result method to conveniently display the call Result. the preceding "ChkWele" method of the WebService to be called,
The caller has the corresponding "ChkWeleResult" method.
Some webservices of. NET should pay attention
/**
Add the following content to this node:
*/[WebMethod (Description = "This ...... ", EnableSession = false)] public string ChkWele (string username, string psw) {string ret =" "; return ret ;}
For more articles about implementing the WebService asmx file of soap calling. Net in php, refer to PHP Chinese network!