Hola Elias, Ahora mismo acabo de probar el ejemplo de nuestra web y me funciona sin problemas (ACCV + Ubuntu + Firefox 3.6 + JDK 1.6.0_18).
Te adjunto la factura firmada que acabo de generar para que intentes validarla tú mismo o ver qué diferencia puede haber en este caso. De cualquier forma, la única razón que hemos visto para que no funcione la validación es la incorrecta codificación de los datos del XML. Si en el XML declaras que los datos están en UTF-8, estos deben estar codificados en este encoding o tendrás problemas ... Si se te ocurre alguna prueba más, coméntamelo. --- Salut, ==================================== Ricardo Borillo Domenech http://xml-utils.com / http://twitter.com/borillo 2010/4/26 Elías Breijo <[email protected]>: > Ahora ya ni siquiera me validan las facturas firmadas con el ejemplo > (http://www.projectestic.uji.es/pr/cryptoapplet/samples/v2.1.0/test.html). > ¿Creeis que puede tratarse de un problema del servicio de validación del > ministerio? > > El 25 de marzo de 2010 16:46, Elías Breijo <[email protected]> > escribió: >> >> Hola a todos. >> >> Mi problema consiste en que aparentemente soy capaz de firmar facturas con >> el CryptoApplet, pero peta la validación de la firma de la factura en la web >> del ministerio. >> >> Adjunto una factura generada con la aplicación que estoy desarrollando. >> Aparentemente lo único que no me encaja es que la referencia al pdf de la >> política de firma apunta a la política de firma de la versión 3.1 de >> faturae, mientras que la versión de la factura firmada es la 3.0 (por decir >> algo). ¿Es necesario ncluir en la configuración del cryptoapplet la versión >> de facturae con la que se está trabajando? >> >> Gracias por adelantado. >> >> > > > _______________________________________________ > CryptoApplet mailing list > [email protected] > http://llistes.uji.es/mailman/listinfo/cryptoapplet > >
<?xml version="1.0" encoding="UTF-8"?> <namespace:Facturae xmlns:namespace="http://www.facturae.es/Facturae/2007/v3.0/Facturae" xmlns:namespace2="http://uri.etsi.org/01903/v1.2.2#" xmlns:namespace3="http://www.w3.org/2000/09/xmldsig#"> <FileHeader> <SchemaVersion>3.0</SchemaVersion> <Modality>I</Modality> <InvoiceIssuerType>EM</InvoiceIssuerType> <Batch> <BatchIdentifier>A0952171710</BatchIdentifier> <InvoicesCount>1</InvoicesCount> <TotalInvoicesAmount> <TotalAmount>266.80</TotalAmount> </TotalInvoicesAmount> <TotalOutstandingAmount> <TotalAmount>266.80</TotalAmount> </TotalOutstandingAmount> <TotalExecutableAmount> <TotalAmount>266.80</TotalAmount> </TotalExecutableAmount> <InvoiceCurrencyCode>EUR</InvoiceCurrencyCode> </Batch> </FileHeader> <Parties> <SellerParty> <TaxIdentification> <PersonTypeCode>F</PersonTypeCode> <ResidenceTypeCode>R</ResidenceTypeCode> <TaxIdentificationNumber>A09521717</TaxIdentificationNumber> </TaxIdentification> <Individual> <Name>DORADO</Name> <FirstSurname/> <SecondSurname/> <AddressInSpain> <Address>Calle Atocha 22</Address> <PostCode>12345</PostCode> <Town>Madrid</Town> <Province>12</Province> <CountryCode>ESP</CountryCode> </AddressInSpain> </Individual> </SellerParty> <BuyerParty> <TaxIdentification> <PersonTypeCode>J</PersonTypeCode> <ResidenceTypeCode>R</ResidenceTypeCode> <TaxIdentificationNumber>Q2826000H</TaxIdentificationNumber> </TaxIdentification> <LegalEntity> <CorporateName>19054</CorporateName> <AddressInSpain> <Address>Calle Sta Maria Magdalena</Address> <PostCode>28016</PostCode> <Town>Madrid</Town> <Province>Madrid</Province> <CountryCode>ESP</CountryCode> </AddressInSpain> </LegalEntity> </BuyerParty> </Parties> <Invoices> <Invoice> <InvoiceHeader> <InvoiceNumber>10</InvoiceNumber> <InvoiceSeriesCode/> <InvoiceDocumentType>FC</InvoiceDocumentType> <InvoiceClass>OO</InvoiceClass> </InvoiceHeader> <InvoiceIssueData> <IssueDate>2007-12-11</IssueDate> <InvoicingPeriod> <StartDate>2007-12-11</StartDate> <EndDate>2007-12-11</EndDate> </InvoicingPeriod> <InvoiceCurrencyCode>EUR</InvoiceCurrencyCode> <TaxCurrencyCode>EUR</TaxCurrencyCode> </InvoiceIssueData> <TaxesOutputs> <Tax> <TaxTypeCode>01</TaxTypeCode> <TaxRate>16.00</TaxRate> <TaxableBase> <TotalAmount>230.00</TotalAmount> </TaxableBase> <TaxAmount> <TotalAmount>36.80</TotalAmount> </TaxAmount> </Tax> </TaxesOutputs> <InvoiceTotals> <TotalGrossAmount>230.00</TotalGrossAmount> <TotalGrossAmountBeforeTaxes>230.00</TotalGrossAmountBeforeTaxes> <TotalTaxOutputs>36.80</TotalTaxOutputs> <TotalTaxesWithheld>0.00</TotalTaxesWithheld> <InvoiceTotal>266.80</InvoiceTotal> <TotalOutstandingAmount>266.80</TotalOutstandingAmount> <TotalExecutableAmount>266.80</TotalExecutableAmount> </InvoiceTotals> <Items> <InvoiceLine> <IssuerContractReference/> <PurchaseOrderReference>2.28093564E8</PurchaseOrderReference> <DeliveryNotesReferences> <DeliveryNote> <DeliveryNoteNumber/> </DeliveryNote> </DeliveryNotesReferences> <ItemDescription>Analista</ItemDescription> <Quantity>1.0</Quantity> <UnitOfMeasure>01</UnitOfMeasure> <UnitPriceWithoutTax>70.000000</UnitPriceWithoutTax> <TotalCost>70.00</TotalCost> <DiscountsAndRebates> <Discount> <DiscountReason>Descuento al cliente</DiscountReason> <DiscountRate>0.0000</DiscountRate> <DiscountAmount>0.00</DiscountAmount> </Discount> </DiscountsAndRebates> <GrossAmount>70.00</GrossAmount> <TaxesOutputs> <Tax> <TaxTypeCode>01</TaxTypeCode> <TaxRate>16.00</TaxRate> <TaxableBase> <TotalAmount>70.00</TotalAmount> </TaxableBase> <TaxAmount> <TotalAmount>11.20</TotalAmount> </TaxAmount> </Tax> </TaxesOutputs> <TransactionDate>2007-12-11</TransactionDate> </InvoiceLine> <InvoiceLine> <IssuerContractReference/> <PurchaseOrderReference>2.28093564E8</PurchaseOrderReference> <DeliveryNotesReferences> <DeliveryNote> <DeliveryNoteNumber/> </DeliveryNote> </DeliveryNotesReferences> <ItemDescription>Programadores</ItemDescription> <Quantity>2.0</Quantity> <UnitOfMeasure>01</UnitOfMeasure> <UnitPriceWithoutTax>80.000000</UnitPriceWithoutTax> <TotalCost>160.00</TotalCost> <DiscountsAndRebates> <Discount> <DiscountReason>Descuento al cliente</DiscountReason> <DiscountRate>0.0000</DiscountRate> <DiscountAmount>0.00</DiscountAmount> </Discount> </DiscountsAndRebates> <GrossAmount>160.00</GrossAmount> <TaxesOutputs> <Tax> <TaxTypeCode>01</TaxTypeCode> <TaxRate>16.00</TaxRate> <TaxableBase> <TotalAmount>160.00</TotalAmount> </TaxableBase> <TaxAmount> <TotalAmount>25.60</TotalAmount> </TaxAmount> </Tax> </TaxesOutputs> <TransactionDate>2007-12-11</TransactionDate> </InvoiceLine> </Items> <PaymentDetails> <Installment> <InstallmentDueDate>2007-12-11</InstallmentDueDate> <InstallmentAmount>266.80</InstallmentAmount> <PaymentMeans>04</PaymentMeans> <AccountToBeCredited> <IBAN>000000150078</IBAN> <BankCode>8854</BankCode> <BranchCode>0000</BranchCode> </AccountToBeCredited> </Installment> </PaymentDetails> </Invoice> </Invoices> <dsign:Signature Id="S0-Signature" xmlns:dsign="http://www.w3.org/2000/09/xmldsig#"><dsign:SignedInfo><dsign:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/><dsign:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><dsign:Reference URI=""><dsign:Transforms><dsign:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/></dsign:Transforms><dsign:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsign:DigestValue>U1o/aYTP5wh8reb1ucQIfFOzyh4=</dsign:DigestValue></dsign:Reference><dsign:Reference Type="http://uri.etsi.org/01903#SignedProperties" URI="#S0-SignedProperties"><dsign:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsign:DigestValue>59VcrrAVHELyuelXPc14WzVWDqo=</dsign:DigestValue></dsign:Reference><dsign:Reference URI="#S0-KeyInfo"><dsign:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsign:DigestValue>Yxr/3JW+b9yKHIsakXo98syMSZ4=</dsign:DigestValue></dsign:Reference></dsign:SignedInfo><dsign:SignatureValue Id="S0-SignatureValue">GogznYQjMItrUzM9fRjYDGZX7kjCtTG+OOT8v6rmMcfRli5C08F9WkSWWPCutd4XTnLKw1dGoEE6 FNiypzfuW+/Uuu9gLftfOkr1FkvsFe4S/Go3LBbJcSCy3UyefqXo/PwVXvupW12aq34R4pPscDn3 RMGCmE3IFyX4RvZ1SRw=</dsign:SignatureValue><dsign:KeyInfo Id="S0-KeyInfo"><dsign:X509Data><dsign:X509SubjectName>C=ES,O=Generalitat Valenciana,OU=Ciudadanos,2.5.4.4=#1310424f52494c4c4f20444f4d454e454348,2.5.4.42=#13075249434152444f,2.5.4.5=#1309353239343538313343,CN=RICARDO BORILLO DOMENECH - NIF:52945813C</dsign:X509SubjectName><dsign:X509Certificate>MIIGJTCCBQ2gAwIBAgIINGpLhs2UWw4wDQYJKoZIhvcNAQEFBQAwUjERMA8GA1UEAxMIQUNDVi1D QTIxDzANBgNVBAsTBlBLSUdWQTEfMB0GA1UEChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTELMAkG A1UEBhMCRVMwHhcNMDgwNDA4MDkzODUyWhcNMTEwNDA4MDk0ODUyWjCBtzExMC8GA1UEAxMoUklD QVJETyBCT1JJTExPIERPTUVORUNIIC0gTklGOjUyOTQ1ODEzQzESMBAGA1UEBRMJNTI5NDU4MTND MRAwDgYDVQQqEwdSSUNBUkRPMRkwFwYDVQQEExBCT1JJTExPIERPTUVORUNIMRMwEQYDVQQLEwpD aXVkYWRhbm9zMR8wHQYDVQQKExZHZW5lcmFsaXRhdCBWYWxlbmNpYW5hMQswCQYDVQQGEwJFUzCB nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAqUcUC/+x9H1X6tKhEeiC8351ltzl3w+I0uBM90HT ci5NACjGkR2hLYyt+uqo8xlMIJLaRmk/Grq3boW0o5Bgxfliq+537wZhTEfFOfGqbeh2sdTNNOVz fW1S+nb06pBnzsdzo0j83v2gfp+RDpvTCdfYdseojMlSutR31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5ndmEuZXMwDQYJKoZIhvcN AQEFBQADggEBACQ3z614j/RXliIZAas63pwDn2SWDTOAHvQYCMnYAUjqTqOujHPLQXAiQMwhajur LkN474FcLkb2A3GmxQF8MaDnl6JU7LZQiyocZZNACc1LuqqOTXG/xmx7bJ6/1tHmmd9Pgs99jIZQ 5wd6EMEkVM3EUXLKO6kIXFv4Zl1bo+ccKTlrBKvnThNbYCF7Cgh8oB1N7iSOpgkUj4Dt7hHamhWl 8voGX/n9ZTNrtC5kG45QVgKD5m1eaUSuR0y2d33op4Jvsh2Kdp135ViQUUELwBCHbddIm5oomvgx cLY6/0i1kxuxu4jtsrrpzaWUoTgFpYRgoy7/Awu7lPxNxZ897cQ=</dsign:X509Certificate></dsign:X509Data></dsign:KeyInfo><dsign:Object><xades:QualifyingProperties Id="S0-QualifyingProperties" Target="#S0-Signature" xmlns:dsign="http://www.w3.org/2000/09/xmldsig#" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#"><xades:SignedProperties Id="S0-SignedProperties"><xades:SignedSignatureProperties><xades:SigningTime>2010-04-28T09:23:14+02:00</xades:SigningTime><xades:SigningCertificate><xades:Cert><xades:CertDigest><dsign:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsign:DigestValue>lRDWkx0DfmfPkjn3fK3Sk5lM3H4=</dsign:DigestValue></xades:CertDigest><xades:IssuerSerial><dsign:X509IssuerName>C=ES, O=Generalitat Valenciana, OU=PKIGVA, CN=ACCV-CA2</dsign:X509IssuerName><dsign:X509SerialNumber>3776914279850334990</dsign:X509SerialNumber></xades:IssuerSerial></xades:Cert></xades:SigningCertificate><xades:SignaturePolicyIdentifier><xades:SignaturePolicyId><xades:SigPolicyId><xades:Identifier>http://www.facturae.es/politica_de_firma_formato_facturae/politica_de_firma_formato_facturae_v3_1.pdf</xades:Identifier><xades:Description>Política de firma electrónica para facturación electrónica con formato Facturae</xades:Description></xades:SigPolicyId><xades:SigPolicyHash><dsign:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsign:DigestValue>Ohixl6upD6av8N7pEvDABhEL6hM=</dsign:DigestValue></xades:SigPolicyHash></xades:SignaturePolicyId></xades:SignaturePolicyIdentifier></xades:SignedSignatureProperties></xades:SignedProperties></xades:QualifyingProperties></dsign:Object></dsign:Signature></namespace:Facturae>
_______________________________________________ CryptoApplet mailing list [email protected] http://llistes.uji.es/mailman/listinfo/cryptoapplet
