<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tipos="urn:TiposBasicos" xmlns:ns1="urn:TiposProveedorAPlataforma" targetNamespace="urn:TiposProveedorAPlataforma" elementFormDefault="qualified">
	<xsd:annotation>
		<xsd:documentation xml:lang="ES">
		XML Schema que se importa desde el WSDL ProveedorAPlataforma para gestionar los parámetros de entrada y salida de las operaciones,
		así como los tipos componentes de dichos parámetros.
		</xsd:documentation>
	</xsd:annotation>
	<xsd:import namespace="urn:TiposBasicos" schemaLocation="TiposBasicos.xsd">
		<xsd:annotation>
			<xsd:documentation xml:lang="ES">
				Importamos los tipos básicos
			</xsd:documentation>
		</xsd:annotation>
	</xsd:import>
	<xsd:element name="AltaFacturaPeticion">
		<xsd:annotation>
			<xsd:documentation xml:lang="ES">Parámetros de entrada en el alta de factura</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="OrganoGestor" type="tipos:OrganoGestorType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Órgano gestor destinatario de la factura (Ministerio / Organismo / Agencia)</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="UnidadTramitadora" type="tipos:UnidadTramitadoraType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Unidad tramitadora destinataria de la factura</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="Factura" type="xsd:base64Binary" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Factura en formato facturae o cualquier otro oficialmente admitido en la AGE</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="NamespaceFormatoFactura" type="xsd:string" nillable="true">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">
						Cadena que define el formato de la factura que se envía. Se propone que su formato sea el del Namespace de la propia factura, como
							http://www.facturae.es/Facturae/2009/v3.2/Facturae 
						o en el caso de que se acabe admitiendo UBL, algo como
							urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="Anexo" type="tipos:AnexoType" nillable="true" maxOccurs="unbounded">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">
						Anexo (uno o varios) que se acompaña a la factura
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>				
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="AltaFacturaRespuesta">
		<xsd:annotation>
			<xsd:documentation xml:lang="ES">Parámetros de salida del alta de factura</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="OrganoGestor" type="tipos:OrganoGestorType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Órgano gestor destinatario de la factura (Ministerio / Organismo / Agencia)</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="UnidadTramitadora" type="tipos:UnidadTramitadoraType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Unidad tramitadora destinataria de la factura</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="IndentificadorFactura" type="tipos:IdentificadorFacturaType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Identificador de factura (NIF emisor, nº y serie de factura)</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="FechaHoraRecepcion" type="xsd:dateTime" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Fecha y hora de recepción</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="CodigoRecepcion" type="xsd:string" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Código de recepción</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="ApunteRegistral" type="xsd:string" nillable="true">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Datos referentes al apunte registral (opcional)</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="ConsultarEstadoFacturaPorIdentificadorPeticion">
		<xsd:annotation>
			<xsd:documentation xml:lang="ES">Parámetros de entrada del método ConsultarEstadoFacturaPorIdentificador</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="OrganoGestor" type="tipos:OrganoGestorType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Órgano gestor destinatario de la factura (Ministerio / Organismo / Agencia)</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="UnidadTramitadora" type="tipos:UnidadTramitadoraType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Unidad tramitadora destinataria de la factura</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="IdentificadorFactura" type="tipos:IdentificadorFacturaType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Identificador de factura</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="ConsultarEstadoFacturaPorIdentificadorRespuesta">
		<xsd:annotation>
			<xsd:documentation xml:lang="ES">Parámetros de salida del método ConsultarEstadoFacturaPorIdentificador</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="OrganoGestor" type="tipos:OrganoGestorType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Órgano gestor destinatario de la factura (Ministerio / Organismo / Agencia)</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="UnidadTramitadora" type="tipos:UnidadTramitadoraType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Unidad tramitadora destinataria de la factura</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="IdentificadorFactura" type="tipos:IdentificadorFacturaType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Identificador de factura</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="Estado" type="tipos:EstadoType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Código de estado</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="ConsultarEstadoFacturaPorRegistroPeticion">
		<xsd:annotation>
			<xsd:documentation xml:lang="ES">Parámetros de entrada del método ConsultarEstadoFacturaPorRegistro</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="OrganoGestor" type="tipos:OrganoGestorType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Órgano gestor destinatario de la factura (Ministerio / Organismo / Agencia)</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="UnidadTramitadora" type="tipos:UnidadTramitadoraType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Unidad tramitadora destinataria de la factura</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="ApunteRegistral" type="xsd:string" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Número de registro</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="ConsultarEstadoFacturaPorRegistroRespuesta">
		<xsd:annotation>
			<xsd:documentation xml:lang="ES">Parámetros de salida del método ConsultarEstadoFacturaPorRegistro</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="OrganoGestor" type="tipos:OrganoGestorType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Órgano gestor destinatario de la factura (Ministerio / Organismo / Agencia)</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="UnidadTramitadora" type="tipos:UnidadTramitadoraType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Unidad tramitadora destinataria de la factura</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="IdentificadorFactura" type="tipos:IdentificadorFacturaType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Identificador de factura</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="Estado" type="tipos:EstadoType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Código de estado</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="AnularFacturaPeticion">
		<xsd:annotation>
			<xsd:documentation xml:lang="ES">Parámetros de entrada del método AnularFactura</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="OrganoGestor" type="tipos:OrganoGestorType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Órgano gestor destinatario de la factura (Ministerio / Organismo / Agencia)</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="UnidadTramitadora" type="tipos:UnidadTramitadoraType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Unidad tramitadora destinataria de la factura</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="IdentificadorFactura" type="tipos:IdentificadorFacturaType" nillable="false">
					<xsd:annotation>
						<xsd:documentation xml:lang="ES">Identificador de factura</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="AnularFacturaRespuesta">
		<xsd:annotation>
			<xsd:documentation xml:lang="ES">Parámetros de salida del método AnularFactura</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="AnularFacturaResultado" type="xsd:string" nillable="false"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:element name="ErrorProveedorPlataforma" type="tipos:ErrorType">
		<xsd:annotation>
			<xsd:documentation xml:lang="ES">Parámetro para los errores</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
</xsd:schema>
