LibreDteDotNet.SoapRequest 1.2.0

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package LibreDteDotNet.SoapRequest --version 1.2.0                
NuGet\Install-Package LibreDteDotNet.SoapRequest -Version 1.2.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LibreDteDotNet.SoapRequest" Version="1.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LibreDteDotNet.SoapRequest --version 1.2.0                
#r "nuget: LibreDteDotNet.SoapRequest, 1.2.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install LibreDteDotNet.SoapRequest as a Cake Addin
#addin nuget:?package=LibreDteDotNet.SoapRequest&version=1.2.0

// Install LibreDteDotNet.SoapRequest as a Cake Tool
#tool nuget:?package=LibreDteDotNet.SoapRequest&version=1.2.0                

alternate text is missing from this package README image

alternate text is missing from this package README image GitHub commit activity GitHub contributors

Nuget Nuget GitHub code size in bytes Lines of code

LibreDteDotNet.SoapRequest

This solution tries to show how to access the information published by the Servicio de Impuestos Internos through SOAP (WCF) services. The services are packaged in "Library Class" and can be accessed through Dependency Injection.

This repository has no relationship with the government entity SII, only for educational purposes.

📦 Details

Reference version
.Net Core 6.0
Autofac 7.0.0
Autofac.Extensions.DependencyInjection 8.0.0
Microsoft.Extensions.Hosting.Abstractions 7.0.0
Security.Cryptography.Xml 7.0.1
System.ServiceModel.Duplex 4.10.*
System.ServiceModel.Http 4.10.*
System.ServiceModel.NetTcp 4.10.*

🚩 RoadMap

🚀 Usage

This class is accessed via dependency injection:

IHost host = Host.CreateDefaultBuilder()
  .SoapRequestBuild() // This is important!
  .ConfigureServices(
    (c, s) => {
      // your config
    }
  )
  .Build();
📖 TokenSeed.GetToken()

For calling you needs implements Json Options pattern in your project. The -digital certificate- must be installed in your system, this project does not need to know the password.

var tkn = await soapRequest.TokenSeed.GetToken("16000555-2");
📖 EstadoDte.GetEstado()
Retorna el estado de la aceptación de un DTE enviado al SII.
var estado = await soapRequest.EstadoDte
  .GetEstado(
    "77522000",   // rut emisor
    "0",
    "76532555",   // rut receptor
    "4",
    TipoDoc.FacturaExentaElectronica,
    "6",         // folio
    "27032023",  // fecha
    "782762",    // monto
    tkn           // token
  )
  .AsObject();          // Important!  (resultado como clase) or
  // AsXDocument();     // Important   (resultado como XML)
📖 EstadoDteAv.GetEstado()
Retorna el estado de la aceptación mediante la entrega del Tag DTE/Signature/SignatureValue desde un DTE ya enviado al SII.
var estadoAv = await soapRequest.EstadoDteAv.GetEstado(
  "77522000",  // rut emisor
  "0",
  "76888555",  // rut receptor
  "4",
  TipoDoc.FacturaExentaElectronica,   //  33 - 34 - 61
  "402268",    // folio
  "15032023",  // fecha
  "1407781",   // monto
  "VLVLlBYc3eQ2NtkRxdANRYBQKW9pbG7Y1feuDG/1WZlpAyB43gTIxMYvs9yIrwCy5Z5piK51IF6u
  nyugfFghOs+97yfjd+pNGzxKG6wpstz2YGAoz+nO4npymFwRT0jueYHWMivHtcQjF+ZddWsGNU6v8
  nb0AvZPvFqhsAzGRxOfwV3YrmPrqYOBvTvzGWAr+AyB1jYXcSzN/sx31qp3riUbx2KjdE8UeZ2r5Z
  nuP0BYMEXUt+Eh40ftm95nLPjQppM626xWPdH9FPr6WBBgTCup/HGlefDsxPeZJA2HPeRwuKn78WH
  niu/Arvf27OQH5MuFWX1ns1fOLHSt6nIhoNIbhQ==",
  tkn                 // token
)
  .AsObject();          // Important!  (resultado como clase) or
  // AsXDocument();     // Important   (resultado como XML)
📖 EstadoDteUp.GetEstado()
Retorna el estado del upload de un DTE enviado al SII, se debe contar con el Track ID del envío.
var estadoUp = await soapRequest.EstadoDteUp.GetEstado(
    "77522000",       // rut emisor
    "1",
    "WY3HJ2ZRSOMJO",  // ID Track
    tkn               // token
);
  .AsObject();          // Important!  (resultado como clase) or
  // AsXDocument();     // Important   (resultado como XML)
📖 RegistroDte.IngresarAccion()
Ingresa un resgistro de Aceptación y/o Reclamo de un DTE recibido.
var registro = await soapRequest.RegistroDte.IngresarAccion(
  "77522012",
  "0",
  TipoDoc.FacturaAfectaElectronica,    // 33 - 34 - 61
  "6",
  tkn,                  // token
  Accion.RFP          // ACD - RCD - ERM - RFP - RFT
);
📖 RegistroDte.IngresarAccion()
Retorna lista de eventos relacionados con un DTE.
var eventos = await soapRequest.RegistroDte.ListarEventos(
  "76055368",                       // rut emisor
  "9",
  TipoDoc.FacturaAfectaElectronica, // tipo
  "5791",                           // folio
  tkn                 // token
);

📫 Have a question? Found a Bug?

Feel free to file a new issue with a respective title and description on the LibreDteDotNet.SoapRequest/issues repository.

❤️ Community and Contributions

I think that Knowledge Doesn’t Belong to Just Any One Person, and I always intend to share my knowledge with other developers, a voluntary monetary contribution or contribute ideas and/or comments to improve these tools would be appreciated.

PayPal

📘 License

All my repository content is released under the terms of the MIT License.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated