Digital signature in XML (NFS-E) files

Dúvidas, dicas e truques de PL/SQL. Aqui também vão assuntos relacionados a pacotes, triggers, funções, Java-Stored Procedures, etc
Post Reply
tora34
Rank: Analista Pleno
Rank: Analista Pleno
Posts: 108
Joined: Wed, 12 Nov 2008 6:01 pm
Location: Campo Mourão PR
Renato Pasquini
Oracle Developer

Good evening gentlemen,
I am having difficulty finding material to aid to develop a routine that will read an XML file (or XmlType variable) and sign all the notes contained in it.
I could not find anything in Oracle's manuals on digital signature in PL / SQL.
Someone already develops some pure PL / SQL routine to perform the digital certificate (installed on the local machine), generate the signature tag from a pre-defined schema and "concatenar" (the thick ) Is this signature on each invoice within an XML file?
tora34
Rank: Analista Pleno
Rank: Analista Pleno
Posts: 108
Joined: Wed, 12 Nov 2008 6:01 pm
Location: Campo Mourão PR
Renato Pasquini
Oracle Developer

Come on, guys, did not you go through something like that?
Trevisolli
Moderador
Moderador
Posts: 2016
Joined: Wed, 12 Jan 2005 3:25 pm
Location: Araraquara - SP
Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Brother,

I worked in a company where we developed NF-E and, all routines were in PL / SQL, however, for the signature, if it does not fail me memory (validation of certificates etc), was done in Java.

Now, to work with digital certificates, Oracle product, take a look at Oracle Wallet: http://docs.oracle.com/cd/B10501_01/net ... owalet.htm
maybe help you.
mauriciormaciel
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 4
Joined: Sun, 17 Feb 2008 8:32 pm
Location: jose bonifacio - SP

Hi, good day!

Have you had any evolution in your problem?

I am having the same difficulty.

Thanks
tora34
Rank: Analista Pleno
Rank: Analista Pleno
Posts: 108
Joined: Wed, 12 Nov 2008 6:01 pm
Location: Campo Mourão PR
Renato Pasquini
Oracle Developer

Good morning,
I developed a Java application to sign the XML files. While the routine, already existing, in PL / SQL only generates XML. The Java application receives the batch XML file containing NFS-E and returns an XML file signed by a digital type A1 certificate.
I am now implementing to transmit through WebService the XML signed in pure PL / SQL.
mauriciormaciel
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 4
Joined: Sun, 17 Feb 2008 8:32 pm
Location: jose bonifacio - SP

Renato:

How did you get the digital signature? Could the routine available?

grateful
Mauricio
victorlazari
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 8
Joined: Thu, 21 Mar 2013 8:28 am

@ TORA34

We are wanting to change here in the company to only use the database in every process.
How did you manage to validate the XML in this case?
Would you like to explain?

Thanks!
tora34
Rank: Analista Pleno
Rank: Analista Pleno
Posts: 108
Joined: Wed, 12 Nov 2008 6:01 pm
Location: Campo Mourão PR
Renato Pasquini
Oracle Developer

Good morning Mauricio,
all right?
As said earlier, the process of signing the XML could not develop in PL / SQL.
I developed a Java application that was performed from the Host 6i command command.
has to identify whether the entire process running on the bank is the best solution, considering that communication with the Web Service (sending files) by PL / SQL is complex, has to take into consideration if the Web Service is protected or not (SSL protocol) if yes, you will have to have Oracle Wallet installed and import all type A1 certificates.

At the time, I also tried to create the Native Java signature routine of PL / SQL, but without success, the bank's Java version is not the most current and has several restrictions.

I believe the best scenario and use another technology to make the processes (signature and sending to the Web Service), another item is that if you decide to send the files from a PL / SQL maintained inside the SGDB, you will have to open doors to perform this communication, and this can be considered in some companies a security failure.
fceron
Rank: Estagiário Júnior
Rank: Estagiário Júnior
Posts: 1
Joined: Tue, 18 Jul 2017 2:36 pm

Gentlemen,

Sorry to resuscitate this topic after so much time, but now with the arrival of the sped-reinf, I still have some doubts about PL / SQL and authentication with webservices. Has anyone managed to use Oracle Wallet to connect with Sefaz's webservices (NFE)? In addition to the digital certificate of the taxpayer, is it necessary to have any more certificate, even if it is the Public Certificate of Sefaz? How was the Wallet configuration and code in PLSQL?

From now on, thank you for your attention.
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 14 guests