phpnusoapwebservice接口
下了0.9.5版本的nusoap,访问java开发的webservice接口,
结果一直都连不上,帮忙看一下是什么问题。谢谢。
程序报错:
Error
wsdl error: XML error parsing WSDL from http://192.168.102.126:8080/eos-default//eos-default/LoginManager on line 32: EntityRef: expecting ';'
以下是原代码:
require_once('../lib/nusoap.php');
require_once('../lib/class.wsdlcache.php');
$params = array('acOperator' => array(
'userid' => 'cgc',
'password' => '000000',
)
);
$client = new nusoap_client('http://192.168.102.126:8080/eos-default/LoginManager?wsdl=org/gocom/abframe/auth/LoginManager.wsdl', true);
$client->soap_defencoding = 'UTF-8';
$client->decode_utf8 = false;
$client->xml_encoding = 'UTF-8';
$client->setHeaders('tns:UserName/tns:UserName tns:Password/tns:Password /tns:AuthenticationHeader');
$err = $client->getError();
if ($err) {
echo 'Constructor error' . $err ;
}
$result = $client->call('login', $params, '', '', false, true);
if ($client->fault) {
echo 'Fault';
print_r($result);
} else {
$err = $client->getError();
if ($err) {
echo 'Error' . $err;
} else {
echo 'Result';
//print_r($result);
}
}
echo 'Request' . htmlspecialchars($client->request, ENT_QUOTES) ;
echo 'Response' . htmlspecialchars($client->response, ENT_QUOTES) ;
?>