Php implements soap call to the. Net WebServiceasmx file

Source: Internet
Author: User
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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.