PHP Read WebService interface

Source: Internet
Author: User
Tags wsdl

= Php_soap.  = Php_curl.  = Php_openssl.

<script src= "Http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.js" ></script><form action= "b.php" Method= "POST" >ID: <input type= "text" name= "id" id= "id" ><br><br>Start time:<input type= "Date" name= "StartTime" ><br><br>End Time:<input type= "Date" name= "Endtime" ><br> <input type= "Submit" ><br><br></form> <?PHPHeader("Content-type:text/html;charset=utf-8");$client=NewSoapClient ("Http://XXX.XXX.XXX.XXX:XXX/Service.asmx?WSDL");//Our test is not available $client = new SoapClient ("Http://192.168.3.178:8080/chkwelepsw.asmx?"). Wsdl/chkwele?username=test3&psw=123 ");//Parameters so pass the package first$param=Array();//a page to pass over//call must use __soapcall$p=$client->__soapcall (' Getalldeerpens ',Array(' Parameters ' =$param));$data=$p->getalldeerpensresult->basdeerpen;//here, first output the variable $p to see what type it is. /*echo "<pre>";p Rint_r ($data); echo "</pre>";*/Echo"<ol>";foreach($data  as $key=$value){    /*echo "<pre>";    Print_r ($value); echo "</pre>"; */    /*Echo $value->penname;    Echo $value->basdeerpenid; echo "<br>"; */    Echo"<li><a onclick=\" GetID (' ".$value->basdeerpenid. "'); \" > ".$value->penname. " </a></li> ";}Echo"</ol>";?><script>functionGetID (ID) {$ ("#id").val (id);}</script>

PHP Read WebService interface

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.