<?xml version='1.0' encoding='UTF-8'?>
<definitions name='ConsultarNEPorRpsService' targetNamespace='http://www.betha.com.br/e-nota-contribuinte-ws' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://www.w3.org/2000/09/xmldsig#' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://www.betha.com.br/e-nota-contribuinte-ws' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
 <types>
  <xs:schema targetNamespace='http://www.betha.com.br/e-nota-contribuinte-ws' version='1.0' xmlns:ns1='http://www.w3.org/2000/09/xmldsig#' xmlns:tns='http://www.betha.com.br/e-nota-contribuinte-ws' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
   <xs:import namespace='http://www.w3.org/2000/09/xmldsig#'/>
   <xs:element name='ConsultarNfsePorRpsEnvio' type='tns:ConsultarNfsePorRpsEnvio'/>
   <xs:element name='ConsultarNfsePorRpsEnvioResponse' type='tns:ConsultarNfsePorRpsEnvioResponse'/>
   <xs:element name='ConsultarNfseRpsEnvio' type='tns:ConsultarNfseRpsEnvio'/>
   <xs:element name='ConsultarNfseRpsEnvioResponse' type='tns:ConsultarNfseRpsEnvioResponse'/>
   <xs:complexType name='ConsultarNfsePorRpsEnvio'>
    <xs:sequence>
     <xs:element minOccurs='0' name='IdentificacaoRps' type='tns:tcIdentificacaoRps'/>
     <xs:element minOccurs='0' name='Prestador' type='tns:tcIdentificacaoPrestador'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcIdentificacaoRps'>
    <xs:sequence>
     <xs:element name='Numero' type='xs:int'/>
     <xs:element name='Serie' type='xs:string'/>
     <xs:element name='Tipo' type='xs:int'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcIdentificacaoPrestador'>
    <xs:sequence>
     <xs:element name='Cnpj' type='xs:string'/>
     <xs:element minOccurs='0' name='InscricaoMunicipal' type='xs:string'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='ConsultarNfsePorRpsEnvioResponse'>
    <xs:sequence>
     <xs:element minOccurs='0' name='ConsultarNfseRpsResposta' type='tns:consultarNfseRpsResposta'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='consultarNfseRpsResposta'>
    <xs:sequence>
     <xs:element name='ComplNfse' type='tns:tcCompNfse'/>
     <xs:element minOccurs='0' name='ListaMensagemRetorno' type='tns:tcListaMensagemRetorno'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcCompNfse'>
    <xs:sequence>
     <xs:element name='Nfse' type='tns:tcNfse'/>
     <xs:element minOccurs='0' name='NfseCancelamento' type='tns:tcCancelamentoNfse'/>
     <xs:element minOccurs='0' name='NfseSubstituicao' type='tns:tcSubstituicaoNfse'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcNfse'>
    <xs:sequence>
     <xs:element name='InfNfse' type='tns:tcInfNfse'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcInfNfse'>
    <xs:sequence>
     <xs:element name='Numero' type='xs:string'/>
     <xs:element name='CodigoVerificacao' type='xs:string'/>
     <xs:element name='DataEmissao' type='xs:dateTime'/>
     <xs:element minOccurs='0' name='IdentificacaoRps' type='tns:tcIdentificacaoRps'/>
     <xs:element minOccurs='0' name='DataEmissaoRps' type='xs:dateTime'/>
     <xs:element name='NaturezaOperacao' type='xs:int'/>
     <xs:element minOccurs='0' name='RegimeEspecialTributacao' type='xs:int'/>
     <xs:element name='OptanteSimplesNacional' type='xs:int'/>
     <xs:element name='IncentivadorCultural' type='xs:int'/>
     <xs:element name='Competencia' type='xs:dateTime'/>
     <xs:element minOccurs='0' name='NfseSubstituta' type='xs:string'/>
     <xs:element minOccurs='0' name='OutrasInformacoes' type='xs:string'/>
     <xs:element name='Servico' type='tns:tcDadosServico'/>
     <xs:element minOccurs='0' name='ValorCredito' type='xs:decimal'/>
     <xs:element name='PrestadorServico' type='tns:tcDadosPrestador'/>
     <xs:element name='TomadorServico' type='tns:tcDadosTomador'/>
     <xs:element minOccurs='0' name='IntermediarioServico' type='tns:tcIdentificacaoIntermediarioServico'/>
     <xs:element name='OrgaoGerador' type='tns:tcIdentificacaoOrgaoGerador'/>
     <xs:element minOccurs='0' name='ConstrucaoCivil' type='tns:tcDadosConstrucaoCivil'/>
    </xs:sequence>
    <xs:attribute name='id' type='xs:string' use='required'/>
   </xs:complexType>
   <xs:complexType name='tcDadosServico'>
    <xs:sequence>
     <xs:element name='Valores' type='tns:tcValores'/>
     <xs:element name='ItemListaServico' type='xs:string'/>
     <xs:element minOccurs='0' name='CodigoCnae' type='xs:int'/>
     <xs:element minOccurs='0' name='CodigoTributacaoMunicipio' type='xs:string'/>
     <xs:element name='Discriminacao' type='xs:string'/>
     <xs:element name='CodigoMunicipio' type='xs:int'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcValores'>
    <xs:sequence>
     <xs:element name='ValorServicos' type='xs:decimal'/>
     <xs:element minOccurs='0' name='ValorDeducoes' type='xs:decimal'/>
     <xs:element minOccurs='0' name='ValorPis' type='xs:decimal'/>
     <xs:element minOccurs='0' name='ValorCofins' type='xs:decimal'/>
     <xs:element minOccurs='0' name='ValorInss' type='xs:decimal'/>
     <xs:element minOccurs='0' name='ValorIr' type='xs:decimal'/>
     <xs:element minOccurs='0' name='ValorCsll' type='xs:decimal'/>
     <xs:element minOccurs='0' name='IssRetido' type='xs:int'/>
     <xs:element minOccurs='0' name='ValorIss' type='xs:decimal'/>
     <xs:element minOccurs='0' name='OutrasRetencoes' type='xs:decimal'/>
     <xs:element name='BaseCalculo' type='xs:decimal'/>
     <xs:element minOccurs='0' name='Aliquota' type='xs:decimal'/>
     <xs:element minOccurs='0' name='ValorLiquidoNfse' type='xs:decimal'/>
     <xs:element minOccurs='0' name='ValorIssRetido' type='xs:decimal'/>
     <xs:element minOccurs='0' name='DescontoCondicionado' type='xs:decimal'/>
     <xs:element minOccurs='0' name='DescontoIncondicionado' type='xs:decimal'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcDadosPrestador'>
    <xs:sequence>
     <xs:element name='IdentificacaoPrestador' type='tns:tcIdentificacaoPrestador'/>
     <xs:element name='RazaoSocial' type='xs:string'/>
     <xs:element minOccurs='0' name='NomeFantasia' type='xs:string'/>
     <xs:element name='Endereco' type='tns:tcEndereco'/>
     <xs:element minOccurs='0' name='Contato' type='tns:tcContato'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcEndereco'>
    <xs:sequence>
     <xs:element minOccurs='0' name='Endereco' type='xs:string'/>
     <xs:element minOccurs='0' name='Numero' type='xs:string'/>
     <xs:element minOccurs='0' name='Complemento' type='xs:string'/>
     <xs:element minOccurs='0' name='Bairro' type='xs:string'/>
     <xs:element minOccurs='0' name='CodigoMunicipio' type='xs:int'/>
     <xs:element minOccurs='0' name='Uf' type='xs:string'/>
     <xs:element minOccurs='0' name='Cep' type='xs:int'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcContato'>
    <xs:sequence>
     <xs:element minOccurs='0' name='Telefone' type='xs:string'/>
     <xs:element minOccurs='0' name='Email' type='xs:string'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcDadosTomador'>
    <xs:sequence>
     <xs:element minOccurs='0' name='IdentificacaoTomador' type='tns:tcIdentificacaoTomador'/>
     <xs:element minOccurs='0' name='RazaoSocial' type='xs:string'/>
     <xs:element minOccurs='0' name='Endereco' type='tns:tcEndereco'/>
     <xs:element minOccurs='0' name='Contato' type='tns:tcContato'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcIdentificacaoTomador'>
    <xs:sequence>
     <xs:element minOccurs='0' name='CpfCnpj' type='tns:tcCpfCnpj'/>
     <xs:element minOccurs='0' name='InscricaoMunicipal' type='xs:string'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcCpfCnpj'>
    <xs:sequence>
     <xs:element minOccurs='0' name='Cnpj' type='xs:string'/>
     <xs:element minOccurs='0' name='Cpf' type='xs:string'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcIdentificacaoIntermediarioServico'>
    <xs:sequence>
     <xs:element name='RazaoSocial' type='xs:string'/>
     <xs:element name='CpfCnpj' type='tns:tcCpfCnpj'/>
     <xs:element minOccurs='0' name='InscricaoMunicipal' type='xs:string'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcIdentificacaoOrgaoGerador'>
    <xs:sequence>
     <xs:element name='CodigoMunicipio' type='xs:int'/>
     <xs:element name='Uf' type='xs:string'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcDadosConstrucaoCivil'>
    <xs:sequence>
     <xs:element name='CodigoObra' type='xs:string'/>
     <xs:element name='Art' type='xs:string'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcCancelamentoNfse'>
    <xs:sequence>
     <xs:element name='Confirmacao' type='tns:tcConfirmacaoCancelamento'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcConfirmacaoCancelamento'>
    <xs:sequence>
     <xs:element name='Pedido' type='tns:tcPedidoCancelamento'/>
     <xs:element name='InfConfirmacaoCancelamento' type='tns:tcInfConfirmacaoCancelamento'/>
    </xs:sequence>
    <xs:attribute name='Id' type='xs:string' use='required'/>
   </xs:complexType>
   <xs:complexType name='tcPedidoCancelamento'>
    <xs:sequence>
     <xs:element name='InfPedidoCancelamento' type='tns:tcInfPedidoCancelamento'/>
     <xs:element ref='ns1:Signature'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcInfPedidoCancelamento'>
    <xs:sequence>
     <xs:element name='IdentificacaoNfse' type='tns:tcIdentificacaoNfse'/>
     <xs:element name='CodigoCancelamento' type='xs:string'/>
    </xs:sequence>
    <xs:attribute name='Id' type='xs:string' use='required'/>
   </xs:complexType>
   <xs:complexType name='tcIdentificacaoNfse'>
    <xs:sequence>
     <xs:element name='Numero' type='xs:string'/>
     <xs:element name='Cnpj' type='xs:string'/>
     <xs:element minOccurs='0' name='InscricaoMunicipal' type='xs:string'/>
     <xs:element name='CodigoMunicipio' type='xs:string'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcSigInfo'>
    <xs:sequence>
     <xs:element ref='ns1:CanonicalizationMethod'/>
     <xs:element ref='ns1:SignatureMethod'/>
     <xs:element ref='ns1:Reference'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcReference'>
    <xs:sequence>
     <xs:element ref='ns1:Transforms'/>
     <xs:element ref='ns1:DigestMethod'/>
     <xs:element ref='ns1:DigestValue'/>
    </xs:sequence>
    <xs:attribute name='URI' type='xs:string' use='required'/>
   </xs:complexType>
   <xs:complexType name='tcTransforms'>
    <xs:sequence>
     <xs:element maxOccurs='unbounded' ref='ns1:Transform'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcTransform'>
    <xs:sequence/>
    <xs:attribute name='Algorithm' type='xs:string' use='required'/>
   </xs:complexType>
   <xs:complexType name='tcKeyInfo'>
    <xs:sequence>
     <xs:element ref='ns1:X509Data'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcInfConfirmacaoCancelamento'>
    <xs:sequence>
     <xs:element name='Sucesso' type='xs:boolean'/>
     <xs:element name='DataHora' type='xs:dateTime'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcSubstituicaoNfse'>
    <xs:sequence>
     <xs:element name='SubstituicaoNfse' type='tns:tcInfSubstituicaoNfse'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcInfSubstituicaoNfse'>
    <xs:sequence>
     <xs:element name='NfseSubstituidora' type='xs:string'/>
    </xs:sequence>
    <xs:attribute name='Id' type='xs:string' use='required'/>
   </xs:complexType>
   <xs:complexType name='tcListaMensagemRetorno'>
    <xs:sequence>
     <xs:element maxOccurs='unbounded' name='MensagemRetorno' type='tns:tcMensagemRetorno'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcMensagemRetorno'>
    <xs:sequence>
     <xs:element name='Codigo' type='xs:string'/>
     <xs:element name='Mensagem' type='xs:string'/>
     <xs:element minOccurs='0' name='Correcao' type='xs:string'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='ConsultarNfseRpsEnvio'>
    <xs:sequence>
     <xs:element minOccurs='0' name='IdentificacaoRps' type='tns:tcIdentificacaoRps'/>
     <xs:element minOccurs='0' name='Prestador' type='tns:tcIdentificacaoPrestador'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='ConsultarNfseRpsEnvioResponse'>
    <xs:sequence>
     <xs:element minOccurs='0' name='ConsultarNfseRpsResposta' type='tns:consultarNfseRpsResposta'/>
    </xs:sequence>
   </xs:complexType>
  </xs:schema>
  <xs:schema targetNamespace='http://www.w3.org/2000/09/xmldsig#' version='1.0' xmlns:ns1='http://www.betha.com.br/e-nota-contribuinte-ws' xmlns:tns='http://www.w3.org/2000/09/xmldsig#' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
   <xs:import namespace='http://www.betha.com.br/e-nota-contribuinte-ws'/>
   <xs:element name='CanonicalizationMethod' type='tns:tcCanonicalizationMethod'/>
   <xs:element name='DigestMethod' type='tns:tcDigestMethod'/>
   <xs:element name='DigestValue' type='xs:string'/>
   <xs:element name='Reference' type='ns1:tcReference'/>
   <xs:element name='Signature' type='tns:Signature'/>
   <xs:element name='SignatureMethod' type='tns:tcSignatureMethod'/>
   <xs:element name='Transform' type='ns1:tcTransform'/>
   <xs:element name='Transforms' type='ns1:tcTransforms'/>
   <xs:element name='X509Data' type='tns:tcX509Data'/>
   <xs:element name='tcCanonicalizationMethod' type='tns:tcCanonicalizationMethod'/>
   <xs:element name='tcDigestMethod' type='tns:tcDigestMethod'/>
   <xs:element name='tcSignatureMethod' type='tns:tcSignatureMethod'/>
   <xs:element name='tcX509Data' type='tns:tcX509Data'/>
   <xs:complexType name='Signature'>
    <xs:sequence>
     <xs:element form='qualified' name='SignedInfo' type='ns1:tcSigInfo'/>
     <xs:element form='qualified' name='SignatureValue' type='xs:string'/>
     <xs:element form='qualified' name='KeyInfo' type='ns1:tcKeyInfo'/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name='tcCanonicalizationMethod'>
    <xs:sequence/>
    <xs:attribute ref='tns:Algorithm' use='required'/>
   </xs:complexType>
   <xs:complexType name='tcSignatureMethod'>
    <xs:sequence/>
    <xs:attribute ref='tns:Algorithm' use='required'/>
   </xs:complexType>
   <xs:complexType name='tcDigestMethod'>
    <xs:sequence/>
    <xs:attribute ref='tns:Algorithm' use='required'/>
   </xs:complexType>
   <xs:complexType name='tcX509Data'>
    <xs:sequence>
     <xs:element form='qualified' name='X509Certificate' type='xs:string'/>
    </xs:sequence>
   </xs:complexType>
   <xs:attribute name='Algorithm' type='xs:string'/>
  </xs:schema>
 </types>
 <message name='ConsultarNEPorRps_ConsultarNfseRpsEnvio'>
  <part element='tns:ConsultarNfseRpsEnvio' name='ConsultarNfseRpsEnvio'></part>
 </message>
 <message name='ConsultarNEPorRps_ConsultarNfsePorRpsEnvio'>
  <part element='tns:ConsultarNfsePorRpsEnvio' name='ConsultarNfsePorRpsEnvio'></part>
 </message>
 <message name='ConsultarNEPorRps_ConsultarNfsePorRpsEnvioResponse'>
  <part element='tns:ConsultarNfsePorRpsEnvioResponse' name='ConsultarNfsePorRpsEnvioResponse'></part>
 </message>
 <message name='ConsultarNEPorRps_ConsultarNfseRpsEnvioResponse'>
  <part element='tns:ConsultarNfseRpsEnvioResponse' name='ConsultarNfseRpsEnvioResponse'></part>
 </message>
 <portType name='ConsultarNEPorRps'>
  <operation name='ConsultarNfsePorRpsEnvio' parameterOrder='ConsultarNfsePorRpsEnvio'>
   <input message='tns:ConsultarNEPorRps_ConsultarNfsePorRpsEnvio'></input>
   <output message='tns:ConsultarNEPorRps_ConsultarNfsePorRpsEnvioResponse'></output>
  </operation>
  <operation name='ConsultarNfseRpsEnvio' parameterOrder='ConsultarNfseRpsEnvio'>
   <input message='tns:ConsultarNEPorRps_ConsultarNfseRpsEnvio'></input>
   <output message='tns:ConsultarNEPorRps_ConsultarNfseRpsEnvioResponse'></output>
  </operation>
 </portType>
 <binding name='ConsultarNEPorRpsBinding' type='tns:ConsultarNEPorRps'>
  <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
  <operation name='ConsultarNfsePorRpsEnvio'>
   <soap:operation soapAction=''/>
   <input>
    <soap:body use='literal'/>
   </input>
   <output>
    <soap:body use='literal'/>
   </output>
  </operation>
  <operation name='ConsultarNfseRpsEnvio'>
   <soap:operation soapAction=''/>
   <input>
    <soap:body use='literal'/>
   </input>
   <output>
    <soap:body use='literal'/>
   </output>
  </operation>
 </binding>
 <service name='ConsultarNEPorRpsService'>
  <port binding='tns:ConsultarNEPorRpsBinding' name='ConsultarNEPorRpsPort'>
   <soap:address location='http://e-gov.betha.com.br/e-nota-contribuinte-ws/consultarNfsePorRps'/>
  </port>
 </service>
</definitions>