<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
            xmlns="http://betim.rps.com.br/sgm/zend/default/xsd/nfse?format=xml" 
            xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" 
            targetNamespace="http://betim.rps.com.br/sgm/zend/default/xsd/nfse?format=xml" 
            elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://betim.rps.com.br/sgm/zend/default/xsd/xmldsigcore?format=xml"/>
	<!-- definition of simple elements -->
	<xsd:simpleType name="tsNumeroNfse">
		<xsd:restriction base="xsd:nonNegativeInteger">
			<xsd:totalDigits value="15"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsCodigoVerificacao">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="9"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsStatusRps">
		<xsd:restriction base="xsd:byte">
			<xsd:pattern value="1|2"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsStatusNfse">
		<xsd:restriction base="xsd:byte">
			<xsd:pattern value="1|2"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsNaturezaOperacao">
		<xsd:restriction base="xsd:byte">
			<xsd:pattern value="1|2|3|4|5|6"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsRegimeEspecialTributacao">
		<xsd:restriction base="xsd:byte">
			<xsd:pattern value="1|2|3|4|5|6|7|8|9"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsRegimeRegimeEspecialRecolhimento">
		<xsd:restriction base="xsd:byte">
			<xsd:pattern value="1|2|3|4|5|6"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsSimNao">
		<xsd:restriction base="xsd:byte">
			<xsd:pattern value="1|2"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsNumeroRps">
		<xsd:restriction base="xsd:nonNegativeInteger">
			<xsd:totalDigits value="15"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsSerieRps">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="5"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsTipoRps">
		<xsd:restriction base="xsd:byte">
			<xsd:pattern value="1|2|3"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsOutrasInformacoes">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="255"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsValor">
		<xsd:restriction base="xsd:decimal">
			<xsd:totalDigits value="15"/>
			<xsd:fractionDigits value="2" fixed="true"/>
			<xsd:minInclusive value="0"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsItemListaServico">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="5"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsCodigoCnae">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="8"/>
			<xsd:minLength value="1"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsCodigoTributacao">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="20"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsAliquota">
		<xsd:restriction base="xsd:decimal">
			<xsd:totalDigits value="5"/>
			<xsd:fractionDigits value="4"/>
			<xsd:minInclusive value="0"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsDiscriminacao">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="2000"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsCodigoMunicipioIbge">
		<xsd:restriction base="xsd:int">
			<xsd:totalDigits value="7"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsCodPais">
		<xsd:restriction base="xsd:int">
			<xsd:totalDigits value="7"/>
		</xsd:restriction>
	</xsd:simpleType>	
	<xsd:simpleType name="tsInscricaoMunicipal">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="15"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsRazaoSocial">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="115"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsDescCidadeExterior">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="100"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>	
	<xsd:simpleType name="tsNomeFantasia">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="60"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsCnpj">
		<xsd:restriction base="xsd:string">
			<xsd:length value="14" fixed="true"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsEndereco">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="125"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsNumeroEndereco">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="10"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsComplementoEndereco">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="60"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsBairro">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="60"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsUf">
		<xsd:restriction base="xsd:string">
			<xsd:length value="2" fixed="true"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsCep">
		<xsd:restriction base="xsd:int">
			<xsd:totalDigits value="8" fixed="true"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsEmail">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="80"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsTelefone">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="11"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsCpf">
		<xsd:restriction base="xsd:string">
			<xsd:length value="11" fixed="true"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsCpfCnpj">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="14"/>
			<xsd:minLength value="11"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsIndicacaoCpfCnpj">
		<xsd:restriction base="xsd:byte">
			<xsd:pattern value="1|2|3"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsCodigoObra">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="15"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsArt">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="15"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsNumeroLote">
		<xsd:restriction base="xsd:nonNegativeInteger">
			<xsd:totalDigits value="15"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsNumeroProtocolo">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="50"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsSituacaoLoteRps">
		<xsd:restriction base="xsd:byte">
			<xsd:pattern value="1|2|3|4"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsQuantidadeRps">
		<xsd:restriction base="xsd:int"/>
	</xsd:simpleType>
	<xsd:simpleType name="tsCodigoMensagemAlerta">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="4"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsDescricaoMensagemAlerta">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="200"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsCodigoCancelamentoNfse">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="4"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsIdTag">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="255"/>
		</xsd:restriction>
	</xsd:simpleType>
	<xsd:simpleType name="tsVersao">
		<xsd:restriction base="xsd:token">
			<xsd:pattern value="[1-9]{1}[0-9]{0,1}\.[0-9]{2}"/>
		</xsd:restriction>
	</xsd:simpleType>
	<!-- definition of complex elements -->
	<xsd:complexType name="tcCpfCnpj">
		<xsd:choice>
			<xsd:element name="Cpf" type="tsCpf"/>
			<xsd:element name="Cnpj" type="tsCnpj"/>
		</xsd:choice>
	</xsd:complexType>
	<xsd:complexType name="tcEndereco">
		<xsd:sequence>
			<xsd:element name="Endereco" type="tsEndereco" minOccurs="0"/>
			<xsd:element name="Numero" type="tsNumeroEndereco" minOccurs="0"/>
			<xsd:element name="Complemento" type="tsComplementoEndereco" minOccurs="0"/>
			<xsd:element name="Bairro" type="tsBairro" minOccurs="0"/>
			<xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge" minOccurs="0"/>
			<xsd:element name="Uf" type="tsUf" minOccurs="0"/>
			<xsd:element name="Cep" type="tsCep" minOccurs="0"/>
			<xsd:element name="CodPais" type="tsCodPais" minOccurs="0"/>
			<xsd:element name="DescCidadeExterior" type="tsDescCidadeExterior" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="tcContato">
		<xsd:sequence>
			<xsd:element name="Telefone" type="tsTelefone" minOccurs="0"/>
			<xsd:element name="Email" type="tsEmail" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="tcIdentificacaoOrgaoGerador">
		<xsd:sequence>
			<xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge"/>
			<xsd:element name="Uf" type="tsUf"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="tcIdentificacaoRps">
		<xsd:sequence>
			<xsd:element name="Numero" type="tsNumeroRps"/>
			<xsd:element name="Serie" type="tsSerieRps"/>
			<xsd:element name="Tipo" type="tsTipoRps"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="tcIdentificacaoPrestador">
		<xsd:sequence>
			<xsd:element name="Cnpj" type="tsCpfCnpj"/>
			<xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="tcIdentificacaoTomador">
		<xsd:sequence>
			<xsd:element name="CpfCnpj" type="tcCpfCnpj" minOccurs="0"/>
			<xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="tcDadosTomador">
		<xsd:sequence>
			<xsd:element name="IdentificacaoTomador" type="tcIdentificacaoTomador" minOccurs="0"/>
			<xsd:element name="RazaoSocial" type="tsRazaoSocial" minOccurs="0"/>
			<xsd:element name="Endereco" type="tcEndereco" minOccurs="0"/>
			<xsd:element name="Contato" type="tcContato" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="tcIdentificacaoIntermediarioServico">
		<xsd:sequence>
			<xsd:element name="RazaoSocial" type="tsRazaoSocial"/>
			<xsd:element name="CpfCnpj" type="tcCpfCnpj"/>
			<xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="tcValores">
		<xsd:sequence>
			<xsd:element name="ValorServicos" type="tsValor"/>
			<xsd:element name="ValorDeducoes" type="tsValor" minOccurs="0"/>
			<xsd:element name="ValorPis" type="tsValor" minOccurs="0"/>
			<xsd:element name="ValorCofins" type="tsValor" minOccurs="0"/>
			<xsd:element name="ValorInss" type="tsValor" minOccurs="0"/>
			<xsd:element name="ValorIr" type="tsValor" minOccurs="0"/>
			<xsd:element name="ValorCsll" type="tsValor" minOccurs="0"/>
			<xsd:element name="IssRetido" type="tsSimNao"/>
			<xsd:element name="ValorIss" type="tsValor" minOccurs="0"/>
			<xsd:element name="OutrasRetencoes" type="tsValor" minOccurs="0"/>
			<xsd:element name="BaseCalculo" type="tsValor" minOccurs="0"/>
			<xsd:element name="Aliquota" type="tsAliquota" minOccurs="0"/>
			<xsd:element name="ValorLiquidoNfse" type="tsValor" minOccurs="0"/>
			<xsd:element name="ValorIssRetido" type="tsValor" minOccurs="0"/>
			<xsd:element name="DescontoCondicionado" type="tsValor" minOccurs="0"/>
			<xsd:element name="DescontoIncondicionado" type="tsValor" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="tcDadosServico">
		<xsd:sequence>
			<xsd:element name="Valores" type="tcValores"/>
			<xsd:element name="ItemListaServico" type="tsItemListaServico"/>
			<xsd:element name="CodigoCnae" type="tsCodigoCnae" minOccurs="0"/>
			<xsd:element name="CodigoTributacaoMunicipio" type="tsCodigoTributacao" minOccurs="0"/>
			<xsd:element name="Discriminacao" type="tsDiscriminacao"/>
			<xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="tcDadosConstrucaoCivil">
		<xsd:sequence>
			<xsd:element name="CodigoObra" type="tsCodigoObra"/>
			<xsd:element name="Art" type="tsArt"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="tcDadosPrestador">
		<xsd:sequence>
			<xsd:element name="IdentificacaoPrestador" type="tcIdentificacaoPrestador"/>
			<xsd:element name="RazaoSocial" type="tsRazaoSocial"/>
			<xsd:element name="NomeFantasia" type="tsNomeFantasia" minOccurs="0"/>
			<xsd:element name="Endereco" type="tcEndereco"/>
			<xsd:element name="Contato" type="tcContato" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="tcInfRps">
		<xsd:sequence>
			<xsd:element name="IdentificacaoRps" type="tcIdentificacaoRps"/>
			<xsd:element name="DataEmissao" type="xsd:dateTime"/>
			<xsd:element name="NaturezaOperacao" type="tsNaturezaOperacao"/>
			<xsd:element name="RegimeEspecialTributacao" type="tsRegimeEspecialTributacao" minOccurs="1"/>
			<xsd:element name="RegimeEspecialRecolhimento" type="tsRegimeRegimeEspecialRecolhimento" minOccurs="0"/>
			<xsd:element name="OptanteSimplesNacional" type="tsSimNao"/>
			<xsd:element name="IncentivadorCultural" type="tsSimNao"/>
			<xsd:element name="Status" type="tsStatusRps"/>
			<xsd:element name="RpsSubstituido" type="tcIdentificacaoRps" minOccurs="0"/>
			<xsd:element name="Servico" type="tcDadosServico"/>
			<xsd:element name="Prestador" type="tcIdentificacaoPrestador"/>
			<xsd:element name="Tomador" type="tcDadosTomador" minOccurs="1"/>
			<xsd:element name="IntermediarioServico" type="tcIdentificacaoIntermediarioServico" minOccurs="0"/>
			<xsd:element name="ConstrucaoCivil" type="tcDadosConstrucaoCivil" minOccurs="0"/>
		</xsd:sequence>
		<xsd:attribute name="Id" type="tsIdTag"/>
	</xsd:complexType>
	<xsd:complexType name="tcRps">
		<xsd:sequence>
			<xsd:element name="InfRps" type="tcInfRps"/>
			<xsd:element ref="dsig:Signature" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="tcIdentificacaoNfse">
		<xsd:sequence>
			<xsd:element name="Numero" type="tsNumeroNfse"/>
			<xsd:element name="Cnpj" type="tsCnpj"/>
			<xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal" minOccurs="0"/>
			<xsd:element name="CodigoMunicipio" type="tsCodigoMunicipioIbge" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="tcInfNfse">
		<xsd:sequence>
			<xsd:element name="Numero" type="tsNumeroNfse"/>
			<xsd:element name="CodigoVerificacao" type="tsCodigoVerificacao"/>
			<xsd:element name="DataEmissao" type="xsd:dateTime"/>
			<xsd:element name="IdentificacaoRps" type="tcIdentificacaoRps" minOccurs="0"/>
			<xsd:element name="DataEmissaoRps" type="xsd:date" minOccurs="0"/>
			<xsd:element name="NaturezaOperacao" type="tsNaturezaOperacao"/>
			<xsd:element name="RegimeEspecialTributacao" type="tsRegimeEspecialTributacao" minOccurs="0"/>
			<xsd:element name="OptanteSimplesNacional" type="tsSimNao"/>
			<xsd:element name="IncentivadorCultural" type="tsSimNao"/>
			<xsd:element name="Competencia" type="xsd:date"/>
			<xsd:element name="NfseSubstituida" type="tsNumeroNfse" minOccurs="0"/>
			<xsd:element name="OutrasInformacoes" type="tsOutrasInformacoes" minOccurs="0"/>
			<xsd:element name="Servico" type="tcDadosServico"/>
			<xsd:element name="ValorCredito" type="tsValor" minOccurs="0"/>
			<xsd:element name="PrestadorServico" type="tcDadosPrestador"/>
			<xsd:element name="TomadorServico" type="tcDadosTomador" minOccurs="0"/>
			<xsd:element name="IntermediarioServico" type="tcIdentificacaoIntermediarioServico" minOccurs="0"/>
			<xsd:element name="OrgaoGerador" type="tcIdentificacaoOrgaoGerador"/>
			<xsd:element name="ConstrucaoCivil" type="tcDadosConstrucaoCivil" minOccurs="0"/>
		</xsd:sequence>
		<xsd:attribute name="Id" type="tsIdTag"/>
	</xsd:complexType>
	<!--
    	ADICIONADO...
    	MOTIVO: Evitar grandes tamanhos no retorno de notas fiscais quando pesquisado por período.
     -->
	<xsd:complexType name="tcPaginacao">
		<xsd:sequence>
		  <xsd:element name="Observacao" type="xsd:string" minOccurs="0" maxOccurs="1"/>
		  <xsd:element name="TotalNfse" type="xsd:nonNegativeInteger" minOccurs="1" maxOccurs="1"/>
		  <xsd:element name="NumeroPaginas" type="xsd:nonNegativeInteger" minOccurs="1" maxOccurs="1"/>
		  <xsd:element name="PaginaAtual" type="xsd:nonNegativeInteger" minOccurs="1" maxOccurs="1"/>
		</xsd:sequence>
    </xsd:complexType>
	<xsd:complexType name="tcNfse">
		<xsd:sequence>
			<xsd:element name="InfNfse" type="tcInfNfse"/>
			<xsd:element ref="dsig:Signature" maxOccurs="2"/>
		</xsd:sequence>
		<xsd:attribute name="versao" type="tsVersao" use="required"/>
	</xsd:complexType>
	<xsd:complexType name="tcInfPedidoCancelamento">
		<xsd:sequence>
			<xsd:element name="IdentificacaoNfse" type="tcIdentificacaoNfse"/>
			<xsd:element name="CodigoCancelamento" type="tsCodigoCancelamentoNfse"/>
		</xsd:sequence>
		<xsd:attribute name="Id" type="tsIdTag"/>
	</xsd:complexType>
	<xsd:complexType name="tcPedidoCancelamento">
		<xsd:sequence>
			<xsd:element name="InfPedidoCancelamento" type="tcInfPedidoCancelamento"/>
			<xsd:element ref="dsig:Signature" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="tcConfirmacaoCancelamento">
		<xsd:sequence>
			<xsd:element name="Pedido" type="tcPedidoCancelamento"/>
			<xsd:element name="DataHora" type="xsd:dateTime"/>
		</xsd:sequence>
		<xsd:attribute name="Id" type="tsIdTag"/>
	</xsd:complexType>
	<xsd:element name="RetCancelamento">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="NfseCancelamento" type="tcCancelamentoNfse" maxOccurs="unbounded"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:complexType name="tcCancelamentoNfse">
		<xsd:sequence>
			<xsd:element name="Confirmacao" type="tcConfirmacaoCancelamento"/>
			<xsd:element ref="dsig:Signature"/>
		</xsd:sequence>
		<xsd:attribute name="versao" type="tsVersao" use="required"/>
	</xsd:complexType>
	<xsd:complexType name="tcInfSubstituicaoNfse">
		<xsd:sequence>
			<xsd:element name="NfseSubstituidora" type="tsNumeroNfse"/>
		</xsd:sequence>
		<xsd:attribute name="Id" type="tsIdTag"/>

	</xsd:complexType>
	<xsd:complexType name="tcSubstituicaoNfse">
		<xsd:sequence>
			<xsd:element name="SubstituicaoNfse" type="tcInfSubstituicaoNfse"/>
			<xsd:element ref="dsig:Signature" maxOccurs="2"/>
		</xsd:sequence>
		<xsd:attribute name="versao" type="tsVersao" use="required"/>
	</xsd:complexType>
	<xsd:complexType name="tcCompNfse">
		<xsd:sequence>
			<xsd:element name="Nfse" type="tcNfse"/>
			<xsd:element name="NfseCancelamento" type="tcCancelamentoNfse" minOccurs="0"/>
			<xsd:element name="NfseSubstituicao" type="tcSubstituicaoNfse" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:element name="CompNfse" type="tcCompNfse"/>
	<xsd:element name="ListaMensagemRetorno">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="MensagemRetorno" type="tcMensagemRetorno" maxOccurs="unbounded"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="ListaMensagemRetornoLote">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="MensagemRetorno" type="tcMensagemRetornoLote" maxOccurs="unbounded"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="tcMensagemRetorno">
		<xsd:sequence>
			<xsd:element name="Codigo" type="tsCodigoMensagemAlerta"/>
			<xsd:element name="Mensagem" type="tsDescricaoMensagemAlerta"/>
			<xsd:element name="Correcao" type="tsDescricaoMensagemAlerta" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="tcMensagemRetornoLote">
		<xsd:sequence>
			<xsd:element name="IdentificacaoRps" type="tcIdentificacaoRps"/>
			<xsd:element name="Codigo" type="tsCodigoMensagemAlerta"/>
			<xsd:element name="Mensagem" type="tsDescricaoMensagemAlerta"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="tcLoteRps">
		<xsd:sequence>
			<xsd:element name="NumeroLote" type="tsNumeroLote"/>
			<xsd:element name="Cnpj" type="tsCpfCnpj"/>
			<xsd:element name="InscricaoMunicipal" type="tsInscricaoMunicipal"/>
			<xsd:element name="QuantidadeRps" type="tsQuantidadeRps"/>
			<xsd:element name="ListaRps">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Rps" type="tcRps" maxOccurs="unbounded"/>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="Id" type="tsIdTag"/>
		<xsd:attribute name="versao" type="tsVersao" use="required"/>

	</xsd:complexType>
	<xsd:element name="EnviarLoteRpsResposta">
		<xsd:complexType>
			<xsd:choice>
				<xsd:sequence>
					<xsd:element name="NumeroLote" type="tsNumeroLote"/>
					<xsd:element name="DataRecebimento" type="xsd:dateTime"/>
					<xsd:element name="Protocolo" type="tsNumeroProtocolo"/>
				</xsd:sequence>
				<xsd:element ref="ListaMensagemRetorno"/>
			</xsd:choice>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="EnviarLoteRpsEnvio">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="LoteRps" type="tcLoteRps"/>
				<xsd:element ref="dsig:Signature" minOccurs="0"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="ConsultarSituacaoLoteRpsResposta">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="NumeroLote" type="tsNumeroLote" minOccurs="0"/>
				<xsd:element name="Situacao" type="tsSituacaoLoteRps" />
				<xsd:element ref="ListaMensagemRetorno"  minOccurs="0"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>


	<xsd:element name="GerarNfseEnvio">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="LoteRps" type="tcLoteRps"/>
				<xsd:element ref="dsig:Signature" minOccurs="0"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="GerarNfseEnvioResposta">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="NumeroLote" type="tsNumeroLote"/>
				<xsd:element name="DataRecebimento" type="xsd:dateTime"/>
				<xsd:element name="Protocolo" type="tsNumeroProtocolo"/>
    			<xsd:choice>
    				<xsd:element name="ListaNfse">
    					<xsd:complexType>
    						<xsd:sequence>
    							<xsd:element ref="CompNfse" maxOccurs="unbounded"/>
    						</xsd:sequence>
    					</xsd:complexType>
    				</xsd:element>
    				<xsd:element ref="ListaMensagemRetorno"/>
    				<xsd:element ref="ListaMensagemRetornoLote"/>
    			</xsd:choice>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>


	<xsd:element name="ConsultarSituacaoLoteRpsEnvio">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Prestador" type="tcIdentificacaoPrestador"/>
				<xsd:element name="Protocolo" type="tsNumeroProtocolo"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="ConsultarNfseRpsResposta">
		<xsd:complexType>
			<xsd:choice>
				<xsd:element ref="CompNfse"/>
				<xsd:element ref="ListaMensagemRetorno"/>
			</xsd:choice>
		</xsd:complexType>
	</xsd:element>


	<xsd:element name="ConsultarNfseRpsEnvio">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="IdentificacaoRps" type="tcIdentificacaoRps"/>
				<xsd:element name="Prestador" type="tcIdentificacaoPrestador"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="ConsultarNfseResposta">
		<xsd:complexType>
			<xsd:choice>
                <xsd:sequence>
    				<xsd:element name="ListaNfse">
    					<xsd:complexType>
    						<xsd:sequence>
    							<xsd:element ref="CompNfse" maxOccurs="unbounded"/>
    						</xsd:sequence>
    					</xsd:complexType>
    				</xsd:element>
    				<xsd:element name="Paginacao" type="tcPaginacao" minOccurs="0" maxOccurs="1"/>
    			</xsd:sequence>
				<xsd:element ref="ListaMensagemRetorno"/>
			</xsd:choice>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="ConsultarNfseEnvio">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Prestador" type="tcIdentificacaoPrestador"/>
				<xsd:element name="NumeroNfse" type="tsNumeroNfse" minOccurs="0"/>
				<xsd:element name="PeriodoEmissao" minOccurs="0">
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="DataInicial" type="xsd:date"/>
							<xsd:element name="DataFinal" type="xsd:date"/>
							<xsd:element name="Pagina" type="xsd:nonNegativeInteger" minOccurs="0"/>
						</xsd:sequence>
					</xsd:complexType>
				</xsd:element>
				<xsd:element name="Tomador" type="tcIdentificacaoTomador" minOccurs="0"/>
				<xsd:element name="IntermediarioServico" type="tcIdentificacaoIntermediarioServico" minOccurs="0"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="ConsultarLoteRpsResposta">
		<xsd:complexType>
			<xsd:choice>
				<xsd:element name="ListaNfse">
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element ref="CompNfse" maxOccurs="unbounded"/>
						</xsd:sequence>
					</xsd:complexType>
				</xsd:element>
				<xsd:element ref="ListaMensagemRetorno"/>
				<xsd:element ref="ListaMensagemRetornoLote"/>
			</xsd:choice>
		</xsd:complexType>
	</xsd:element>


	<xsd:element name="ConsultarLoteRpsEnvio">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Prestador" type="tcIdentificacaoPrestador"/>
				<xsd:element name="Protocolo" type="tsNumeroProtocolo"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="CancelarNfseResposta">
		<xsd:complexType>
			<xsd:choice>
				<xsd:element ref="RetCancelamento"/>
				<xsd:element ref="ListaMensagemRetorno"/>
			</xsd:choice>
		</xsd:complexType>
	</xsd:element>


	<xsd:element name="CancelarNfseEnvio">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Pedido" type="tcPedidoCancelamento"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<!--
	Cabeçalho de dados
    -->
	<xsd:element name="cabecalho">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="versaoDados" type="tsVersao"/>
			</xsd:sequence>
			<xsd:attribute name="versao" type="tsVersao" use="required"/>
		</xsd:complexType>
	</xsd:element>


	<!--
	Novos elementos para atender aos serviços de geração dos lançamentos e emissão das guias
	-->

    <xsd:simpleType name="tsNumLancamento">
        <xsd:restriction base="xsd:nonNegativeInteger">
        	<xsd:totalDigits value="10"/>
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="tsNumeroGuia">
        <xsd:restriction base="xsd:nonNegativeInteger">
        	<xsd:totalDigits value="10"/>
        </xsd:restriction>
    </xsd:simpleType>

	<xsd:simpleType name="tsSituacaoGuia">
		<xsd:restriction base="xsd:byte">
			<xsd:pattern value="0|1|2|3"/>
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="tsAnoExercicio">
		<xsd:restriction base="xsd:gYear" />
	</xsd:simpleType>


	<xsd:simpleType name="tsMesReferencia">
		<xsd:restriction base="xsd:gMonth" />
	</xsd:simpleType>


	<xsd:simpleType name="tsCodBarras">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="44"/>
			<xsd:minLength value="44"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="tsDescJustificativaCancelamento">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="100"/>
			<xsd:minLength value="1"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="tsRepresentacaoNumerica">
		<xsd:restriction base="xsd:string">
			<xsd:maxLength value="60"/>
			<xsd:minLength value="60"/>
			<xsd:whiteSpace value="collapse"/>
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="tsPosicaoLancamento">
		<xsd:restriction base="xsd:byte">
			<xsd:pattern value="0|1|2"/>
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="tsTotalLancamentos">
		<xsd:restriction base="xsd:int"/>
	</xsd:simpleType>

	<xsd:simpleType name="tsTotalGuias">
		<xsd:restriction base="xsd:int"/>
	</xsd:simpleType>

	<xsd:complexType name="tcListaNotasFiscais">
		<xsd:sequence>
			<xsd:element name="NumeroNfse" type="tsNumeroNfse" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="tcListaNumeroLancamentos">
		<xsd:sequence>
			<xsd:element name="NumLancamento" type="tsNumLancamento" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="tcListaNumeroGuias">
		<xsd:sequence>
			<xsd:element name="NumeroGuia" type="tsNumeroGuia" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="tcListaMesReferencia">
		<xsd:sequence>
			<xsd:element name="MesReferencia" type="tsMesReferencia" maxOccurs="unbounded"/>
		</xsd:sequence>
	</xsd:complexType>



	<xsd:complexType name="tcGuia">
		<xsd:sequence>
			<xsd:element name="NumeroGuia" type="tsNumeroGuia"/>
			<xsd:element name="AnoExercicio" type="tsAnoExercicio"/>
			<xsd:element name="MesReferencia" type="tsMesReferencia"/>
			<xsd:element name="NumLancamento" type="tsNumLancamento"/>
			<xsd:element name="PrestadorServico" type="tcIdentificacaoPrestador"/>
			<xsd:element name="CodBarras" type="tsCodBarras"/>
			<xsd:element name="RepresentacaoNumerica" type="tsRepresentacaoNumerica"/>
			<xsd:element name="SituacaoGuia" type="tsSituacaoGuia"/>
			<xsd:element name="DataEmissaoGuia" type="xsd:date"/>
			<xsd:element name="DataEstimadaQuitacao" type="xsd:date"/>
			<xsd:element name="ValorMulta" type="tsValor"/>
			<xsd:element name="ValorJuros" type="tsValor"/>
			<xsd:element name="ValorCorrecao" type="tsValor"/>
			<xsd:element name="ValorPrincipal" type="tsValor"/>
			<xsd:element name="ValorTotal" type="tsValor"/>
			<xsd:element name="ValorTaxaExpediente" type="tsValor"/>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="tcLancamento">
		<xsd:sequence>
			<xsd:element name="NumLancamento" type="tsNumLancamento"/>
			<xsd:element name="AnoExercicio" type="tsAnoExercicio"/>
			<xsd:element name="MesReferencia" type="tsMesReferencia"/>
			<xsd:element name="DataLancamento" type="xsd:date"/>
			<xsd:element name="PosicaoLancamento" type="tsPosicaoLancamento"/>
			<xsd:element name="DataCancelamento" type="xsd:date" minOccurs="0"/>
			<xsd:element name="DescJustificativaCancelamento" type="tsDescJustificativaCancelamento" minOccurs="0"/>
			<xsd:element name="ValorTotal" type="tsValor"/>
			<xsd:element name="BaseCalculo" type="tsValor"/>
			<xsd:element name="Aliquota" type="tsValor"/>
			<xsd:element name="DataQuitacao" type="xsd:date" minOccurs="0"/>
			<xsd:element name="ValorRemanescente" type="tsValor" minOccurs="0"/>
			<xsd:element name="ListaNotasFiscais" type="tcListaNotasFiscais" minOccurs="0" />
		</xsd:sequence>
	</xsd:complexType>



	<xsd:element name="RealizarLancamentoEnvio">
		<xsd:complexType>
			<xsd:sequence>
			    <xsd:element name="RequisicaoLancamento">
            		<xsd:complexType>
            			<xsd:sequence>
            				<xsd:element name="Prestador" type="tcIdentificacaoPrestador"/>
            				<xsd:choice>
            				    <xsd:element name="IdentificacaoRps" type="tcIdentificacaoRps"/>
            				    <xsd:element name="Protocolo" type="tsNumeroProtocolo"/>
            					<xsd:element name="NumeroNfse" type="tsNumeroNfse" maxOccurs="1"/>
                    			<xsd:element name="ListaNumeroNfse" type="tcListaNotasFiscais" />
                                <xsd:element name="PeriodoEmissao" minOccurs="0">
                                	<xsd:complexType>
                                		<xsd:sequence>
                                			<xsd:element name="DataInicial" type="xsd:date"/>
                                			<xsd:element name="DataFinal" type="xsd:date"/>
                                		</xsd:sequence>
                                	</xsd:complexType>
                                </xsd:element>
            				</xsd:choice>
            			</xsd:sequence>
            			<xsd:attribute name="Id" type="tsIdTag"/>
            		</xsd:complexType>
            	</xsd:element>
            	<xsd:element ref="dsig:Signature" minOccurs="1" maxOccurs="1"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>


	<xsd:element name="RealizarLancamentoResposta">
		<xsd:complexType>
			<xsd:sequence>
			    <xsd:element name="TotalLancamentos" type="tsTotalLancamentos" minOccurs="0" maxOccurs="1"/>
			    <xsd:choice>
    				<xsd:element name="ListaLancamentos">
    					<xsd:complexType>
    						<xsd:sequence>
    							<xsd:element name="Lancamento" type="tcLancamento" maxOccurs="unbounded"/>
    						</xsd:sequence>
    					</xsd:complexType>
       				</xsd:element>
       				<xsd:element ref="ListaMensagemRetorno"/>
       			</xsd:choice>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>


	<xsd:element name="ConsultarLancamentoEnvio">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Prestador" type="tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1"/>
				<xsd:element name="PosicaoLancamento" type="tsPosicaoLancamento" minOccurs="0" maxOccurs="1"/>
				<xsd:choice>
				    <xsd:element name="IdentificacaoRps" type="tcIdentificacaoRps" minOccurs="1" maxOccurs="1"/>
				    <xsd:element name="Protocolo" type="tsNumeroProtocolo" minOccurs="1" maxOccurs="1"/>
					<xsd:element name="NumeroNfse" type="tsNumeroNfse" minOccurs="1" maxOccurs="1"/>
					<xsd:element name="NumLancamento" type="tsNumLancamento" minOccurs="1" maxOccurs="1"/>
					<xsd:element name="MesReferencia" type="tsMesReferencia" minOccurs="1" maxOccurs="1"/>
        			<xsd:element name="ListaNumeroNfse" type="tcListaNotasFiscais" />
                    <xsd:element name="ListaNumeroLancamentos" type="tcListaNumeroLancamentos" minOccurs="1" maxOccurs="1"  />
        			<xsd:element name="ListaMesReferencia" type="tcListaMesReferencia" minOccurs="1" maxOccurs="1"/>
                    <xsd:element name="PeriodoRealizacaoLancamento" minOccurs="1" maxOccurs="1">
                    	<xsd:complexType>
                    		<xsd:sequence>
                    			<xsd:element name="DataInicial" type="xsd:date"/>
                    			<xsd:element name="DataFinal" type="xsd:date"/>
                    		</xsd:sequence>
                    	</xsd:complexType>
                    </xsd:element>
				</xsd:choice>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="ConsultarLancamentoResposta">
		<xsd:complexType>
			<xsd:sequence>
			    <xsd:element name="TotalLancamentos" type="tsTotalLancamentos" minOccurs="0" maxOccurs="1"/>
			    <xsd:choice>
    				<xsd:element name="ListaLancamentos">
    					<xsd:complexType>
    						<xsd:sequence>
    							<xsd:element name="Lancamento" type="tcLancamento" maxOccurs="unbounded"/>
    						</xsd:sequence>
    					</xsd:complexType>
       				</xsd:element>
       				<xsd:element ref="ListaMensagemRetorno"/>
       			</xsd:choice>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>



	<xsd:element name="EmitirGuiaEnvio">
		<xsd:complexType>
			<xsd:sequence>
			    <xsd:element name="RequisicaoEmissao">
            		<xsd:complexType>
            			<xsd:sequence>
            				<xsd:element name="Prestador" type="tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1"/>
            				<xsd:choice>
            				    <xsd:element name="NumLancamento" type="tsNumLancamento" minOccurs="1" maxOccurs="1"/>
            				    <xsd:element name="ListaNumeroLancamentos" type="tcListaNumeroLancamentos" minOccurs="1" maxOccurs="1"  />
            				</xsd:choice>
            				<xsd:element name="DataEstimadaQuitacao" type="xsd:date" minOccurs="1" maxOccurs="1"/>
            			</xsd:sequence>
            			<xsd:attribute name="Id" type="tsIdTag"/>
            		</xsd:complexType>
            	</xsd:element>
            	<xsd:element ref="dsig:Signature" minOccurs="1" maxOccurs="1"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="EmitirGuiaResposta">
		<xsd:complexType>
			<xsd:sequence>
			    <xsd:element name="TotalGuias" type="tsTotalGuias" minOccurs="0" maxOccurs="1"/>
			    <xsd:choice>
    				<xsd:element name="ListaGuias">
    					<xsd:complexType>
    						<xsd:sequence>
    							<xsd:element name="Guia" type="tcGuia" maxOccurs="unbounded"/>
    						</xsd:sequence>
    					</xsd:complexType>
       				</xsd:element>
       				<xsd:element ref="ListaMensagemRetorno"/>
       			</xsd:choice>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>



	<xsd:element name="ConsultarGuiaEnvio">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="Prestador" type="tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1"/>
				<xsd:element name="SituacaoGuia" type="tsSituacaoGuia" minOccurs="0" maxOccurs="1"/>
				<xsd:choice>
					<xsd:element name="MesReferencia" type="tsMesReferencia" minOccurs="1" maxOccurs="1"/>
        			<xsd:element name="ListaMesReferencia" type="tcListaMesReferencia" minOccurs="1" maxOccurs="1"/>
                    <xsd:element name="NumLancamento" type="tsNumLancamento" minOccurs="1" maxOccurs="1"/>
                    <xsd:element name="ListaNumeroLancamentos" type="tcListaNumeroLancamentos" minOccurs="1" maxOccurs="1"  />
                    <xsd:element name="NumeroGuia" type="tsNumeroGuia" minOccurs="1" maxOccurs="1"/>
                    <xsd:element name="ListaNumeroGuias" type="tcListaNumeroGuias" minOccurs="1" maxOccurs="1"  />
				</xsd:choice>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="ConsultarGuiaResposta">
		<xsd:complexType>
			<xsd:sequence>
			    <xsd:element name="TotalGuias" type="tsTotalGuias" minOccurs="0" maxOccurs="1"/>
			    <xsd:choice>
    				<xsd:element name="ListaGuias">
    					<xsd:complexType>
    						<xsd:sequence>
    							<xsd:element name="Guia" type="tcGuia" maxOccurs="unbounded"/>
    						</xsd:sequence>
    					</xsd:complexType>
       				</xsd:element>
       				<xsd:element ref="ListaMensagemRetorno"/>
       			</xsd:choice>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>



	<xsd:element name="CancelarLancamentoEnvio">
		<xsd:complexType>
			<xsd:sequence>
			    <xsd:element name="RequisicaoCancelamento">
            		<xsd:complexType>
            			<xsd:sequence>
            				<xsd:element name="Prestador" type="tcIdentificacaoPrestador" minOccurs="1" maxOccurs="1"/>
           				    <xsd:element name="NumLancamento" type="tsNumLancamento" minOccurs="1" maxOccurs="1"/>
            			</xsd:sequence>
            			<xsd:attribute name="Id" type="tsIdTag"/>
            		</xsd:complexType>
            	</xsd:element>
            	<xsd:element ref="dsig:Signature" minOccurs="1" maxOccurs="1"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="CancelarLancamentoResposta">
		<xsd:complexType>
			<xsd:sequence>
			    <xsd:choice>
    				<xsd:element name="Lancamento" type="tcLancamento" minOccurs="0" maxOccurs="1"/>
       				<xsd:element ref="ListaMensagemRetorno"/>
       			</xsd:choice>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

</xsd:schema>
