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
func chilkatTest() {
let xml = CkoXml()
xml.Tag = "soapenv:Envelope"
xml.AddAttribute("xmlns:soapenv", value: "http://schemas.xmlsoap.org/soap/envelope/")
xml.AddAttribute("xmlns:ds", value: "http://www.w3.org/2000/09/xmldsig#")
xml.AddAttribute("xmlns:sfLR", value: "https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroLR.xsd")
xml.AddAttribute("xmlns:sf", value: "https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroInformacion.xsd")
xml.UpdateChildContent("soapenv:Header", value: "")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sf:Cabecera|sf:ObligadoEmision|sf:NombreRazon", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sf:Cabecera|sf:ObligadoEmision|sf:NIF", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sf:Cabecera|sf:RemisionVoluntaria|sf:FechaFinVeriFactu", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sf:Cabecera|sf:RemisionVoluntaria|sf:Incidencia", value: "S")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sf:Cabecera|sf:RemisionRequerimiento|sf:RefRequerimiento", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:IDVersion", value: "1.0")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:IDFactura|sf:IDEmisorFactura", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:IDFactura|sf:NumSerieFactura", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:IDFactura|sf:FechaExpedicionFactura", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:NombreRazonEmisor", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Subsanacion", value: "S")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:RechazoPrevio", value: "N")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:TipoFactura", value: "F1")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:TipoRectificativa", value: "S")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FacturasRectificadas|sf:IDFacturaRectificada|sf:IDEmisorFactura", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FacturasRectificadas|sf:IDFacturaRectificada|sf:NumSerieFactura", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FacturasRectificadas|sf:IDFacturaRectificada|sf:FechaExpedicionFactura", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FacturasSustituidas|sf:IDFacturasSustituida|sf:IDEmisorFactura", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FacturasSustituidas|sf:IDFacturasSustituida|sf:NumSerieFactura", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FacturasSustituidas|sf:IDFacturasSustituida|sf:FechaExpedicionFactura", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:ImporteRectificacion|sf:BaseRectificada", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:ImporteRectificacion|sf:CuotaRectificada", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:ImporteRectificacion|sf:CuotaRecargoRectificado", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FechaOperacion", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:DescripcionOperacion", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FacturaSimplificadaArt7273", value: "S")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FacturaSinIdentifDestinatarioArt61d", value: "S")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Macrodato", value: "S")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:EmitidaPorTerceroODestinatario", value: "D")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Tercero|sf:NombreRazon", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Tercero|sf:NIF", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Destinatarios|sf:IDDestinatario|sf:NombreRazon", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Destinatarios|sf:IDDestinatario|sf:NIF", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Cupon", value: "S")
xml.UpdateChildContentInt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Desglose|sf:DetalleDesglose|sf:ClaveRegimen", value: 01)
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Desglose|sf:DetalleDesglose|sf:CalificacionOperacion", value: "S1")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Desglose|sf:DetalleDesglose|sf:TipoImpositivo", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Desglose|sf:DetalleDesglose|sf:BaseImponibleOimporteNoSujeto", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Desglose|sf:DetalleDesglose|sf:BaseImponibleACoste", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Desglose|sf:DetalleDesglose|sf:CuotaRepercutida", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Desglose|sf:DetalleDesglose|sf:TipoRecargoEquivalencia", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Desglose|sf:DetalleDesglose|sf:CuotaRecargoEquivalencia", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:CuotaTotal", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:ImporteTotal", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Encadenamiento", value: "")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:SistemaInformatico|sf:NombreRazon", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:SistemaInformatico|sf:NIF", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:SistemaInformatico|sf:NombreSistemaInformatico", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:SistemaInformatico|sf:IdSistemaInformatico", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:SistemaInformatico|sf:Version", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:SistemaInformatico|sf:NumeroInstalacion", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:SistemaInformatico|sf:TipoUsoPosibleSoloVerifactu", value: "S")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:SistemaInformatico|sf:TipoUsoPosibleMultiOT", value: "S")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:SistemaInformatico|sf:IndicadorMultiplesOT", value: "S")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:FechaHoraHusoGenRegistro", value: "dateTime")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:NumRegistroAcuerdoFacturacion", value: "string")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:IdAcuerdoSistemaInformatico", value: "string")
xml.UpdateChildContentInt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:TipoHuella", value: 01)
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|sf:Huella", value: "string")
xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature", autoCreate: true, attrName: "Id", attrValue: "?")
xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo", autoCreate: true, attrName: "Id", attrValue: "?")
xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo|ds:CanonicalizationMethod", autoCreate: true, attrName: "Algorithm", attrValue: "?")
xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo|ds:SignatureMethod", autoCreate: true, attrName: "Algorithm", attrValue: "?")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo|ds:SignatureMethod|ds:HMACOutputLength", value: "integer")
xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo|ds:Reference", autoCreate: true, attrName: "Id", attrValue: "?")
xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo|ds:Reference", autoCreate: true, attrName: "URI", attrValue: "?")
xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo|ds:Reference", autoCreate: true, attrName: "Type", attrValue: "?")
xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo|ds:Reference|ds:Transforms|ds:Transform", autoCreate: true, attrName: "Algorithm", attrValue: "?")
xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo|ds:Reference|ds:DigestMethod", autoCreate: true, attrName: "Algorithm", attrValue: "?")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignedInfo|ds:Reference|ds:DigestValue", value: "BASE64_DATA")
xml.UpdateChildContent("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:SignatureValue", value: "...")
xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:KeyInfo", autoCreate: true, attrName: "Id", attrValue: "?")
xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:Object", autoCreate: true, attrName: "Id", attrValue: "?")
xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:Object", autoCreate: true, attrName: "MimeType", attrValue: "?")
xml.UpdateAttrAt("soapenv:Body|sfLR:RegFactuSistemaFacturacion|sfLR:RegistroFactura|sfLR:RegistroAlta|ds:Signature|ds:Object", autoCreate: true, attrName: "Encoding", attrValue: "?")
// 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 = false
var soapRequestBody: String? = xml.GetXml()
var endpoint: String? = "xxxxxxxxxx"
var soapAction: String? = ""
// For SOAP requests, the standard Content-Type is usually set to "text/xml" or "application/soap+xml"
var contentType: String? = "text/xml"
let http = CkoHttp()
http.ClearHeaders()
http.SetRequestHeader("Content-Type", value: contentType)
http.SetRequestHeader("SOAPAction", value: soapAction)
var resp: CkoHttpResponse? = http.PostXml(endpoint, xmlDoc: soapRequestBody, charset: "utf-8")
if http.LastMethodSuccess == false {
print("\(http.LastErrorText)")
print("Failed to send SOAP request.")
return
}
// Get the XML response body.
let responseXml = CkoXml()
resp!.GetBodyXml(responseXml)
var statusCode: Int = resp!.StatusCode.intValue
print("response status code: \(statusCode)")
resp = nil
// If the status code does not indicate succcess, then show the response XML,
// which probably contains error information.
if statusCode != 200 {
print("\(responseXml.GetXml())")
return
}
print("\(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).
var CSV: String? = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:CSV")
var NIFPresentador: String? = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:DatosPresentacion|*:NIFPresentador")
var TimestampPresentacion: String? = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:DatosPresentacion|*:TimestampPresentacion")
var NombreRazon: String? = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:Cabecera|*:ObligadoEmision|*:NombreRazon")
var NIF: String? = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:Cabecera|*:ObligadoEmision|*:NIF")
var FechaFinVeriFactu: String? = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:Cabecera|*:RemisionVoluntaria|*:FechaFinVeriFactu")
var Incidencia: String? = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:Cabecera|*:RemisionVoluntaria|*:Incidencia")
var RefRequerimiento: String? = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:Cabecera|*:RemisionRequerimiento|*:RefRequerimiento")
var TiempoEsperaEnvio: String? = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:TiempoEsperaEnvio")
var EstadoEnvio: String? = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:EstadoEnvio")
var IDEmisorFactura: String? = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:RespuestaLinea|*:IDFactura|*:IDEmisorFactura")
var NumSerieFactura: String? = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:RespuestaLinea|*:IDFactura|*:NumSerieFactura")
var FechaExpedicionFactura: String? = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:RespuestaLinea|*:IDFactura|*:FechaExpedicionFactura")
var EstadoRegistro: String? = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:RespuestaLinea|*:EstadoRegistro")
var CodigoErrorRegistro: String? = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:RespuestaLinea|*:CodigoErrorRegistro")
var DescripcionErrorRegistro: String? = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:RespuestaLinea|*:DescripcionErrorRegistro")
var CSVRegistroDuplicado: String? = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:RespuestaLinea|*:CSVRegistroDuplicado")
var EstadoRegistroDuplicado: String? = responseXml.GetChildContent("*:Body|*:RespuestaRegFactuSistemaFacturacion|*:RespuestaLinea|*:EstadoRegistroDuplicado")
}