Webservice PHP Soap

Asked

Viewed 357 times

0

Opa Personal, Good Afternoon!

I’m having trouble consuming a webservice.

Fis a basic program to consume but is presenting the following error message: "Request should be informed".

I could not understand what this request would be.

Could you help me?

Follows my source:

  $mensagem = array('Emitir' =>array('Aliquota'=>0,
                               'Atividade'=>1.03,
                               'CEPPrestacaoServico'=>'',
                               'ChaveAutenticacao'=>'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',
                               'CidadePrestacaoServico'=>'',
                                'EnderecoPrestacaoServico'=>'',
'EstadoPrestacaoServico'=>'',
'Homologacao'=>true,
'InformacoesAdicionais'=>'teste de geracao de nota webservice',
'NotificarTomadorPorEmail'=>false,
'NumeroCei'=>0,
'SimplesNacional'=>false,
'SubstituicaoTributaria'=>false,
'CNPJ'=>'',
'CPF'=>'22702816835',
'DDD'=>'11',
'Email'=>'[email protected]',
'Bairro'=>'presidente altino',
'CEP'=>'06216280',
'Cidade'=>'Osasco',
'Complemento'=>'casa',
'Estado'=>'SP',
'Logradouro'=>'teste',
'Numero'=>'123',
'Pais'=>'Brasil',
'TipoLogradouro'=>'Rua',
'InscricaoMunicipal'=>0,
'Nome'=>'Samuel de Vincenzo',
'Telefone'=>'972858650',
'TomadorEstrangeiro'=>false,
'Valor'=>100.00,
'ValorCSLL'=>0.00,
'ValorCofins'=>0.00,
'ValorDeducao'=>0.00,
'ValorINSS'=>0.00,
'ValorIR'=>0.00,
'ValorOutrosImpostos'=>0.00,
'ValorPisPasep'=>0.00,
'ValorRepasse'=>0.00));



$function = 'Emitir';

$options = array('location' => 'https://nfe.osasco.sp.gov.br/EISSNFEWebServices/NotaFiscalEletronica.svc');



   $client = new SoapClient('https://nfe.osasco.sp.gov.br/EISSNFEWebServices/NotaFiscalEletronica.svc?Wsdl');

   $result = $client->__soapCall($function,$mensagem,$options);       


   echo 'Response: ';
   print_r($result);

Thank you

Samuel

  • The mistake seems to be of the own NotaFiscalEletronica.svc?Wsdl, I mean, it’s not in your PHP, I guess. As I do not know this service I can not report what is missing, but it is possible that their DOC has something to report on this error.

  • try to use this link https://nfe.osasco.sp.gov.br/EissnfeWebServices/NotaFiscalEletronica.svc?singleWsdl

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.