Joined: 26 Nov 2006 |
Posts: 1 |
|
|
|
Posted: Sat Nov 25, 2006 9:24 pm |
|
|
|
|
|
Hello every body. I have problem with HTTP authentication soap client does not run. This is my code.
Soapserver:
<?php
require_once('nusoap.php');
define('HOST_NAME','localhost');
define('USER_NAME','root');
define('PASSWORD','');
define('NS','http://10.0.0.194/webservice/');
function test($value)
{
return $value;
}
$server = new nusoap_server();
$server->configureWSDL('CDT_SERVICE',NS);
$server->wsdl->schemaTargetNamespace=NS;
$server->register('test',array('value'=>'xsd:int'),array('result'=>'xsd:int'),NS);
$HTTP_RAW_POST_DATA = (isset($HTTP_RAW_POST_DATA)) ? $HTTP_RAW_POST_DATA :'';
$server->service($HTTP_RAW_POST_DATA);
?>
Soapclient
<?php
require_once('nusoap.php');
define('CDT','http://10.0.0.194/webservice/webservice.php?wsdl');
$soapclient = new nusoapclient(CDT,'wsdl');
//check_user if http authentication request
$soapclient ->setCredentials('admin','YWG41BPzVAkN6');
$x=$soapclient ->call('test',array('value'=>6));
echo "Value: ".$x
?>
If i remove Http authentication soapclient run successfully. Please help me!.
|
|