之前用webservice 测试验证了一个用户 返回结果很正常
/$client = w SoapClient("http://localhost/ldapService.do?wsdl");
$handle1 = $client->authUser(array("in0" => "dasdk1","in1" =>"direk1qaz")); //返回 0 1
$handle2 = $client->getAttr(array("in0" => "disdasdek1","in1" =>"direk1qaz","in2"=>"givenName"));//返回此人的单位名称
echo ((int)($handle1->out));
echo "<pre>";
echo $handle2->out;
然后项目经理说 那边的服务器 没有soap之类的。让用nusoap。
- -不过我没接触过,就从网上找了找
require_once('nusoap.php');$client=new soapclient('http://portal.mcut.edu.tw/ldapService.do?wsdl');$params1 = array("in0" => "dasdk1","in1" =>"direk1qaz");
$reversed = $client->call('authUser',$params1,"http://localhost/ldapService.do?wsdl");//此为返回值
print_r ($reversed);
结果貌似这样写不对,求教 如何用nusoap写一个这样的账号验证。
/$client = w SoapClient("http://localhost/ldapService.do?wsdl");
$handle1 = $client->authUser(array("in0" => "dasdk1","in1" =>"direk1qaz")); //返回 0 1
$handle2 = $client->getAttr(array("in0" => "disdasdek1","in1" =>"direk1qaz","in2"=>"givenName"));//返回此人的单位名称
echo ((int)($handle1->out));
echo "<pre>";
echo $handle2->out;
然后项目经理说 那边的服务器 没有soap之类的。让用nusoap。
- -不过我没接触过,就从网上找了找
require_once('nusoap.php');$client=new soapclient('http://portal.mcut.edu.tw/ldapService.do?wsdl');$params1 = array("in0" => "dasdk1","in1" =>"direk1qaz");
$reversed = $client->call('authUser',$params1,"http://localhost/ldapService.do?wsdl");//此为返回值
print_r ($reversed);
结果貌似这样写不对,求教 如何用nusoap写一个这样的账号验证。
$gserver_url="http://*******/services/BillService?wsdl";
include_once('./nusoap/nusoap.php');
$ParmArray = array("in0"=>$partid,"in1"=>$paterpwd,"in2"=>$uname,"in3"=>$orderid,"in4"=>$gnameid,"in5"=>$xqid,"in6"=>$cardtype,"in7"=>$uip,"in8"=>$shmmd5,"in9"=>NULL);
//创建一个soapclient对象,参数是server的WSDL
$client = new nusoap_client($gserver_url,true);
$client->soap_defencoding = 'utf-8';
$client->decode_utf8 = false;
$client->xml_encoding = 'utf-8';
$client->timeout = 900;
$client->response_timeout = 900;
$result = $client->call("imprestAccount",array("parameters"=>$ParmArray));
$result = $result["out"];
$gserver_url="http://localhost/ldapService.do?wsdl";
include_once('nusoap.php');
$ParmArray = array("in0"=>$uAccount,"in1"=>$password);
//创建一个soapclient对象,参数是server的WSDL
$client = new nusoap_client($gserver_url,true);
$client->soap_defencoding = 'utf-8';
$client->decode_utf8 = false;
$client->xml_encoding = 'utf-8';
$client->timeout = 900;
$client->response_timeout = 900;
$result = $client->call("authUser",$ParmArray);
$result = $result["out"];