sfRequerimiento / RegFactuSistemaFacturacion
ASP AutoIt C C (Unicode) C++ C++ (Unicode) C# DataFlex Delphi Foxpro Go Java Node.js Objective-C Perl PHP Extension PowerBuilder Powershell PureBasic Python CkPython Ruby SQL Server Swift TCL VB.NET VB6 VBScript Xojo
Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
'Create a Unicode (utf-16) output text file.
Set outFile = fso.CreateTextFile("output.txt", True, True)
' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.Xml")
set xml = CreateObject("Chilkat.Xml")
xml.Tag = "soapenv:Envelope"
success = xml.AddAttribute("xmlns:soapenv","http://schemas.xmlsoap.org/soap/envelope/")
success = xml.AddAttribute("xmlns:ds","http://www.w3.org/2000/09/xmldsig#")
success = xml.AddAttribute("xmlns:sfLR","https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroLR.xsd")
success = xml.AddAttribute("xmlns:sf","https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroInformacion.xsd")
xml.UpdateChildContent "soapenv:Header",""
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sf:Cabecera|sf:ObligadoEmision|sf:NombreRazon","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sf:Cabecera|sf:ObligadoEmision|sf:NIF","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sf:Cabecera|sf:RemisionVoluntaria|sf:FechaFinVeriFactu","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sf:Cabecera|sf:RemisionVoluntaria|sf:Incidencia","S"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sf:Cabecera|sf:RemisionRequerimiento|sf:RefRequerimiento","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:IDVersion","1.0"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:IDFactura|sf:IDEmisorFactura","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:IDFactura|sf:NumSerieFactura","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:IDFactura|sf:FechaExpedicionFactura","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:NombreRazonEmisor","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Subsanacion","S"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:RechazoPrevio","N"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:TipoFactura","F1"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:TipoRectificativa","S"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FacturasRectificadas|sf:IDFacturaRectificada|sf:IDEmisorFactura","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FacturasRectificadas|sf:IDFacturaRectificada|sf:NumSerieFactura","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FacturasRectificadas|sf:IDFacturaRectificada|sf:FechaExpedicionFactura","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FacturasSustituidas|sf:IDFacturasSustituida|sf:IDEmisorFactura","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FacturasSustituidas|sf:IDFacturasSustituida|sf:NumSerieFactura","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FacturasSustituidas|sf:IDFacturasSustituida|sf:FechaExpedicionFactura","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:ImporteRectificacion|sf:BaseRectificada","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:ImporteRectificacion|sf:CuotaRectificada","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:ImporteRectificacion|sf:CuotaRecargoRectificado","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FechaOperacion","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:DescripcionOperacion","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FacturaSimplificadaArt7273","S"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FacturaSinIdentifDestinatarioArt61d","S"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Macrodato","S"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:EmitidaPorTerceroODestinatario","D"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Tercero|sf:NombreRazon","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Tercero|sf:NIF","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Destinatarios|sf:IDDestinatario|sf:NombreRazon","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Destinatarios|sf:IDDestinatario|sf:NIF","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Cupon","S"
xml.UpdateChildContentInt "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Desglose|sf:DetalleDesglose|sf:ClaveRegimen",01
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Desglose|sf:DetalleDesglose|sf:CalificacionOperacion","S1"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Desglose|sf:DetalleDesglose|sf:TipoImpositivo","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Desglose|sf:DetalleDesglose|sf:BaseImponibleOimporteNoSujeto","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Desglose|sf:DetalleDesglose|sf:BaseImponibleACoste","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Desglose|sf:DetalleDesglose|sf:CuotaRepercutida","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Desglose|sf:DetalleDesglose|sf:TipoRecargoEquivalencia","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Desglose|sf:DetalleDesglose|sf:CuotaRecargoEquivalencia","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:CuotaTotal","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:ImporteTotal","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Encadenamiento",""
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:SistemaInformatico|sf:NombreRazon","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:SistemaInformatico|sf:NIF","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:SistemaInformatico|sf:NombreSistemaInformatico","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:SistemaInformatico|sf:IdSistemaInformatico","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:SistemaInformatico|sf:Version","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:SistemaInformatico|sf:NumeroInstalacion","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:SistemaInformatico|sf:TipoUsoPosibleSoloVerifactu","S"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:SistemaInformatico|sf:TipoUsoPosibleMultiOT","S"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:SistemaInformatico|sf:IndicadorMultiplesOT","S"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FechaHoraHusoGenRegistro","dateTime"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:NumRegistroAcuerdoFacturacion","string"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:IdAcuerdoSistemaInformatico","string"
xml.UpdateChildContentInt "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:TipoHuella",01
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Huella","string"
success = xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature",1,"Id","?")
success = xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo",1,"Id","?")
success = xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo|ds:CanonicalizationMethod",1,"Algorithm","?")
success = xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo|ds:SignatureMethod",1,"Algorithm","?")
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo|ds:SignatureMethod|ds:HMACOutputLength","integer"
success = xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo|ds:Reference",1,"Id","?")
success = xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo|ds:Reference",1,"URI","?")
success = xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo|ds:Reference",1,"Type","?")
success = xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo|ds:Reference|ds:Transforms|ds:Transform",1,"Algorithm","?")
success = xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo|ds:Reference|ds:DigestMethod",1,"Algorithm","?")
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo|ds:Reference|ds:DigestValue","BASE64_DATA"
xml.UpdateChildContent "soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignatureValue","..."
success = xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:KeyInfo",1,"Id","?")
success = xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:Object",1,"Id","?")
success = xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:Object",1,"MimeType","?")
success = xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:Object",1,"Encoding","?")
' In a SOAP HTTP request, including the XML declaration (<?xml version="1.0" encoding="UTF-8"?>) in the XML body is generally not required.
xml.EmitXmlDecl = 0
soapRequestBody = xml.GetXml()
endpoint = "xxxxxxxxxx"
soapAction = ""
' For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
contentType = "text/xml"
' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.Http")
set http = CreateObject("Chilkat.Http")
http.ClearHeaders
http.SetRequestHeader "Content-Type",contentType
http.SetRequestHeader "SOAPAction",soapAction
' resp is a Chilkat.HttpResponse
Set resp = http.PostXml(endpoint,soapRequestBody,"utf-8")
If (http.LastMethodSuccess = 0) Then
outFile.WriteLine(http.LastErrorText)
outFile.WriteLine("Failed to send SOAP request.")
WScript.Quit
End If
' Get the XML response body.
' For versions of Chilkat < 10.0.0, use CreateObject("Chilkat_9_5_0.Xml")
set responseXml = CreateObject("Chilkat.Xml")
success = resp.GetBodyXml(responseXml)
statusCode = resp.StatusCode
outFile.WriteLine("response status code: " & statusCode)
' If the status code does not indicate succcess, then show the response XML,
' which probably contains error information.
If (statusCode <> 200) Then
outFile.WriteLine(responseXml.GetXml())
WScript.Quit
End If
outFile.WriteLine(responseXml.GetXml())
' Parse the successful SOAP response XML.
' This is a sample of the response XML, but the namespace prefixes will be different.
' We can parse the result using "*" for the namespace prefixes (see below).
CSV = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:CSV")
NIFPresentador = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:DatosPresentacion|*:NIFPresentador")
TimestampPresentacion = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:DatosPresentacion|*:TimestampPresentacion")
NombreRazon = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:Cabecera|*:ObligadoEmision|*:NombreRazon")
NIF = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:Cabecera|*:ObligadoEmision|*:NIF")
FechaFinVeriFactu = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:Cabecera|*:RemisionVoluntaria|*:FechaFinVeriFactu")
Incidencia = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:Cabecera|*:RemisionVoluntaria|*:Incidencia")
RefRequerimiento = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:Cabecera|*:RemisionRequerimiento|*:RefRequerimiento")
TiempoEsperaEnvio = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:TiempoEsperaEnvio")
EstadoEnvio = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:EstadoEnvio")
IDEmisorFactura = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:RespuestaLinea|*:IDFactura|*:IDEmisorFactura")
NumSerieFactura = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:RespuestaLinea|*:IDFactura|*:NumSerieFactura")
FechaExpedicionFactura = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:RespuestaLinea|*:IDFactura|*:FechaExpedicionFactura")
EstadoRegistro = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:RespuestaLinea|*:EstadoRegistro")
CodigoErrorRegistro = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:RespuestaLinea|*:CodigoErrorRegistro")
DescripcionErrorRegistro = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:RespuestaLinea|*:DescripcionErrorRegistro")
CSVRegistroDuplicado = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:RespuestaLinea|*:CSVRegistroDuplicado")
EstadoRegistroDuplicado = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:RespuestaLinea|*:EstadoRegistroDuplicado")
outFile.Close