ya que tengo uno, pero me tira el error Error: Response not of type text/xml: text/html.
creo que estoy haciendo mal el xml, pero como debe ser un xml de eliminacion???
saludos.
Código PHP:
<?php
require('lib/nusoap.php');
$l_oServer = new soap_server();
$l_oServer->debug_flag=false;
$l_oServer->configureWSDL('Integracion', 'http://localhost/WS_IN');
$l_oServer->wsdl->schemaTargetNamespace = 'Integracion';
$l_oServer->wsdl->addComplexType('Integracion','complexType', 'struct','all','',
array(
'CLIENOMBRE' => array('name'=>'CLIENOMBRE', 'type'=>'xsd:string'),
'SEX' => array('name'=>'SEX', 'type'=>'xsd:string'),
'CLIEAPELLIDOS' => array('name'=>'CLIEAPELLIDOS', 'type'=>'xsd:string'),
'CASADO' => array('name'=>'CASADO', 'type'=>'xsd:string'),
'N_KIDS' => array('name'=>'N_KIDS', 'type'=>'xsd:string'),
'EDUCACION' => array('name'=>'EDUCACION', 'type'=>'xsd:string')),
array(
'PRODUCTID' => array('name'=>'PRODUCTID', 'type'=>'xsd:string'))
);
$l_oServer->register('getCliente', array('CLIEID' => 'xsd:string'),array('return'=>'tns:Integracion'),'http://localhost/WS_IN');
$l_oServer->register('delInventario', array('PRODUCTID' => 'xsd:string'),array('return'=>'tns:Integracion'),'http://localhost/WS_IN');
function getCliente ($a_stInput) {
if (is_string($a_stInput)) {
$l_oDBlink = @mysql_connect( 'localhost','root','2001850');
$l_oDBresult = @mysql_db_query('oprc','SELECT CLIENOMBRE, CLIEAPELLIDOS, SEX,CASADO,N_KIDS,EDUCACION FROM clientes WHERE CLIEID='.$a_stInput);
if (!$l_oDBresult) {
return new soap_fault('Server','' , 'Internal server error.');
}
if (!mysql_num_rows($l_oDBresult)) {
return new soap_fault('Server', '','Service contains data only for a few cities.');
}
mysql_close($l_oDBlink);
return mysql_fetch_array($l_oDBresult, MYSQL_ASSOC);
}
else {
return new soap_fault('Client', '', 'Service requires a string parameter.');
}
}
function delInventario ($a_stInput_) {
if (is_string($a_stInput_)) {
$l_oDBlink = @mysql_connect( 'localhost','root','2001850');
$l_oDBresult = @mysql_db_query('oprc','DELETE FROM inventario WHERE PRODUCTID='.$a_stInput_);
if (!$l_oDBresult) {
return new soap_fault('Server','' , 'Internal server error.');
}
if (!mysql_num_rows($l_oDBresult)) {
return new soap_fault('Server', '','Service contains data only for a few cities'.$num);
}
mysql_close($l_oDBlink);
return mysql_num_rows($l_oDBresult);
}
else {
return new soap_fault('Client', '', 'Service requires a string parameter.');
}
}
$l_oServer->service($HTTP_RAW_POST_DATA);
?>