miércoles, 24 de julio de 2013

Installation of WebLogic 10.3.6 standalone with ADF 11gR2


  1. Install WebLogic 10.3.6 with ADF 11gR1 11.1.1.6.0.
  2. Install patches to upgrade ADF to 11gR2 11.1.2.2.0 (or 11.1.2.3.0, 11.1.2.4.0, etc.).
    • Installation guide (My Oracle Support): How To Install the ADF Runtime Libraries 11g Release 2 in WebLogic Sever 10.3.5 10.3.6 (Doc ID 1328698.1).
    • Download page: My Oracle Support.

domingo, 7 de julio de 2013

Formatting the current date in Oracle OSB's XQuery

There's  no  format-dateTime() in Oracle OSB's XQuery implementation (as of 11.1.1.7). So I had to come up with something like this  :-S :

declare function xf:current-formatted-dateTime()
    as xs:string {
    let $currentDate := fn:current-date()
    let $currentTime := fn:current-time() (: no seconds-from-dateTime() :-( :)
    let $year := fn:year-from-date($currentDate)
let $month := fn:month-from-date($currentDate)
let $day := fn:day-from-date($currentDate)
let $hours := fn:hours-from-time($currentTime)
let $minutes := fn:minutes-from-time($currentTime)
let $seconds := fn:seconds-from-time($currentTime)
let $monthZeroPadded :=
if($month < 10) then xs:string(concat('0', $month))
else xs:string($month)
let $dayZeroPadded :=
if($day < 10) then xs:string(concat('0', $day))
else xs:string($day)
let $hoursZeroPadded :=
if($hours < 10) then xs:string(concat('0', $hours))
else xs:string($hours)
let $minutesZeroPadded :=
if($minutes < 10) then xs:string(concat('0', $minutes))
else xs:string($minutes)
let $secondsNoMS := xs:integer(fn:substring-before(xs:string($seconds), '.'))
let $secondsNoMSZeroPadded :=
if($secondsNoMS < 10) then xs:string(concat('0', $secondsNoMS))
else xs:string($secondsNoMS)

return concat($year, '-', $monthZeroPadded, '-', $dayZeroPadded, ' ', $hoursZeroPadded, ':', $minutesZeroPadded, ':', $secondsNoMSZeroPadded)
};

It can be placed and  used this way:


Produces this kind of output: 2013-07-07 17:38:05

Here you can find a list of the supported OSB's XQuery functions: http://www.tomecode.com/download/OSB_11g_XQueryFunction_list.txt