Jump to content


Juliana Bitencourt

Member Since 19/10/2009
Offline Last Active 29/10/2009, 13:12
-----

Topics I've Started

Erro Na Comunicacao Com Webservice / Nfs-e Belo Horizonte

19/10/2009, 16:57

Estou tentando me comunicar com o webservice da prefeitura, ms ha dois dias recebo sempre o mesmo erro. Vou postar o codigo e a mensagem retornada pelo webservice.

Codigo:
<?phprequire_once('/usr/local/etc/httpd/htdocs/ForaCVS/NFS-e/libs/nusoap/nusoap.php');require_once('/usr/local/etc/httpd/htdocs/ForaCVS/NFS-e/common.php');$wsdl="https://bhisshomologa.pbh.gov.br/bhiss-ws/nfse?wsdl";$client = new nusoap_client($wsdl, 'WSDL');$client->authtype = 'certificate';$client->soap_defencoding = 'UTF-8';$client->certRequest['sslcertfile']= $certDir.$certName;$client->certRequest['sslkeyfile'] = $certDir.$keyName;$client->certRequest['passphrase'] = $passPhrase;$client->certRequest['verifypeer']= 0;$client->certRequest['verifyhost']= 0;$client->certRequest['trace']= 1;$param = array('nfseCabecMsg'=>'<?xml version="1.0" encoding="UTF-8"?><cabecalho xmlns="http://www.abrasf.org.br/nfse.xsd" versao="1.00"><versaoDados>1.00</versaoDados></cabecalho>','nfseDadosMsg'=>'<?xml version="1.0" encoding="UTF-8"?><ConsultarNfseEnvio xmlns="http://www.abrasf.org.br/nfse.xsd"><Prestador><Cnpj>09158384000140</Cnpj><InscricaoMunicipal>2176270015</InscricaoMunicipal></Prestador><PeriodoEmissao><DataInicial>2009-09-01</DataInicial><DataFinal>2009-10-16</DataFinal></PeriodoEmissao></ConsultarNfseEnvio>');$result = $client->call("ConsultarNfse", $param);// OPCIONAL : exibe a requisição e a respostaecho '<h2>Requisição</h2>';echo '<pre>'.htmlspecialchars($client->request).'</pre>';echo '<h2>Resposta</h2>';echo '<pre>'.htmlspecialchars($client->response).'</pre>';?>

Requisicao e Resposta:

Request

POST /bhiss-ws/nfse HTTP/1.0
Host: bhisshomologa.pbh.gov.br:443
User-Agent: NuSOAP/0.7.3 (1.114)
Content-Type: text/xml; charset=UTF-8
SOAPAction: "http://ws.bhiss.pbh..../ConsultarNfse"
Content-Length: 1152


<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlso...soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/20...chema-instance" xmlns:SOAP-ENC="http://schemas.xmlso...soap/encoding/" xmlns:ns3473="http://tempuri.org">...ltarNfseRequest xmlns=""><nfseCabecMsg xmlns="">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;cabecalho xmlns=&quot;http://www.abrasf.or...r/nfse.xsd&#34; versao=&quot;1.00&quot;&gt;&lt;versaoDados&gt;1.00&lt;/versaoDados&gt;&lt;/cabecalho&gt;</nfseCabecMsg><nfseDadosMsg xmlns="">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;ConsultarNfseEnvio xmlns=&quot;http://www.abrasf.or...P-ENV:Envelope>


Response

HTTP/1.1 100 Continue

HTTP/1.1 500 Internal Server Error
Date: Mon, 19 Oct 2009 19:47:19 GMT
Server: Apache/2.2.9 (Debian) mod_jk/1.2.26 mod_ssl/2.2.9 OpenSSL/0.9.8g
Connection: close
Transfer-Encoding: chunked
Content-Type: text/xml;charset=utf-8

<?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlso...S:Body><S:Fault xmlns:ns4="http://www.w3.org/20...ltstring>Cannot find dispatch method for {}ConsultarNfseRequest</faultstring></S:Fault></S:Body></S:Envelope>


Error

S:Client: Cannot find dispatch method for {}ConsultarNfseRequest


Fault

1

Alguem ja viu esse erro?

Obrigada Juliana Bitencourt

IPB Skin By Virteq