Thursday
Aug302012

Building your 1st SOA 11g BPEL project...

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. 

Tuesday
Aug142012

ORA-30625: method dispatch on NULL SELF argument is disallowed

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:

if
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(); 
end if; 

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.

Tuesday
Aug142012

SOA What?

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....

Monday
Apr022012

Worldwide Browser Stats for March

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....

Thursday
Mar292012

Quick XMLTable Tip

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. 

Example:

select getNet."networkid" networkid, getNet."networktier" networktier
from
   XMLTABLE(XMLNAMESPACES('http://namespace.com/v4' as "v4",'http://namespace.com/v1' as "v11" ),
   'for $i in v41:thisBlock
    where $i//v4:id = $v
    return $i//v4:networks/v41:networkTier'
    passing tt.thatXML, xmlelement("value", nvl2(p_variable, p_variable,tt.affid)) as "v"
COLUMNS
    "networkid" varchar2(40) PATH '/v41:networkTier/v41:networkId',
    "networktier" varchar2(40) PATH '/v41:networkTier/v41:providerTierLevel' 

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.