<?xml version="1.0" encoding="utf-8"?>
<xs:schema
xmlns:tipos="http://localhost:8080/WsNFe2/tp"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ns1="http://localhost:8080/WsNFe2/lote" targetNamespace="http://localhost:8080/WsNFe2/lote">
	<xs:import namespace="http://localhost:8080/WsNFe2/tp" schemaLocation="Tipos.xsd"/>
	<xs:element name="RetornoConsultaNotas">
		<xs:annotation>
			<xs:documentation>Schema utilizado para Retrono de consulta de notas.</xs:documentation>
			<xs:documentation>Este Schema XML é utilizado pelos prestadores de serviços o retorno da consulta de Notas fiscais emitidas por RPS.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Cabecalho">
					<xs:annotation>
						<xs:documentation>Cabeçalho da Consulta.</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="CodCidade"  type="tipos:tpCodCidade" minOccurs="1" maxOccurs="1">
								<xs:annotation>
									<xs:documentation>Informe o Codigo da Cidade.</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element name="CPFCNPJRemetente" type="tipos:tpCPFCNPJ" minOccurs="1" maxOccurs="1">
								<xs:annotation>
									<xs:documentation>Informe o CPF/CNPJ do Remetente autorizado a transmitir a mensagem XML.</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element name="InscricaoMunicipalPrestador" type="tipos:tpInscricaoMunicipal" minOccurs="1" maxOccurs="1">
								<xs:annotation>
									<xs:documentation>Informe a Inscrição Municipal do Prestador</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element name="dtInicio"
								type="xs:date" minOccurs="1" maxOccurs="1">
								<xs:annotation>
									<xs:documentation>Informe a data de início do	período transmitido	(AAAA-MM-DD).</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element name="dtFim" type="xs:date" minOccurs="1" maxOccurs="1">
								<xs:annotation>
									<xs:documentation>Informe a data final do período transmitido (AAAA-MM-DD).</xs:documentation>
								</xs:annotation>
							</xs:element>
						    <xs:element name="Versao" type="tipos:tpVersao" fixed="1" minOccurs="1" maxOccurs="1">
						    <xs:annotation>
									<xs:documentation>Versão do Schema XML utilizado.</xs:documentation>
								</xs:annotation>
						    </xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
				<xs:element name="Notas" type="tipos:tpListaNFSeConsultaNota" minOccurs="0" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>Informe os RPS a serem substituidos por NF-e.</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:element name="Erros" type="tipos:tpListaErros" minOccurs="0" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>Elemento que representa a ocorrência de eventos de erro durante o processamento da mensagem XML.</xs:documentation>
					</xs:annotation>
				</xs:element>

			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>
