Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DBMS_UTILITY.canonicalize problem

937391May 18 2012 — edited May 18 2012
Hello!

I'm writing a function which creates a digital signature of an xml file, using dbms_crypto library. First step to take in this process is to canonicalize the xml file (i've read this on multiple tutorials on how to do the digital signature of an xml file).
My problem is, that i don't know how to properly call this procedure.

My code:

CREATE OR REPLACE FUNCTION KANON RETURN VARCHAR2 AS
xml varchar2(500);
xml_canon varchar2(500);

BEGIN
xml := '<Envelope xmlns="">
<Body>
Hello world
</Body>
</Envelope>';

dbms_utility.canonicalize(xml,xml_canon,lengthb(xml));
RETURN xml_canon;
END KANON;

Error:

ERROR at line 1:
ORA-23481: unexpected name string "<Envelope xmlns="">
<Body>
Hello world
</Body>
</Envelope>"
ORA-06512: at "SYS.DBMS_UTILITY", line 644
ORA-06512: at "user.KANON", line 16

I can't find any working example of this procedure, i hope someone here could help me with this. What am I doing wrong?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 15 2012
Added on May 18 2012
3 comments
551 views