Estou tentando fazer um werservice.
Criei o servidor e testei 2 funçoes
a clássica helloworld e uma que retornasse um select.
Helloworld tah ok.
Mas quando tento rodar a funcao do select dá o seguinte erro.
"Erro
Response not of type text/xml: text/html"
Segue código
<?php
require_once ('lib/nusoap.php');
include 'includes/inc_conexao_oracle.php';
$server = new soap_server;
$server->configureWSDL('server.hello','urn:server.hello');
$server->wsdl->schemaTargetNamespace = 'urn:server.hello';
$server->register('hello',
array('name' => 'xsd:string'),
array('return' => 'xsd:string'),
'urn:server.hello',
'urn:server.hello#hello',
'rpc',
'encoded',
'Retorna o nome'
);
function hello($name)
{
return 'Olá '.$name;
}
$server->register('select',
array('param' => 'xsd:string'),
array('return' => 'xsd:string'),
'urn:server.select',
'urn:server.select#select',
'rpc',
'encoded',
'Retorna o select'
);
function select($param)
{
$sql_resumo_clientes_stm = "SELECT cli.cod_cliente COD_CLIENTE,
cli.nom_cliente NOM_CLIENTE,
FROM clientes cli
WHERE cli.cod_cliente = '77'";
$sql_resumo_clientes = OCIParse($ora_conecta,$sql_resumo_clientes_stm) or die("Erro no SQL_resumo_clientes_STM ".$sql_resumo_clientes_stm);
OCIExecute($sql_resumo_clientes,OCI_DEFAULT);
Ocifetch($sql_resumo_clientes);
return 'sada';//ociresult($sql_resumo_clientes,"NOM_CLIENTE");
}
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA)?$HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
?>Vlw
mesmo eu colocando a palavra 'sada' como teste ele continua dando erro.










