Hi,
Below is a basic webservice using the NuSOAP class. When I run the code to
register the service, I get the nice html page generated by nusoap,
offering a link to view the WSDL for my service. When I click it, php barfs
this :
Cannot modify header information - headers already sent by \nusoap.php on
line 2421.
Outputbuffering doesn't help.
Has any else experienced this ?
thx
Ward
<?php
require_once('. ./nusoap.php');
$ns='http://localhost/nusoap';
$server = new soap_server();
$server->configureWSDL( 'klantgegevens' ,$ns);
$server->wsdl->schemaTargetNa mespace=$ns;
$server->register('klan tgegevens', array('klantnr' => 'xsd:int'), array
('klantnaam' => 'xsd:string'), $ns);
function klantgegevens($ klantnr){
$dsn = ***; $user = ***; $passwd = ***;
$conn = odbc_connect($d sn,$user,$passw d,SQL_CUR_USE_O DBC);
$sql="SELECT SRONAM.NANAME FROM ***.A3DBFO01.SR ONAM SRONAM WHERE
SRONAM.NANUM=$k lantnr";
$result=odbc_ex ec($conn,$sql);
$klantnaam=odbc _fetch_array($r esult);
return new soapval('klantn aam','string',$ klantnaam);
}
$server->service($HTTP_ RAW_POST_DATA);
?>
Below is a basic webservice using the NuSOAP class. When I run the code to
register the service, I get the nice html page generated by nusoap,
offering a link to view the WSDL for my service. When I click it, php barfs
this :
Cannot modify header information - headers already sent by \nusoap.php on
line 2421.
Outputbuffering doesn't help.
Has any else experienced this ?
thx
Ward
<?php
require_once('. ./nusoap.php');
$ns='http://localhost/nusoap';
$server = new soap_server();
$server->configureWSDL( 'klantgegevens' ,$ns);
$server->wsdl->schemaTargetNa mespace=$ns;
$server->register('klan tgegevens', array('klantnr' => 'xsd:int'), array
('klantnaam' => 'xsd:string'), $ns);
function klantgegevens($ klantnr){
$dsn = ***; $user = ***; $passwd = ***;
$conn = odbc_connect($d sn,$user,$passw d,SQL_CUR_USE_O DBC);
$sql="SELECT SRONAM.NANAME FROM ***.A3DBFO01.SR ONAM SRONAM WHERE
SRONAM.NANUM=$k lantnr";
$result=odbc_ex ec($conn,$sql);
$klantnaam=odbc _fetch_array($r esult);
return new soapval('klantn aam','string',$ klantnaam);
}
$server->service($HTTP_ RAW_POST_DATA);
?>