Bienvenido a Facturas y Respuestas.

Esperamos que encuentre la respuesta a su pregunta. Y si no, puede formularla para que los expertos de la comunidad la respondan.

Preguntar

Este blog es creado y administrado por:

Copyright - 2020

0 votos
por en Nòmina Electrònica

Buenos días, estoy intentando enviar una nomina electrónica por el servicio SendTestSetAsync de la DIAN, el cual me responde, estaré muy agradecido si me pueden ayudar:

Regla: ZE02, Rechazo: Valor de la firma inválido

<b:DianResponse> <b:ErrorMessage xmlns:c="http://schemas.microsoft.com/2003/10/Serialization/Arrays">                  <c:string>Regla: ZE02, Rechazo: Valor de la firma inválido.</c:string>

               </b:ErrorMessage><b:IsValid>false</b:IsValid>

La firma es:

<ext:ExtensionContent><ds:Signature Id="xmldsig-04c0eda6-0a9b-4f69-abe9-359c0b4c988f">

<ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>

<ds:Reference Id="xmldsig-04c0eda6-0a9b-4f69-abe9-359c0b4c988f-ref0" URI="">

<ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>

</ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>

<ds:DigestValue>NWU...</ds:DigestValue></ds:Reference><ds:Reference URI="#xmldsig-04c0eda6-0a9b-4f69-abe9-359c0b4c988f-keyinfo">

<ds:Transforms><ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>

</ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>

<ds:DigestValue>C2L...</ds:DigestValue></ds:Reference><ds:Reference Type="http://uri.etsi.org/01903#SignedProperties" URI="#xmldsig-04c0eda6-0a9b-4f69-abe9-359c0b4c988f-signedprops">

<ds:Transforms><ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>

</ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><ds:DigestValue>Zt8...</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue Id="xmldsig-04c0eda6-0a9b-4f69-abe9-359c0b4c988f-sigvalue">

EP+...</ds:SignatureValue><ds:KeyInfo Id="xmldsig-04c0eda6-0a9b-4f69-abe9-359c0b4c988f-keyinfo"><ds:X509Data><ds:X509Certificate>MII...</ds:X509Certificate><ds:X509IssuerSerial><ds:X509IssuerName>c=CO,l=Bogota D.C.,o=GSE,ou=PKI,cn=Autoridad Subordinada 01 GSE,1.2.840.113549.1.9.1=info@gse.com.co</ds:X509IssuerName><ds:X509SerialNumber>217...</ds:X509SerialNumber></ds:X509IssuerSerial><ds:X509SubjectName>name=C.C,1.3.6.1.4.1.4710.1.3.2=1090xxx,c=CO,1.2.840.113549.1.9.1=xxx@hotmail.com,l=CUCUTA,st=NORTE DE SANTANDER,serialNumber=109xxx,cn=xxx,description=Facturador Electronico P.N por GSE xxx,street=xxx</ds:X509SubjectName></ds:X509Data><ds:KeyValue><ds:RSAKeyValue><ds:Modulus>qkx...</ds:Modulus><ds:Exponent>AQAB</ds:Exponent></ds:RSAKeyValue></ds:KeyValue></ds:KeyInfo><ds:Object><xades:QualifyingProperties Target="#xmldsig-04c0eda6-0a9b-4f69-abe9-359c0b4c988f">

<xades:SignedProperties Id="xmldsig-04c0eda6-0a9b-4f69-abe9-359c0b4c988f-signedprops"><xades:SignedSignatureProperties><xades:SigningTime>2021-12-01T16:23:00Z</xades:SigningTime>

<xades:SigningCertificate><xades:Cert><xades:CertDigest><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>

<ds:DigestValue>hXU...</ds:DigestValue></xades:CertDigest>

<xades:IssuerSerial><ds:X509IssuerName>c=CO,l=Bogota D.C.,o=GSE,ou=PKI,cn=Autoridad Subordinada 01 GSE,1.2.840.113549.1.9.1=info@gse.com.co</ds:X509IssuerName>ds:X509SerialNumber>217...</ds:X509SerialNumber></xades:IssuerSerial></xades:Cert><xades:Cert>

