0
Hello, I have configured on a server a license Webservice,made in PHP nusoap, which was working properly, but due to problems with the internet provider we decided to host on a third, in the new hosting when consuming the WS does not return xml, however on the server it executes the service by notifying in DB the query
attaches the WS code and php info
Edit: I recorded a txt with the output of file_get_contents( 'php://input' ), and it was coming out right
<?php
// cliente.php
include('assets/vendor/nusoap/lib/nusoap.php');
$cliente = new nusoap_client('http://ws.orionsistemas.com/licensing/index.php?wsdl');
$parametros = array('CNPJ'=>"12345678901234",'RazaoSocial'=>"razao social","1" ,"1");
$resultado = $cliente->call('Verifica', $parametros);
echo $resultado;?>
<?php
// servidor.php
include('../assets/vendor/nusoap/lib/nusoap.php');
$servidor = new nusoap_server();
$servidor->configureWSDL('urn:ServerOrion');
$servidor->wsdl->schemaTargetNamespace = 'urn:ServerOrion';
function Verifica($CNPJ, $RazaoSocial,$Uso_Interno_5,$Uso_Interno_13){
require_once '../assets/classes/licensing/empresa.class.php';
require_once '../assets/classes/DB.class.php';
$empresa = new empresa($CNPJ, $RazaoSocial, $Uso_Interno_5, $Uso_Interno_13);
$empresa->notifica();
return $empresa->toXml();
}
$servidor->register(
'Verifica',
array( 'CNPJ'=>'xsd:string',
'RazaoSocial'=>'xsd:string',
'Uso_Interno_5'=>'xsd:string',
'Uso_Interno_13'=>'xsd:string'),
array('retorno'=>'xsd:string'),
'urn:ServerOrion.Verifica',
'urn:ServerOrion.Verifica',
"rpc",
"encoded",
'Sistema de licenças Orion Sistemas.'
);
$HTTP_RAW_POST_DATA_Info = isset(file_get_contents( 'php://input' )) ? file_get_contents( 'php://input' ) : '';
//$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$servidor->service($HTTP_RAW_POST_DATA_Info);
//$servidor->service($HTTP_RAW_POST_DATA);?>
phpinfo();