<?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="RetornoConsultaNFSeRPS">
		<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="transacao" type="xs:boolean"
								default="true" minOccurs="1" maxOccurs="1">
								<xs:annotation>
									<xs:documentation>Informe se as NF-e a serem consultadas
										farão parte de uma mesma transação. Informe sempre True.
									</xs:documentation>
								</xs:annotation>
							</xs:element>
							<xs:element name="Versao" type="tipos:tpVersao" fixed="1"
								minOccurs="1" maxOccurs="1">
								<xs:annotation>
									<xs:documentation>Informe a Versão do Schema XML
										utilizado.</xs:documentation>
								</xs:annotation>
							</xs:element>
						</xs:sequence>
					</xs:complexType>
				</xs:element>

				<xs:element name="NotasConsultadas" type="tipos:tpListaNFSeConsultaNota"
					minOccurs="0" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>Informe os RPS a serem consultados por
							NF-e.</xs:documentation>
					</xs:annotation>
				</xs:element>

				<xs:element name="Alertas" type="tipos:tpListaAlertas"
					minOccurs="0" maxOccurs="1">
					<xs:annotation>
						<xs:documentation>Elemento que representa a ocorrência de
							eventos de alertas o durante o processamento da mensagem XML.
						</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>