<xades:CertDigest><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><ds:DigestValue>cJk...</ds:DigestValue></xades:CertDigest><xades:IssuerSerial><ds:X509IssuerName>c=CO,o=GSE,ou=PKI,cn=Autoridad Raiz GSE,1.2.840.113549.1.9.1=info@gse.com.co</ds:X509IssuerName><ds:X509SerialNumber>287...</ds:X509SerialNumber></xades:IssuerSerial></xades:Cert><xades:Cert><xades:CertDigest><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><ds:DigestValue>fBy...</ds:DigestValue></xades:CertDigest><xades:IssuerSerial><ds:X509IssuerName>c=CO,o=GSE,ou=PKI,cn=Autoridad Raiz GSE,1.2.840.113549.1.9.1=info@gse.com.co</ds:X509IssuerName><ds:X509SerialNumber>106...</ds:X509SerialNumber></xades:IssuerSerial></xades:Cert></xades:SigningCertificate>

<xades:SignaturePolicyIdentifier><xades:SignaturePolicyId><xades:SigPolicyId><xades:Identifier>https:/facturaelectronica.dian.gov.co/politicadefirma/v2/politicadefirmav2.pdf</xades:Identifier><xades:Description>Política de firma para nóminas electrónicas de la República de Colombia</xades:Description>

</xades:SigPolicyId><xades:SigPolicyHash><ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/><ds:DigestValue>dMoMvtcG5aIzgYo0tIsSQeVJBDnUnfSOfBpxXrmor0Y=</ds:DigestValue></xades:SigPolicyHash>

</xades:SignaturePolicyId></xades:SignaturePolicyIdentifier>

<xades:SignerRole><xades:ClaimedRoles><xades:ClaimedRole>supplier</xades:ClaimedRole></xades:ClaimedRoles></xades:SignerRole>

</xades:SignedSignatureProperties><xades:SignedDataObjectProperties>

<xades:DataObjectFormat ObjectReference="#xmldsig-04c0eda6-0a9b-4f69-abe9-359c0b4c988f-ref0"><xades:MimeType>text/xml</xades:MimeType><xades:Encoding>UTF-8</xades:Encoding></xades:DataObjectFormat>

</xades:SignedDataObjectProperties></xades:SignedProperties></xades:QualifyingProperties></ds:Object></ds:Signature></ext:ExtensionContent>

formatear xml en: https://codebeautify.org/xmlviewer 

por
estas firmando mal el XML... nosotros no tenemos problemas con nomina ni factura, asi que por algun lado tienes ese detalle en tu firmado.
por
Hola amigo
La misma estructura de la Firma para Factura y para nómina ¿Es la misma? O varia la una de la otra.
Muchas Gracias!
por
En la parte de la firma <Signature> es exactamente igual que como firmas las Facturas...

1 Respuesta

0 votos
por

Ahora me responde: Batch en proceso de validación

Alguno sabe a que se refiere?

<b:DianResponse>

               <b:ErrorMessage i:nil="true" xmlns:c="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>

               <b:IsValid>false</b:IsValid>

               <b:StatusCode/>

               <b:StatusDescription>Batch en proceso de validación.</b:StatusDescription>

               <b:StatusMessage i:nil="true"/>

               <b:XmlBase64Bytes i:nil="true"/>

               <b:XmlBytes i:nil="true"/>

               <b:XmlDocumentKey i:nil="true"/>

               <b:XmlFileName i:nil="true"/>

            </b:DianResponse>

por
Buenas tardes
Se pudo solucionar?
por
Hola, aúno, sigue respondiendo: Regla: ZE02, Rechazo: Valor de la firma inválido
por
Han probado con otro certificado?
por
Hola, Ya me habilitaron en la DIAN, me faltaba instalar el certificado en Windows ya que sacaba algo un error al validar la confidencialidad del certificado (la validación de la firma la hice con la herramienta Xolido sign)
...