Webservice NUSOAP ERROR
Tenho um webservice feito em c# que recebi , preciso conectar a ele, mas estou com o seguinte ERRO abaixo:
ERROR no operations defined in the WSDL document!
Objetivo é concetar a esses dados passados, nunca usei webservice, estou vendo alguns tutoriais, para poder entender.
POST /diretorio/sub_diretorio/arquivo.asmx HTTP/1.1
Host: www.site.com.br
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.site.com.br/diretorio/sub_diretorio/UseService"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<atw_auth xmlns="http://www.site.com.br/diretorio/sub_diretorio">
<NumConta>string</NumConta>
<Usuario>string</Usuario>
<Senha>string</Senha>
<CodEmpresa>int</CodEmpresa>
</atw_auth>
</soap:Header>
<soap:Body>
<UseService xmlns="www.site.com.br/diretorio/sub_diretorio/" />
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<UseServiceResponse xmlns="http://www.site.com.br/diretorio/sub_diretorio">
<UseServiceResult>string</UseServiceResult>
</UseServiceResponse>
</soap:Body>
</soap:Envelope>
Conecta.php
require('lib/nusoap.php');
require('xmlFunctions.php');
$opts = array
('location' => 'http://www.site.com.br/diretorio/sub_diretorio/arquivo.asmx?WSDL',
'uri' => 'urn:UseService');
$parms = array('NumConta' => '00022', 'Usuario' => 'usuario', 'Senha' => 'senha');
$client = new nusoap_client(NULL, $opts);
$continents = $client->call('UseService', $parms, array("soapaction"=>"http://www.site.com.br/diretorio/sub_diretorio/UseService"));
if ($client->getError()) {
echo '<br><br><br>ERROR<xmp>' . $client->getError() . '</xmp>';
}else{
echo 'conectado';
}
Obrigado.
Discussão (2)
Carregando comentários...