php访问webservice之scoap方法

来源:互联网 发布:开通淘宝客要多少钱 编辑:程序博客网 时间:2024/06/10 09:02
include_once('../../lib/nusoap.php');$client = new soapclient('http://172.30.2.242:8899/CertificationService.asmx?WSDL','wsdl');$client->soap_defencoding = 'utf-8';$client->decode_utf8 = false;$client->xml_encoding = 'utf-8';$err = $client->getError();if ($err) {echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';exit();}    $result = $client->call('Certification', array('UserName' => $username,'Password' => $password));if($result[CertificationResult] == "true"){header("Location:alive.php?user=".$username);}elseif($result[CertificationResult] == "false"){$msg = "<p align='center'><font color='red'>登陆失败,请重新输入!</font></p>";}
nuscoap可以在http://sourceforge.net/projects/nusoap/files/nusoap/0.9.5/nusoap-0.9.5.zip/download?use_mirror=nchc下载到

原创粉丝点击