Quick plug...I'll be presenting at ECOUC come October 17-18. A bit of an APEX departure, i'll be doing the other side of my house, the 11g SOA suite. In the presentation, see how to build a BPEL process. Nothing earth shattering but will give you the basics, see the database adapter, notification system, schematron and what ever else I can fit in 60 minutes. If BPEL isn't your cup o' tea, come for the many apex, database, apps and plsql/sql presentations there this year. Its in Raleigh, NC and I can assure you, October in North Carolina is wonderful.
With BPEL comes XML and with XML comes XPaths... This particular error plagues anyone whom uses xpath in the database with any XML doc. It usually happens when you xpath to a node and its null or does not exist. With that "discovery" of a lost or missing node the code bails and pops up that nice error.
With this challenge, I needed to parse some error messages I received from a web service. Getting to the XML block embedded in a CDATA section is a whole other topic, but when I did get to the error block, I had to XPath into it to get my errors. One of my nodes was not consistently there, so the ORA-30625 kept popping up. A solution is as follows.
Use .existsnode in a if condition:
l_error_block.existsnode('/get:getDocumentFault/get:summary/text()', c_req_namespaces) = 1 then
p_error_message := l_error_block.extract('/get:getDocumentFault/get:summary/text()', c_req_namespaces).getClobVal();
This will check to see if the node exists, and if it does grabs the value, if not it continues on errorless. It works but seems to be a bit much so i'd love to hear any other solutions that might be out there.
XMLTable also works to prevent this, but isnt always needed and might be overkill.
Yes...I have not kept up with this in the past few months...blame work and my XBox...but none the less, among my daily APEX duties, I've been thrown back into the world of the Oracle 11g SOA Suite. mainly with the BPEL side of the house. The challenge we are presented with was getting a PDF from system X to system Z, with a few stops along the way. I'll be writing about the challenges I faced as well as some hints and tricks.
Its amazing how much more of the tool/software you use when you have to do it in a real world situation then in a sheltered internal Oracle proof of concept....
From here , it seems Chrome is the #1 browser these days...important to APEX user/devs because sometime chrome will render apex button placement in strange and weird ways. Also shows that IE6 is finally dying off, but not fast enough and not in all corporate environments....
Quick tip...when using XMLTables, I discovered that in the passing clause, when passing a variable as an XMLElement into the XMLTable clause, you can use NVL/NVL2 for conditional variables.
Here with xmlelement("value", nvl2(p_variable, p_variable,tt.affid)) as "v" we can conditionally pass in a variable or a value from previous XML blocks to get what we want.