<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-38586079</atom:id><lastBuildDate>Fri, 18 Dec 2009 15:27:39 +0000</lastBuildDate><title>One size doesn't fit all</title><description /><link>http://one-size-doesnt-fit-all.blogspot.com/</link><managingEditor>noreply@blogger.com (Chris Muir)</managingEditor><generator>Blogger</generator><openSearch:totalResults>257</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/OneSizeDoesntFitAll" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-8108549290377410362</guid><pubDate>Wed, 16 Dec 2009 06:20:00 +0000</pubDate><atom:updated>2009-12-16T14:25:58.817+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Misc</category><title>54% less productive in 2009</title><description>In &lt;a href="http://one-size-doesnt-fit-all.blogspot.com/2008/12/1-more-productive-than-2007.html"&gt;2008&lt;/a&gt; I noted I was 1% more productive than 2007 with 101 posts.  This year my statistics have plummeted, with just on 56 posts, a huge drop in "productivity".  I wonder if it's anything to do with having a second kid?&lt;br /&gt;&lt;br /&gt;Like last year I find it an interesting exercise to look back over my blog's statistics to work out the most popular pages for the year.&lt;br /&gt;&lt;br /&gt;In 2009 the top 5 read blog posts were:&lt;br /&gt;&lt;br /&gt;• &lt;a href="http://one-size-doesnt-fit-all.blogspot.com/2007/01/using-multiple-faces-configxml-files-in.html"&gt;Using multiple faces-config.xml files in JSF&lt;/a&gt;&lt;br /&gt;• &lt;a href="http://one-size-doesnt-fit-all.blogspot.com/2009/01/configuring-weblogic-server.html"&gt;Configuring WebLogic Server Domain/Machine/Server instances with the JDeveloper 11g ADF installer&lt;/a&gt;&lt;br /&gt;• &lt;a href="http://one-size-doesnt-fit-all.blogspot.com/2009/01/configuring-jdev-11g-adf-security-app.html"&gt;Configuring a JDev 11g ADF Security app on standalone WLS against MS Active Directory&lt;/a&gt;&lt;br /&gt;• &lt;a href="http://one-size-doesnt-fit-all.blogspot.com/2009/08/soapui-for-web-service-testing.html"&gt;SoapUI for web service testing&lt;/a&gt;&lt;br /&gt;• &lt;a href="http://one-size-doesnt-fit-all.blogspot.com/2008/08/jdevadf-how-to-log-user.html"&gt;JDev/ADF: How to log user login/logout/timeout to the database&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Like 2008 the multi-faces-config.xml post wins out again, being hit just over 5500 times in 2009.  Again this is probably indicative that there's a lot of JSF programmers out there beyond ADF programmers.&lt;br /&gt;&lt;br /&gt;Of content that was written in 2009, the top 5 blog posts were:&lt;br /&gt;&lt;br /&gt;• &lt;a href="http://one-size-doesnt-fit-all.blogspot.com/2009/01/configuring-weblogic-server.html"&gt;Configuring WebLogic Server Domain/Machine/Server instances with the JDeveloper 11g ADF installer&lt;/a&gt;&lt;br /&gt;• &lt;a href="http://one-size-doesnt-fit-all.blogspot.com/2009/08/soapui-for-web-service-testing.html"&gt;SoapUI for web service testing&lt;/a&gt;&lt;br /&gt;• &lt;a href="http://one-size-doesnt-fit-all.blogspot.com/2009/06/stress-load-testing-web-applications.html"&gt;Stress &amp; load testing web applications (even ADF &amp; Apex) using Apache JMeter&lt;/a&gt;&lt;br /&gt;• &lt;a href="http://one-size-doesnt-fit-all.blogspot.com/2009/01/jax-ws-provider-api-based-endpoints-in_13.html"&gt;JAX-WS Provider API based endpoints in JDev 11g&lt;/a&gt;&lt;br /&gt;• &lt;a href="http://one-size-doesnt-fit-all.blogspot.com/2009/02/enabling-ssl-and-disabling-non-ssl_17.html"&gt;Enabling SSL and disabling non-SSL under WLS 10.3&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;These statistics aren't overly representative of the 2009 results as some posts were written later in the year.  However the first post received on 2700 hits in 2009, not a surprise as many developers jumped onto the JDev 11g bandwagon and discovered (at the time) configuring WLS needed some thought.  I also not a bias towards web service posts, but again they go beyond the Oracle arena where there are plenty more developers.&lt;br /&gt;&lt;br /&gt;Like last year I have no large plans for the blog in 2010.  My blogging is mostly based around problems and solutions I work on for clients, while I reserve more comprehensive solutions for the &lt;a href="http://www.sagecomputing.com.au/oracle_training_australia.html"&gt;SAGE Computing Services&lt;/a&gt; training courses and the odd paper I write for OTN or Oracle User Group magazines.&lt;br /&gt;&lt;br /&gt;I might still though get a few extra posts in before the end of the year.  But if not I'd like to wish readers a relaxing Christmas and New Years or whatever you celebrate on your part of the big round thing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-8108549290377410362?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/q5HfjQpYOAw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/q5HfjQpYOAw/54-less-productive-in-2009.html</link><author>noreply@blogger.com (Chris Muir)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/12/54-less-productive-in-2009.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-3959958475701083273</guid><pubDate>Wed, 16 Dec 2009 00:47:00 +0000</pubDate><atom:updated>2009-12-16T08:51:52.351+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">WebLogic Server</category><title>Upgrading WLS via Oracle Support maintenance patchsets</title><description>Recently I blogged about &lt;a href="http://one-size-doesnt-fit-all.blogspot.com/2009/12/upgrading-wls-using-oracle-smart-update.html"&gt;Upgrading WLS using the Oracle Smart Update utility&lt;/a&gt;.  We discovered that while this utility will happily patch our developers' machines, we had h3lls own trouble trying to get it to work on our server.  After much head scratching, gritting of teeth, yelling, begging and sobbing at our firewall administrators, without a solve, we decided a new approach was required.&lt;br /&gt;&lt;br /&gt;As per Andreas Koop's comment in that original blog post, you can in fact run the Smart Update utility in offline mode, which implies you can download the patches and install them from the utility locally without directly connecting to the Oracle web services.  However what I couldn't see was how to run the Maintenance Patch option in offline mode.  Yet given the offline mode support it seemed reasonable that you could download a patchset from somewhere, and this post details where that's from.&lt;br /&gt;&lt;br /&gt;Under Oracle Support's &lt;a href="http://support.oracle.com"&gt;MOS&lt;/a&gt;  and the &lt;a href="http://supporthtml.oracle.com"&gt;HTML version&lt;/a&gt; you can click on the Patches and Updates tab.&lt;br /&gt;&lt;br /&gt;In MOS under the Patch Search box with the Oracle, Siebel and Hyperion tab selected, click on the Product or Family link.  From there as per the following screenshot enter WebLogic Server as the product, pick whichever release you want to upgrade to (not from), and the platform:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5hhNK2aXwp8/SyguVMdqQ3I/AAAAAAAAA68/RPyC9PrgOTo/s1600-h/manual1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 201px;" src="http://1.bp.blogspot.com/_5hhNK2aXwp8/SyguVMdqQ3I/AAAAAAAAA68/RPyC9PrgOTo/s400/manual1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5415629493570782066" /&gt;&lt;/a&gt;&lt;br /&gt;From here you can download the relevant patch:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/SyguVT6zOaI/AAAAAAAAA7E/Ep1kfAT1qBc/s1600-h/manual2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 106px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/SyguVT6zOaI/AAAAAAAAA7E/Ep1kfAT1qBc/s400/manual2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5415629495572052386" /&gt;&lt;/a&gt;&lt;br /&gt;The MOS interface isn't ideal as you can't use download managers for speeding up the stupendous size of the patchsets.  Alternatively the HTML version does.  The following screenshot shows the equivalent search'n'results under HTML:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/SyguV6V5E5I/AAAAAAAAA7M/nVHX6j-ynik/s1600-h/manual3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 322px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/SyguV6V5E5I/AAAAAAAAA7M/nVHX6j-ynik/s400/manual3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5415629505886229394" /&gt;&lt;/a&gt;&lt;br /&gt;From the resulting downloaded zip, extract it and run the exe.  This invokes the upgrade installer that looks similar to the normal WLS installer.  The installer steps from then on are self explanatory, requiring you to pick the existing WLS home then proceeding with the installation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-3959958475701083273?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/1adrlXIGUws" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/1adrlXIGUws/upgrading-wls-via-oracle-support.html</link><author>noreply@blogger.com (Chris Muir)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_5hhNK2aXwp8/SyguVMdqQ3I/AAAAAAAAA68/RPyC9PrgOTo/s72-c/manual1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/12/upgrading-wls-via-oracle-support.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-3690143655195837678</guid><pubDate>Mon, 14 Dec 2009 06:08:00 +0000</pubDate><atom:updated>2009-12-14T14:25:47.145+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADF Faces RC</category><category domain="http://www.blogger.com/atom/ns#">JDeveloper</category><title>ADF UI Shell + ADF Security</title><description>This post covers off combining the new ADF UI Shell and ADF Security.  Recently Oracle released the UI Shell based on the Oracle Dynamic Tabs Shell for JDeveloper 11g Release1 (aka PS1).  I blogged about my initial research around the UI Shell &lt;a href="http://one-size-doesnt-fit-all.blogspot.com/2009/11/adf-11gr1-ui-shell-oracle-dynamic-tabs.html"&gt;here&lt;/a&gt;, and you can follow others' questions and answers on the ADF UI Patterns &amp;amp; Best Practices &lt;a href="http://forums.oracle.com/forums/forum.jspa?forumID=764"&gt;OTN forum&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It's important for me to note that both my original post and this post constitute my learnings, have not been tested in a production system, they could contain errors.  As such your mileage may vary and it's important you do your own testing.&lt;br /&gt;&lt;br /&gt;The UI Shell is an interesting concept in that it dictates your application will be composed of separate subsystems, each made up of a number of activities (aka. bounded task flows).  The bounded task flows can in turn be shared by the subsystems.&lt;br /&gt;&lt;br /&gt;What I wanted to consider in this post is what are the minimum requirements in applying ADF Security, or in other words, what permissions do we need to give to each of the design time parts in order to allow authenticated users to access the application.  To discuss this I thought I'd base my example on the UI Shell demonstration &lt;a href="http://www.oracle.com/technology/products/adf/patterns/11/downloads/UIShellApp.zip"&gt;application&lt;/a&gt; as detailed in the Oracle UI Shell Functional Pattern &lt;a href="http://www.oracle.com/technology/products/adf/patterns/11/uishell.html"&gt;whitepaper&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In understanding how to apply ADF Security to the UI Shell example application we first need to identify all the moving parts that we need to apply security against:&lt;br /&gt;&lt;br /&gt;1) In the UI Shell example application the application is divided into 3 subsystems, namely First, Second and Third.  From a design time point of view each of these has an associated page First.jspx, Second.jspx and Third.jspx respectively.&lt;br /&gt;&lt;br /&gt;2) In turn the First subsystem has a "welcoming" task flow comprised of a single page fragment called you.jsff.  Potentially each subsystem can have its own welcoming task flow with page fragment, though in the example only one exists.&lt;br /&gt;&lt;br /&gt;3) The First subsystem makes use of three activities (aka. bounded tasks flows using page fragments) called first, second and third (note the case difference, don't get these confused with the subsystem names which are initcapped), that in turn are simple bounded task flows using a single page fragment one.jsff, two.jsff and three.jsff respectively.  The three activities are backed by task flow files first.xml, second.xml and third.xml.&lt;br /&gt;&lt;br /&gt;With this in mind let setup a security scenario where we want to allow a user to access the First subsystem and all the associated activities, but not parts of the Second and Third subsystems.&lt;br /&gt;&lt;br /&gt;The following steps describe the actions required in doing this:&lt;br /&gt;&lt;br /&gt;1) You must first enable ADF Security for your application via the Application -&gt; Secure -&gt; Configure ADF Security menu option that invokes the Configure ADF Security wizard.  As this wizard has been described in numerous other blogs I'll paraphase the options here:&lt;br /&gt;&lt;br /&gt;Step 1 of 5&lt;br /&gt;&lt;br /&gt;ADF Authentication and Authorisation&lt;br /&gt;&lt;br /&gt;Step 2 of 5&lt;br /&gt;&lt;br /&gt;Web Project: ViewController.jpr&lt;br /&gt;Form-Based Authentication&lt;br /&gt;Login Page: /login.html&lt;br /&gt;Error Page: /error.html&lt;br /&gt;&lt;br /&gt;Step 3 of 5&lt;br /&gt;&lt;br /&gt;No Automatic Grants&lt;br /&gt;&lt;br /&gt;Step 4 of 5&lt;br /&gt;&lt;br /&gt;No options (Leave Redirect Upon Successful Authentication unselected)&lt;br /&gt;&lt;br /&gt;Step 5 of 5&lt;br /&gt;&lt;br /&gt;n/a&lt;br /&gt;&lt;br /&gt;2) Via Application -&gt; Secure -&gt; Application Roles, configure a single Application Role "role1"&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5hhNK2aXwp8/SyXW0xlDRvI/AAAAAAAAA5c/X3GI4ZHrxN4/s1600-h/ui2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 233px;" src="http://2.bp.blogspot.com/_5hhNK2aXwp8/SyXW0xlDRvI/AAAAAAAAA5c/X3GI4ZHrxN4/s400/ui2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5414970329133172466" /&gt;&lt;/a&gt;&lt;br /&gt;3) In the same jazn-data.xml editor, select the Users options on the left, then configure a single user "user1" and allocate them to "role1" Application Role you created in the last step.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/SyXW0kkWifI/AAAAAAAAA5U/bGrv_viv0s0/s1600-h/ui1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 233px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/SyXW0kkWifI/AAAAAAAAA5U/bGrv_viv0s0/s400/ui1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5414970325640579570" /&gt;&lt;/a&gt;&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;What we need to from here is allocate basic access rights to the moving parts of the UI Shell that aren't specific to any subsystem.  In other words the parts of the UI Shell that are shared by all subsystems regardless of the type of user.&lt;br /&gt;&lt;br /&gt;You have a choice to make here.  If you want your basic application to be available to any user regardless if they've authenticated (ie. logged in) or not, then in the following step you need to grant the "anonymous-role" privilege.  Alternatively if you want your users to have to at least log in before accessing any part of the system, then you need to grant the "authenticated-role" privilege.  If you're unfamiliar with these concepts please read the Oracle documentation.  For this post I'll assume the "authenticated-role" privilege.&lt;br /&gt;&lt;br /&gt;4) In the same jazn-data.xml editor, select the ADF Policies tab at the bottom.  Select the Web Pages tab.  Ensure the "Show web pages imported from ADF libraries" checkbox is selected.  Under the Page Definitions table column select the dynamicTabShellDefinition option, then the green plus button in the "Granted to Roles" column, and select the authenticated-role role in the Select Role dialog:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5hhNK2aXwp8/SyXW1YHEd5I/AAAAAAAAA5k/oyioR6bVf4g/s1600-h/ui3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 302px;" src="http://1.bp.blogspot.com/_5hhNK2aXwp8/SyXW1YHEd5I/AAAAAAAAA5k/oyioR6bVf4g/s400/ui3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5414970339476404114" /&gt;&lt;/a&gt;&lt;br /&gt;The result in the jazn-data.xml will be:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5hhNK2aXwp8/SyXW1mpQb5I/AAAAAAAAA5s/ny2YifbYFSQ/s1600-h/ui4.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 233px;" src="http://2.bp.blogspot.com/_5hhNK2aXwp8/SyXW1mpQb5I/AAAAAAAAA5s/ny2YifbYFSQ/s400/ui4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5414970343377891218" /&gt;&lt;/a&gt;&lt;br /&gt;5) In the same jazn-data.xml editor with the ADF Policies tab still selected at the bottom, select the Tasks Flow tab.  Ensure the "Show task flows imported from ADF libraries" checkbox is selected.  Similar to the last step allocated the authenticated-role in the Select Role dialog to the "blank" task flow.  The result:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/SyXW1wDlZ7I/AAAAAAAAA50/HcmxLzirn3w/s1600-h/ui5.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 230px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/SyXW1wDlZ7I/AAAAAAAAA50/HcmxLzirn3w/s400/ui5.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5414970345904236466" /&gt;&lt;/a&gt;&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;From here we want to allocate the user1 with role1 privileges against the First subsystem.&lt;br /&gt;&lt;br /&gt;6) In the same jazn-data.xml editor with the ADF Policies tab and Tasks Flow tab open, allocate the role1 to the "first" task flow.  The result:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/SyXXFam7vHI/AAAAAAAAA58/1fiWnBZ6ZyA/s1600-h/ui6.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 231px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/SyXXFam7vHI/AAAAAAAAA58/1fiWnBZ6ZyA/s400/ui6.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5414970615024827506" /&gt;&lt;/a&gt;&lt;br /&gt;7) Ditto, allocate role1 to the "welcome" task flow.  The result:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/SyXXFii-sbI/AAAAAAAAA6E/yfT71iL-ktY/s1600-h/ui7.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 230px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/SyXXFii-sbI/AAAAAAAAA6E/yfT71iL-ktY/s400/ui7.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5414970617155727794" /&gt;&lt;/a&gt;&lt;br /&gt;8) Switch back to the Web Pages tab, then allocate role1 to the First page:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/SyXXGKMDtuI/AAAAAAAAA6M/zGRoZ9-dReU/s1600-h/ui8.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 231px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/SyXXGKMDtuI/AAAAAAAAA6M/zGRoZ9-dReU/s400/ui8.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5414970627797006050" /&gt;&lt;/a&gt;&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;At this stage if you run your application, you'll note on accessing the First page the user will be hit with the login box straight away.  A successful login lands on the First page showing the First subsystem.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/SyXXGCNUn0I/AAAAAAAAA6U/1EsXbJg3VHw/s1600-h/ui9.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 309px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/SyXXGCNUn0I/AAAAAAAAA6U/1EsXbJg3VHw/s400/ui9.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5414970625654824770" /&gt;&lt;/a&gt;&lt;br /&gt;If you click on one of the other main tabs such as Second App, the running page will return the following error message as expected as we haven't allocated user1 priviliges to the Second subsystem:&lt;br /&gt;&lt;br /&gt;ADFC-0619: Authorization check failed: '/Second.jspx' 'VIEW'.&lt;br /&gt;&lt;br /&gt;Ideally to stop this occurring we need to either disable or set the Second App tab's rendered property to false, through the following EL expression:&lt;br /&gt;&lt;br /&gt;#{!securityContext.userInRole['role2']}&lt;br /&gt;&lt;br /&gt;The result:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/SyXXGYiTJvI/AAAAAAAAA6c/RWRD-nhdt5s/s1600-h/ui10.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 309px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/SyXXGYiTJvI/AAAAAAAAA6c/RWRD-nhdt5s/s400/ui10.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5414970631648388850" /&gt;&lt;/a&gt;&lt;br /&gt;You'll need to make this change to every tab into every subsystem's page (First.jspx, Second.jspx, Third.jspx).&lt;br /&gt;&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;If we now open the first activity in the First subsystem page we get:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/SyXXOi6axoI/AAAAAAAAA6k/GFERYohYXAs/s1600-h/ui11.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 309px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/SyXXOi6axoI/AAAAAAAAA6k/GFERYohYXAs/s400/ui11.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5414970771872859778" /&gt;&lt;/a&gt;&lt;br /&gt;Yet if we open the second activity we get the following empty content:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/SyXXO7bt0oI/AAAAAAAAA6s/K5xO0Z_xQJw/s1600-h/ui12.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 309px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/SyXXO7bt0oI/AAAAAAAAA6s/K5xO0Z_xQJw/s400/ui12.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5414970778454971010" /&gt;&lt;/a&gt;&lt;br /&gt;This is to be expected as we haven't allocated the second.xml (or even the third.xml) to the role1 privilege.  As back in step 6, allocate role1 against these under the jaxn-data.xml editor, ADF policies tab, Task Flow tab:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5hhNK2aXwp8/SyXXPCSOSBI/AAAAAAAAA60/qWSx3bqnny4/s1600-h/ui13.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 235px;" src="http://2.bp.blogspot.com/_5hhNK2aXwp8/SyXXPCSOSBI/AAAAAAAAA60/qWSx3bqnny4/s400/ui13.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5414970780294203410" /&gt;&lt;/a&gt;&lt;br /&gt;Alternatively if you don't want these activities available to role1, instead change the commandLink's to disable or un-render properties as per the EL securityContext example above.&lt;br /&gt;&lt;br /&gt;--&lt;br /&gt;&lt;br /&gt;In conclusion we see the UI Shell works pretty seamlessly with ADF Security, with the small caveat that you need to know which parts of the UI Shell to grant privileges to all users/roles.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-3690143655195837678?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/gi0UFD2pnHw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/gi0UFD2pnHw/adf-ui-shell-adf-security.html</link><author>noreply@blogger.com (Chris Muir)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_5hhNK2aXwp8/SyXW0xlDRvI/AAAAAAAAA5c/X3GI4ZHrxN4/s72-c/ui2.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/12/adf-ui-shell-adf-security.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-2710849676323572544</guid><pubDate>Wed, 02 Dec 2009 06:03:00 +0000</pubDate><atom:updated>2009-12-02T14:17:10.826+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">WebLogic Server</category><title>Upgrading WLS using the Oracle Smart Update utility</title><description>Oracle provides the Smart Update utility to upgrade WebLogic Server installations between versions, or to apply specific patches applied by Oracle Support.  This post considers upgrading a 10.3.1 server to 10.3.2, not applying patches.  As usual your mileage may vary so be diligent in checking these instructions beforehand.&lt;br /&gt;&lt;br /&gt;The Oracle Smart Update utility is documented &lt;a href="http://download.oracle.com/docs/cd/E12839_01/doc.1111/e14143/toc.htm"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The general steps to run the Oracle Smart Update utility and upgrade the server are as follows:&lt;br /&gt;&lt;br /&gt;1) Ensure your WLS and any managed servers are not running.  In turn it would be a good idea to backup your server before running this procedure, in particular if it's a production server.&lt;br /&gt;&lt;br /&gt;2) (For whatever reason I couldn't invoke the following utility from Windows Explorer, so I had to invoke it via the command line)&lt;br /&gt;&lt;br /&gt;2.1) Under Windows open the command prompt at &amp;lt;wls_home&gt;\utils\bsu&lt;br /&gt;&lt;br /&gt;2.2) Execute the bsu.cmd.  This displays the Oracle Smart Update dialog to enter your Oracle Support user ID and password:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5hhNK2aXwp8/SxYE2Za_G5I/AAAAAAAAA3g/BbsI0LyKB2g/s1600-h/su1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 330px; height: 260px;" src="http://1.bp.blogspot.com/_5hhNK2aXwp8/SxYE2Za_G5I/AAAAAAAAA3g/BbsI0LyKB2g/s400/su1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5410517334915750802" /&gt;&lt;/a&gt;&lt;br /&gt;3) Assuming your login details are correct you'll be presented with the Oracle Smart Update dialog.  This can take some time to open as the utility scans your existing WLS patches&lt;br /&gt;&lt;br /&gt;4) You may be prompted to "Register for security updates", take your choice, be annoyingly nagged by Oracle, or miss applying security patches in the future:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/SxYE2oIUqHI/AAAAAAAAA3o/gXRBBuFneBM/s1600-h/su2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 301px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/SxYE2oIUqHI/AAAAAAAAA3o/gXRBBuFneBM/s400/su2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5410517338864003186" /&gt;&lt;/a&gt;&lt;br /&gt;5) The end result:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/SxYE2z1DcaI/AAAAAAAAA3w/Rck1d056KW0/s1600-h/su3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/SxYE2z1DcaI/AAAAAAAAA3w/Rck1d056KW0/s400/su3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5410517342004408738" /&gt;&lt;/a&gt;&lt;br /&gt;6) The Target Installation tree on the left hand side shows you the WLS servers the patch engine will work with.  We're not interested in the content on the right.  Presumably it includes one off patches to apply as supplied by Oracle Support, or hot security fixes applying to all WLS installations.  I've yet to see one of these so can't comment on what you'll actually see.&lt;br /&gt;&lt;br /&gt;7) To upgrade your WLS between versions you apply a "Maintenance Pack".  Click on the same named menu option followed by the sub-option Update.  This launches the BEA Smart Update dialog.  On selecting your existing WLS server in the left tree, you'll see the option to apply the Upgrade Option in the right, in this case specifically WebLogic Platform (10.3.2.0):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5hhNK2aXwp8/SxYE3W-_2qI/AAAAAAAAA34/VJdYgFk-KGE/s1600-h/su4.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 400px;" src="http://1.bp.blogspot.com/_5hhNK2aXwp8/SxYE3W-_2qI/AAAAAAAAA34/VJdYgFk-KGE/s400/su4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5410517351441357474" /&gt;&lt;/a&gt;&lt;br /&gt;The Oracle documentation for Maintenance Pack installations is &lt;a href="http://download.oracle.com/docs/cd/E12839_01/doc.1111/e14143/service.htm#i1075086"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;8) Selecting the Ok button will display a download dialog:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5hhNK2aXwp8/SxYE3t1Ws9I/AAAAAAAAA4A/-NpwGD5vSX0/s1600-h/su5.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 226px;" src="http://1.bp.blogspot.com/_5hhNK2aXwp8/SxYE3t1Ws9I/AAAAAAAAA4A/-NpwGD5vSX0/s400/su5.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5410517357574927314" /&gt;&lt;/a&gt;&lt;br /&gt;9) On the file downloading you'll be presented with the Oracle Installer for WebLogic 10.3.2.0:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/SxYFBjoAsXI/AAAAAAAAA4I/CPlW-A21tXU/s1600-h/su6.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 287px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/SxYFBjoAsXI/AAAAAAAAA4I/CPlW-A21tXU/s400/su6.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5410517526633296242" /&gt;&lt;/a&gt;&lt;br /&gt;10) Again you'll get a chance to "Register for security updates".  Be brave and skip it:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5hhNK2aXwp8/SxYFCC-V-WI/AAAAAAAAA4Q/9Wd_qtogcOg/s1600-h/su7.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 287px;" src="http://2.bp.blogspot.com/_5hhNK2aXwp8/SxYFCC-V-WI/AAAAAAAAA4Q/9Wd_qtogcOg/s400/su7.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5410517535048464738" /&gt;&lt;/a&gt;&lt;br /&gt;11) The next page allows you to specify the download location of any additional files, whether the files should be removed after installation, and the HTTP Proxy options to get through your firewall including username and password:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5hhNK2aXwp8/SxYFCWkozjI/AAAAAAAAA4Y/oVkaLKkKtKs/s1600-h/su8.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 287px;" src="http://2.bp.blogspot.com/_5hhNK2aXwp8/SxYFCWkozjI/AAAAAAAAA4Y/oVkaLKkKtKs/s400/su8.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5410517540309356082" /&gt;&lt;/a&gt;&lt;br /&gt;12) You'll then get another download screen and a chance for a coffee or 2 (make that 4):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5hhNK2aXwp8/SxYFCtNvJPI/AAAAAAAAA4g/-qSRjxg9fG8/s1600-h/su9.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 287px;" src="http://2.bp.blogspot.com/_5hhNK2aXwp8/SxYFCtNvJPI/AAAAAAAAA4g/-qSRjxg9fG8/s400/su9.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5410517546387318002" /&gt;&lt;/a&gt;&lt;br /&gt;If the downloads fails half way through, don't give up as the download utility supports resumes, just wait for it to timeout and then ask it to continue downloading.&lt;br /&gt;&lt;br /&gt;13) You'll then be given one last chance to back out:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5hhNK2aXwp8/SxYFCwEKEeI/AAAAAAAAA4o/pY7ZgAhfWCg/s1600-h/su10.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 287px;" src="http://2.bp.blogspot.com/_5hhNK2aXwp8/SxYFCwEKEeI/AAAAAAAAA4o/pY7ZgAhfWCg/s400/su10.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5410517547152445922" /&gt;&lt;/a&gt;&lt;br /&gt;14) After which there's no backing out:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5hhNK2aXwp8/SxYFNcEEx0I/AAAAAAAAA4w/xQacdb3y1Ko/s1600-h/su11.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 287px;" src="http://2.bp.blogspot.com/_5hhNK2aXwp8/SxYFNcEEx0I/AAAAAAAAA4w/xQacdb3y1Ko/s400/su11.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5410517730761951042" /&gt;&lt;/a&gt;&lt;br /&gt;15) Just click Done on the final page.  If the QuickStart dialog shows, close it:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5hhNK2aXwp8/SxYFNhB662I/AAAAAAAAA44/e4D1djIFnso/s1600-h/su12.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 274px;" src="http://1.bp.blogspot.com/_5hhNK2aXwp8/SxYFNhB662I/AAAAAAAAA44/e4D1djIFnso/s400/su12.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5410517732095093602" /&gt;&lt;/a&gt;&lt;br /&gt;16) In turn the BEA Smart Upgrade dialog will also show detailing the new 10.3.2 upgrade.  You'll note in the lower part of the right window, you can downgrade from 10.3.2 to 10.3.1 if necessary.  You can close this dialog:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/SxYFN2CPB2I/AAAAAAAAA5A/-7fMxVdqhtQ/s1600-h/su13.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 400px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/SxYFN2CPB2I/AAAAAAAAA5A/-7fMxVdqhtQ/s400/su13.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5410517737733556066" /&gt;&lt;/a&gt;&lt;br /&gt;17) Returning to the Oracle Smart Update window it'll misreport the current version which you can ignore.&lt;br /&gt;&lt;br /&gt;18) To verify the install the easiest thing is to start your managed servers and then access the console login.  At the bottom of the page you'll see the server version:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5hhNK2aXwp8/SxYFOSdY7EI/AAAAAAAAA5I/r9LY5rlOghc/s1600-h/su14.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 268px;" src="http://2.bp.blogspot.com/_5hhNK2aXwp8/SxYFOSdY7EI/AAAAAAAAA5I/r9LY5rlOghc/s400/su14.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5410517745363643458" /&gt;&lt;/a&gt;&lt;br /&gt;19) It's probably worth investigating the server logs to see if any unexpected exceptions have been thrown.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-2710849676323572544?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/omh6sHM6X-w" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/omh6sHM6X-w/upgrading-wls-using-oracle-smart-update.html</link><author>noreply@blogger.com (Chris Muir)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_5hhNK2aXwp8/SxYE2Za_G5I/AAAAAAAAA3g/BbsI0LyKB2g/s72-c/su1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/12/upgrading-wls-using-oracle-smart-update.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-6440026580328519387</guid><pubDate>Mon, 30 Nov 2009 04:23:00 +0000</pubDate><atom:updated>2009-11-30T17:15:06.980+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADF Faces RC</category><category domain="http://www.blogger.com/atom/ns#">JDeveloper</category><title>ADF 11gR1 – UI Shell – Oracle Dynamic Tabs Shell</title><description>In the latest release of JDeveloper, specifically 11.1.1.2.0 also known as 11g Release 1 also known as Patch Set 1 also known as 11g build 5536 also known as the Shepherd build (cough cough Oracle), Oracle has included a new built in page template known as the "Oracle Dynamic Tabs Shell".  This template is part of Oracle's &lt;a href="http://www.oracle.com/technology/products/adf/patterns/index.html"&gt;ADF Functional Patterns and Best Practices&lt;/a&gt; efforts, also referred to as the "UI Shell". Complete documentation is available &lt;a href="http://www.oracle.com/technology/products/adf/patterns/11/uishell.html"&gt;here&lt;/a&gt;.  I'll leave readers unfamiliar with the UI Shell to read Oracle's documentation to understand the basics.&lt;br /&gt;&lt;br /&gt;With my current client we're happy with the inclusion of this new UI Shell and we can actively see ourselves using it in the near future.  What I wanted to document is my own thoughts and research which may be of use to others, and I hope to further the discussion on the &lt;a href="http://groups.google.com/group/adf-methodology/browse_thread/thread/f84bdcec40b7819f?hl=en"&gt;ADF EMG&lt;/a&gt;.  Note as usual your mileage may vary so take time out to check the facts listed here:&lt;br /&gt;&lt;br /&gt;1) The Create JSF Page dialog presents the "Oracle Dynamic Tabs Shell" page template option:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5hhNK2aXwp8/SxNJYCjctLI/AAAAAAAAA2w/4Hvqaq9DCdg/s1600/ui1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 258px;" src="http://2.bp.blogspot.com/_5hhNK2aXwp8/SxNJYCjctLI/AAAAAAAAA2w/4Hvqaq9DCdg/s400/ui1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5409748254753338546" /&gt;&lt;/a&gt;&lt;br /&gt;2) The template and its supporting classes are installed in &amp;lt;jdev_home&gt;/jdeveloper/adfv/jlib/oracle-page-templates-ext.jar, though the JDev IDE takes care of importing the template and classes/libraries into your project for you once selected in the Create JSF Page dialog.  As the following picture shows an additional library Oracle Extended Page Templates is added to your project:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/SxNJYiwIQEI/AAAAAAAAA24/V_LJeYLROI0/s1600/ui2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 350px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/SxNJYiwIQEI/AAAAAAAAA24/V_LJeYLROI0/s400/ui2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5409748263396458562" /&gt;&lt;/a&gt;Side note: Steve Muench has blogged the location of the UI Shell template and supporting classes as a separate download &lt;a href="http://blogs.oracle.com/smuenchadf/2009/11/source_for_ps1_dynamic_tab_she.html"&gt;here&lt;/a&gt;.  This will allow you to take the default UI Shell template and customise to your needs if required.  See further points below for why this may be necessary.&lt;br /&gt;&lt;br /&gt;2) Our technical team was already getting bogged down in "discussions" of "standard" web page layouts versus RIA layouts.  The technical team knows the standard web page layouts weren't suited to RIA applications, but it was hard to argue our case without actually creating a RIA layout.  In turn creating a RIA layout that we were happy with was going to take some time, and we're building applications now.  With the UI Shell we can short cut the layout "discussions", say this is what Oracle's provided us, it works well and this is what we'll use, allowing us to focus on the more important matter of hand and that's writing the ADF solution for the business.&lt;br /&gt;&lt;br /&gt;3) Our overall application is made up of several subsystems (think Oracle Apps with HR, Procurement, Payroll etc).  Within the UI Shell the globalTabs facet provides an ideal location to list the subsystems allowing the user to switch between each module:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/SxNJY6jiKeI/AAAAAAAAA3A/0sbVrvQ7FD8/s1600/ui3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 112px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/SxNJY6jiKeI/AAAAAAAAA3A/0sbVrvQ7FD8/s400/ui3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5409748269786081762" /&gt;&lt;/a&gt;4) Each subsystem gets its own page based on the template, as in hr.jspx, procurement.jspx and payroll.jspx based on our example.&lt;br /&gt;&lt;br /&gt;5) The rest of the application is made up of a number "Activities" that in essence are bounded task flows using page fragments, or in other words the business processes of your application.  Each subsystem is free to make use of as many bounded task flows as it sees fit, and in addition a bounded task flow can be used (shared) by many of the subsystem pages.&lt;br /&gt;&lt;br /&gt;6) As per the previous point, if you're using the default UI Shell provided through JDeveloper rather than downloading the UI Shell as per Steve Muench's blog above, and you wish to have a common element in every page using the template, you'll need to code them in every page which isn't ideal.  The solution is to download Oracle's template and customise it within your own application (or possibly create a number of declarative page components for repetitive content, though this will still require you to load each page component in each page based on the UI Shell template).&lt;br /&gt;&lt;br /&gt;7) A key feature of the UI Shell as described in its other name "Oracle Dynamic Tabs Shell" is it shows under each subsystem how to launch a bounded task flow (aka Activity) one or many times:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5hhNK2aXwp8/SxNJfFM__II/AAAAAAAAA3Y/Awb9o8nH8mk/s1600/ui6.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 271px;" src="http://1.bp.blogspot.com/_5hhNK2aXwp8/SxNJfFM__II/AAAAAAAAA3Y/Awb9o8nH8mk/s400/ui6.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5409748375723572354" /&gt;&lt;/a&gt;This may not be ideal for every application, but my current client has a scenario in an existing Oracle Forms application where users open up to 4 sessions.  While we're not sure on building an ADF equivalent with a chance to redesign the users' workflow will they still need to do this, if they do we're envisaging that each session can now be as a separate UI Shell Activity under the subsystem page.&lt;br /&gt;&lt;br /&gt;8) As discussed in the following ADF EMG &lt;a href="http://groups.google.com/group/adf-methodology/browse_thread/thread/e7c9d557ab03b1cb?hl=en"&gt;thread&lt;/a&gt; the UI Shell makes a great addition to the "Master JDev Application Workspace" proposed by Todd Hill bringing a number of composite ADF bounded task flows together.&lt;br /&gt;&lt;br /&gt;9) The demonstration UI Shell application shows a basic mechanism of stopping a user leaving an activity once they've made "it dirty".  The analogy to this is in the JDev IDE when the user changes the contents of a source file, the tab control title font becomes italic and the user is warned/prompted to save changes if they attempt to close the tab without saving.&lt;br /&gt;&lt;br /&gt;Currently this feature should be considered a demonstration feature only as in the downloadable UI Shell demonstration application it has a number of limitations (it is a demo after all).  In particular the isDirty() check is only done within a subsystem's activities.  Clicking on a different subsystem tab/page doesn't invoke the isDirty() check with the appropriate warning dialog.  It would be my assumption that this check would need to be coded in each specific application, reusing the isDirty() facilities provided.&lt;br /&gt;&lt;br /&gt;10) For the logoImagePath attribute you can specify the path of the UI Shell log image, but not the size.  In the turn the layout tends to assume a horizontal logo.  If corporate branding is important to your organisation and they have a long vertical logo, good luck.&lt;br /&gt;&lt;br /&gt;11) The default UI Shell has no consideration of security.  For instance what subsystems are available under the globalTabs for the current user is your responsibility&lt;br /&gt;&lt;br /&gt;12) The overall template does waste some vertical screen real-estate:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/SxNJZCJRpdI/AAAAAAAAA3I/oVBJde4YIRo/s1600/ui4.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 318px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/SxNJZCJRpdI/AAAAAAAAA3I/oVBJde4YIRo/s400/ui4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5409748271823431122" /&gt;&lt;/a&gt;See annotations A, B and C.&lt;br /&gt;&lt;br /&gt;A can be trimmed by setting the globalSplitterPosition attribute.  At this time it doesn't look like B and C can be set in the default UI Shell.  Ideally we'd want something like this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/SxNJZYL53dI/AAAAAAAAA3Q/na2NJtbfqcA/s1600/ui5.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 322px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/SxNJZYL53dI/AAAAAAAAA3Q/na2NJtbfqcA/s400/ui5.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5409748277740035538" /&gt;&lt;/a&gt;13) The overall template is extremely small – only 74k – wow, Oracle can create something that doesn't take up an entire CD! ;-)&lt;br /&gt;&lt;br /&gt;14) I note in the source code downloadable from Steve Muench's blog that there are a few comments that the implementation will change dependent on later updates to the ADF component set presumably available in later JDev releases (ie. see the TabContext.java REMOVE_ME_WHEN_NAVPANE_SUPPORTS_STAMPING comment).&lt;br /&gt;&lt;br /&gt;This implies the default functionality of the UI Shell could change in the future which could have issues for your existing applications based on the UI Shell and therefore your regression testing and user experience.  It may be necessary to source the UI Shell code and baseline in your code repository rather than being subjected to changes in functionality on upgrading to future JDev releases.&lt;br /&gt;&lt;br /&gt;15) As per the UI Shell whitepaper, the 7 zillion steps to reproduce the demonstration UI Shell application do look daunting.  However if you're familiar with JDev, page templates and constructing JSF pages it only takes about 20-30 minutes to run through most of the steps.  In fact most steps are just setting up dummy task flows and page fragments to show some content within the produced template, nothing really to do with the template itself.&lt;br /&gt;&lt;br /&gt;16) You'll need to remind users/analysts/managers etc that what the UI Shell gives in preconfigured layouts, saving developers time and boosting productivity, it takes away in customizable layout of the screen.  This is a common point of contention in component based frameworks where a super component gives a large array of features, but the component works as the component works and cannot be easily customised without headache.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-6440026580328519387?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/ce5PvdTToxc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/ce5PvdTToxc/adf-11gr1-ui-shell-oracle-dynamic-tabs.html</link><author>noreply@blogger.com (Chris Muir)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_5hhNK2aXwp8/SxNJYCjctLI/AAAAAAAAA2w/4Hvqaq9DCdg/s72-c/ui1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/11/adf-11gr1-ui-shell-oracle-dynamic-tabs.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-131286136674525512</guid><pubDate>Sat, 14 Nov 2009 07:19:00 +0000</pubDate><atom:updated>2009-11-14T15:33:02.866+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADF Enterprise Methodology Group</category><title>ADF EMG goes international - UKOUG style</title><description>I'm happy to say that the &lt;a href="http://groups.google.com/group/adf-methodology?hl=en"&gt;ADF Enterprise Methodology Group&lt;/a&gt; is running its first UKOUG &lt;a href="http://techandebs.ukoug.org/default.asp?p=3227&amp;dlgact=shwprs&amp;prs_prsid=4178&amp;day_dayid=34"&gt;presentation&lt;/a&gt; this year at their annual technology conference in Birmingham November 30th-December 2nd.  This is a pretty exciting development for us, as this will be the first ADF EMG session run outside of the USA!&lt;br /&gt;&lt;br /&gt;My colleague in ADF crime &lt;a href="http://www.veriton.co.uk/roller/fmw/"&gt;Simon Haslam&lt;/a&gt;, who organised and ran our OOW sessions this year, invites anybody who is interested in ADF and wants to talk with other users to attend.  At OOW we had the rather pleasing experience of several ADF "production" system demonstrations which was pretty cool, and hopefully at the UKOUG we can get some of you to talk about your ADF experiences too.&lt;br /&gt;&lt;br /&gt;Unfortunately I'm just on 14590.82kms away (9066.56 miles for our UK friends) and wont be able to make it.  If only it was a couple clicks closer, oh, and not across several oceans &amp; continents, and a tad warmer too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-131286136674525512?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/wsrujZTZ0nc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/wsrujZTZ0nc/adf-emg-goes-international-ukoug-style.html</link><author>noreply@blogger.com (Chris Muir)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/11/adf-emg-goes-international-ukoug-style.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-10124615613825984</guid><pubDate>Thu, 12 Nov 2009 04:18:00 +0000</pubDate><atom:updated>2009-11-12T12:20:03.312+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADF Business Components</category><title>ADF BC Groovy – showing old values along with new.</title><description>A common requirement in databound applications is to allow the user to view changes before they commit them to the database, showing the user both the original-old value along with the new.  This gives users a chance to review their changes visually by comparing the old and new.&lt;br /&gt;&lt;br /&gt;For an updated record that has yet been committed to the database, ADF BC stores both the old and new value.  Among other reasons ADF BC does this, is it allows the user to cancel any changes, and rather than having to fetch the original value back from the database, ADF BC just retrieves the old value it has cached without a roundtrip to the database.&lt;br /&gt;&lt;br /&gt;This cache gives us the ability to solve our original requirements as the ADF BC framework exposes methods to fetch both new and old non committed values from the Entity Object (EO).  To fetch the new current value we call the associated accessor such as getPosition() or getName() that was automatically created by the framework in our EntityImpl.  To get the old value we use the getPostedAttribute() method passing in the index of the field we wish to fetch.&lt;br /&gt;&lt;br /&gt;In JDeveloper 11g through its introduction of Groovy expressions, it's very simple to expose the old value through the Entity Objects:&lt;br /&gt;&lt;br /&gt;1) In your required EO create a transient attribute.  For example if we want to show the old values for the Position attribute of our EO, we could create a new transient attribute named OldPosition.&lt;br /&gt;&lt;br /&gt;2) Ensure the "Persistent" and "Derived from SQL Expression" properties are turned off for the new transient attribute.&lt;br /&gt;&lt;br /&gt;3) Set the "Value Type" to Expression and enter the following Groovy expression into the Value field:&lt;br /&gt;&lt;br /&gt;adf.object.getPostedAttribute(adf.object.getAttributeIndexOf(model.EmployeesImpl.POSITION))&lt;br /&gt;&lt;br /&gt;Note the call to the getPostedAttribute() method, passing in the index of the Position field that it requires.&lt;br /&gt;&lt;br /&gt;If the Groovy syntax isn't familiar to you in JDeveloper 11g consult Grant Ronald's &lt;a href="http://www.oracle.com/technology/products/jdev/11/how-tos/groovy/introduction_to_groovy.pdf"&gt;Introduction to Groovy&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A bad steer here maybe to try and use ADF Groovy's oldValue and newValue methods.  Unfortunately these are only available for Groovy expressions in EO Declarative Validators, not in transient attribute.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5hhNK2aXwp8/Su--b2b8OXI/AAAAAAAAA2o/MYyCNlsBuRU/s1600-h/groovy.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 186px;" src="http://1.bp.blogspot.com/_5hhNK2aXwp8/Su--b2b8OXI/AAAAAAAAA2o/MYyCNlsBuRU/s400/groovy.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5399743863918967154" /&gt;&lt;/a&gt;&lt;br /&gt;4) Expose the attribute through the associated View Objects (VO) if necessary.&lt;br /&gt;&lt;br /&gt;At runtime you'll note that initially the OldPosition field shows what's in the Position field.  When you change the Position field's value, the OldPosition remains at the pre-cached value.  Finally on committing the changes to the database, the OldPosition value is overwritten with the new Position value.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-10124615613825984?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/HfFV9pc8uwY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/HfFV9pc8uwY/adf-bc-groovy-showing-old-values-along.html</link><author>noreply@blogger.com (Chris Muir)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_5hhNK2aXwp8/Su--b2b8OXI/AAAAAAAAA2o/MYyCNlsBuRU/s72-c/groovy.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/11/adf-bc-groovy-showing-old-values-along.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-3587814987944206452</guid><pubDate>Wed, 04 Nov 2009 09:20:00 +0000</pubDate><atom:updated>2009-11-04T17:30:25.938+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SAGE Computing Services</category><title>Just how famous can one man get?</title><description>Between OOW and the &lt;a href="http://www.ausoug.org.au/2020"&gt;AUSOUG&lt;/a&gt; conferences it's a bit of a slow blogging time for me, while presentation preparation takes priority.  With a little spare time I thought I'd share this photo of some recent booty (and before you get all excited, that's arrrrgh "Pirate" booty, not the other sort):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5hhNK2aXwp8/Su7cd_jd35I/AAAAAAAAA2g/WSARtWlJ41c/s1600-h/DSC02217a.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 273px;" src="http://1.bp.blogspot.com/_5hhNK2aXwp8/Su7cd_jd35I/AAAAAAAAA2g/WSARtWlJ41c/s400/DSC02217a.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5399495411098312594" /&gt;&lt;/a&gt;&lt;br /&gt;On the right my coveted Oracle ACE Director of the Year award from &lt;a href="http://www.oracle.com/technology/oramag/oracle/09-nov/o69awards.html#muir"&gt;Oracle Magazine&lt;/a&gt;.  In the middle Duke, thrown from &lt;a href="http://en.wikipedia.org/wiki/James_Gosling"&gt;James Gosling&lt;/a&gt; himself at his Oracle Develop OOW session.  And on the left my cherished &lt;a href="http://www.sagecomputing.com.au/"&gt;SAGE Computing Services&lt;/a&gt; award.&lt;br /&gt;&lt;br /&gt;If the writing is a little hard to read, it says:&lt;br /&gt;&lt;br /&gt;Sage Computing Services' own Chris "ACE Director of the Year" Muir - "How famous can one man get" Award - For excessive hard work blogging and general geeky behaviour.&lt;br /&gt;&lt;br /&gt;And to think, I thought nobody noticed ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-3587814987944206452?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/XmivNLMKLmU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/XmivNLMKLmU/just-how-famous-can-one-man-get.html</link><author>noreply@blogger.com (Chris Muir)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_5hhNK2aXwp8/Su7cd_jd35I/AAAAAAAAA2g/WSARtWlJ41c/s72-c/DSC02217a.JPG" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/11/just-how-famous-can-one-man-get.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-3714547846140433516</guid><pubDate>Tue, 03 Nov 2009 00:50:00 +0000</pubDate><atom:updated>2009-11-03T08:56:04.469+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Australia</category><title>ODTUG down under – more ACEs than a pack of cards</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.ausoug.org.au/2020/images/banner.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 765px; height: 108px;" src="http://www.ausoug.org.au/2020/images/banner.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;Regular readers already know that &lt;a href="http://www.odtug.com/"&gt;ODTUG&lt;/a&gt; in conjunction with &lt;a href="http://otn.oracle.com"&gt;Oracle Technology Network&lt;/a&gt; has invited a number of &lt;a href="http://www.oracle.com/technology/community/oracle_ace/index.html"&gt;Oracle ACEs&lt;/a&gt; and ACE Directors to present down under.  ODTUG has teamed with &lt;a href="http://www.ausoug.org.au/2020"&gt;AUSOUG&lt;/a&gt; to give these world recognized presenters (in fact in all cases world award winning speakers) full day slots at the conference that starts next week:&lt;br /&gt;&lt;br /&gt;Tim Hall&lt;br /&gt;Lucas Jellema&lt;br /&gt;Peter Koletzke&lt;br /&gt;Connor McDonald&lt;br /&gt;Penny Cookson&lt;br /&gt;&lt;br /&gt;Unusually for these presentations, rather than a 45m technical hit, these speakers will be running full day slots, meaning it's a mini training day increasing your value from the conference.&lt;br /&gt;&lt;br /&gt;The Perth conference starts next week November 10th &amp; llth, and the Melbourne conference follows 16th &amp; 17th of November.  You don't have much time to book so hit the AUSOUG &lt;a href="http://www.ausoug.org.au/2020"&gt;website&lt;/a&gt; now for instructions on how to buy tickets.&lt;br /&gt;&lt;br /&gt;In addition I'll be presenting my two presentations fresh from OOW09:&lt;br /&gt;&lt;br /&gt;SOA Lite: A taste of SOA with a smidgen of Web Services&lt;br /&gt;&lt;br /&gt;Oracle JDeveloper 11g JAX-WS Web Services: As easy as 1-2-3: XSD, WSDL, Generate!&lt;br /&gt;&lt;br /&gt;...but given these other great speakers are in town, I expect me and my Mum in mine :-(&lt;br /&gt;&lt;br /&gt;AUSOUG charges considerably under industry rates for the conference series per delegate, and there are rumours this will be the last year at such cheap rates, so make effort to grab tickets now.&lt;br /&gt;&lt;br /&gt;Remember to support your user group like it supports you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-3714547846140433516?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/gWqefG_9jhA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/gWqefG_9jhA/odtug-down-under-more-aces-than-pack-of.html</link><author>noreply@blogger.com (Chris Muir)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/11/odtug-down-under-more-aces-than-pack-of.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-9056575003088041413</guid><pubDate>Tue, 27 Oct 2009 01:10:00 +0000</pubDate><atom:updated>2009-10-27T09:12:47.229+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">WebLogic Server</category><title>Part II - Working with WLS 10.3.1 SQLAuthenticator password algorithms</title><description>In the &lt;a href="http://one-size-doesnt-fit-all.blogspot.com/2009/10/part-i-working-with-wls-1031.html"&gt;previous post&lt;/a&gt; we looked at how to configure the SQLAuthenticator password encryption options.  Among other encryption algorithms we discovered that on creating a user from the WLS console, WLS would create the associated user in a database table with password "password" encrypted to:&lt;br /&gt;&lt;br /&gt;{SHA-1}W6ph5Mm5Pz8GgiULbPgzG37mj9g=&lt;br /&gt;&lt;br /&gt;...when the SHA-1 option was set.&lt;br /&gt;&lt;br /&gt;As was mentioned in the previous post, as the database table with its users and passwords may be shared by non-WLS based applications, it's important that those systems can encrypt passwords and compare them to the WLS result.  In other words, in the example above, given that WLS generated a SHA-1 encrypted password, if another system uses the same SHA-1 algorithm will it generate the same encrypted password allowing it to compare the database SHA-1 encrypted password against the SHA-1 encrypted password it has?&lt;br /&gt;&lt;br /&gt;In order to check we can get the same encrypted results, we'll investigate generating a SHA-1 password using the Oracle database's encryption facilities (so in this case the database acts as the other subsystem), comparing the database's encrypted SHA-1 password to that of WLS.&lt;br /&gt;&lt;br /&gt;The following solution owes thanks to Sean at Oracle Support who very patiently led me in the right direction with my findings.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;dbms_crypto&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Oracle database fans will be familiar with the &lt;a href="http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_crypto.htm#BJFCGDIC"&gt;dbms_crypto&lt;/a&gt; package that provides encryption support.&lt;br /&gt;&lt;br /&gt;dbms_crypto allows us to generate an encrypted password that we can compare to the WLS result.  From table 34-1 of the dbms_crypto link, we note that dbms_crypto supports the following one-way hash algorithms: SHA-1, MD4 and MD5.  As WLS via the JCE extensions (see the previous post) supports SHA-1, MD2 and MD5, it's fortunate we picked SHA-1 for this example.&lt;br /&gt;&lt;br /&gt;The following anonymous PL/SQL block shows an example using the dbms_crypto package hash function with SHA-1 to produce an encrypted result:&lt;pre name="code" class="java"&gt;&lt;br /&gt;DECLARE&lt;br /&gt;  input_string  VARCHAR2(8);&lt;br /&gt;  raw_input     RAW(128);&lt;br /&gt;  encrypted_raw RAW(2048);&lt;br /&gt;BEGIN&lt;br /&gt;  input_string := 'password';&lt;br /&gt;  raw_input    := utl_raw.cast_to_raw(convert(input_string, 'AL32UTF8','US7ASCII'));&lt;br /&gt;&lt;br /&gt;  encrypted_raw := dbms_crypto.hash(src =&gt; raw_input, typ =&gt; dbms_crypto.hash_sh1);&lt;br /&gt;  dbms_output.put_line('Output: ' || encrypted_raw);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;Output: 5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8&lt;/pre&gt;Note the output, a hex value, and doesn't match our WLS output for the same plaintext password "password" encrypted with SHA-1.&lt;br /&gt;&lt;br /&gt;The missing bit of information (that I haven't found documented) is that WLS after encrypting the plaintext password, as confirmed by Oracle Support, WLS then converts the output to base 64.  In the case of the dbms_crypto hash function, it converts the encrypted result to Hex.  In order to get the same result you need to convert the Hex output to base 64.&lt;br /&gt;&lt;br /&gt;There's a number of different ways to do this.  One is to use a Java routine in the database, converting the dbms_crypto Hex result to a byte array, then byte array to base 64.  A suitable algorithm would be:&lt;pre name="code" class="java"&gt;&lt;br /&gt;byte[] bytearray = hexStringToByteArray("5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8");&lt;br /&gt;String base64encoded = new BASE64Encoder().encodeBuffer(bytearray);&lt;/pre&gt;...where the hexStringToByteArray function is borrowed from Dave L on &lt;a href="http://stackoverflow.com/questions/140131/convert-a-string-representation-of-a-hex-dump-to-a-byte-array-using-java"&gt;StackOverflow&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The end result is: W6ph5Mm5Pz8GgiULbPgzG37mj9g= ... finally matching what WLS wrote to the database (missing the algorithm prefix of course).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Conclusion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Why the WebLogic Server's SQLAuthenticator can make use of different encryption algorithm when writing to the database, it's important to ensure that the results are expected and understood and can be used by other subsystems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-9056575003088041413?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/L3EavdFuwnM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/L3EavdFuwnM/part-ii-working-with-wls-1031.html</link><author>noreply@blogger.com (Chris Muir)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/10/part-ii-working-with-wls-1031.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-9182944295252006441</guid><pubDate>Sun, 18 Oct 2009 20:53:00 +0000</pubDate><atom:updated>2009-10-19T04:56:01.341+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Open World</category><title>My OOW presentations - part II</title><description>My 2 presentations for OOW are now available for download from the &lt;a href="http://www.sagecomputing.com.au"&gt;SAGE Computing Services&lt;/a&gt; website here:&lt;br /&gt;&lt;a href="http://www.sagecomputing.com.au/papers_presentations/SOALite.ppt"&gt;&lt;br /&gt;SOA Lite: A taste of SOA with a smidgen of Web Services&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sagecomputing.com.au/papers_presentations/webservice1-2-3v1.0.pdf"&gt;Oracle JDeveloper 11g JAX-WS Web Services: As easy as 1-2-3: XSD, WSDL, Generate!&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-9182944295252006441?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/h-Z7DUhQ-gA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/h-Z7DUhQ-gA/my-oow-presentations-part-ii.html</link><author>noreply@blogger.com (Chris Muir)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/10/my-oow-presentations-part-ii.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-3525435927831271134</guid><pubDate>Fri, 09 Oct 2009 16:36:00 +0000</pubDate><atom:updated>2009-10-10T00:46:29.561+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Open World</category><category domain="http://www.blogger.com/atom/ns#">JDeveloper</category><title>My OOW presentations</title><description>If you're heading to OOW and would love to hear my Aussie accent, my sessions are:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;SOA Lite: A taste of SOA with a smidgen of Web Services&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;S312176 - Sunday 13:00 - 14:00 - Moscone West L3 Room 3000&lt;br /&gt;&lt;br /&gt;Abstract: Attempting to gorge yourself on a five-course SOA meal may result in a stomachache and a bill you can least afford at the moment. Instead, a quick and easy recipe with some simple Web services ingredients will give your systems that little taste of SOA you so crave. This session describes why Web services may be a better fit for you than SOA, discusses qualities of contemporary Web services and what skills to focus on when starting out with Web services, and presents a few hints and tips from the Web service trenches.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Oracle JDeveloper 11g JAX-WS Web Services: As easy as 1-2-3: XSD, WSDL, Generate!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;307476 - Tuesday 17:30 - 18:30 - Hilton Hotel - Golden Gate 8&lt;br /&gt;&lt;br /&gt;Abstract: Web services used to be hard. Creating XML schemas, long-winded Web Services Description Language (WSDL) code, and back-end Java code took much effort. Today Oracle JDeveloper 11g enables developers to visually design both the schemas and WSDL code by drag and drop and generate Web services based on both of these with the latest Java EE JAX-WS/JAXB Web service standards with just a few clicks. Finally programmers can get back to thinking about the programming problem they need to solve without wasting time setting up the Web service artifacts, which can be tedious, error-prone, and very repetitive. Learn more in this session.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In addition we have three &lt;a href="http://groups.google.com/group/adf-methodology?hl=en"&gt;ADF Enterprise Methodology Group&lt;/a&gt; sessions, one an official session and the other two part of the Unconference:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Oracle ADF Enterprise Methodology Group&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;312516 - Sunday 10:30 - 11:30 - Moscone West L3 - Room 3014&lt;br /&gt;+ double session Wednesday 13:00 - 15:00 - Moscone West Floor 3 Overlook 1&lt;br /&gt;&lt;br /&gt;Abstract: Although Oracle provides leading-edge software to build enterprise applications, there’s more to creating productive teams and delivering successful projects than just the tools. The Oracle ADF Enterprise Methodology Group, formed by Oracle Application Development Framework (Oracle ADF) practitioners around the world to fill that gap, considers wider issues such as best practices, maximizing code reuse, optimizing teamwork, and more. In this session, Oracle JDeveloper and Oracle ADF experts, including Oracle staff and Oracle ACEs, talk about such high-level Oracle ADF considerations. The Oracle ADF Enterprise Methodology Group is meeting at Oracle OpenWorld under the banner of the ODTUG Fusion Middleware SIG for 2009.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I hope to see you at OOW!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-3525435927831271134?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/vgwaWBCYzBo" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/vgwaWBCYzBo/my-oow-presentations.html</link><author>noreply@blogger.com (Chris Muir)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/10/my-oow-presentations.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-624150363070835252</guid><pubDate>Mon, 05 Oct 2009 02:55:00 +0000</pubDate><atom:updated>2009-10-05T11:01:05.409+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">WebLogic Server</category><title>Part I - Working with WLS 10.3.1 SQLAuthenticator password algorithms</title><description>WebLogic Server 10.3.1 supports loading user credentials and roles from a number of different sources, such as LDAP or a database, through the concept of "Security Providers".  In order to work with a database table structure a "SQL Authenticator" provider is required.&lt;br /&gt;&lt;br /&gt;Edwin Biemond has a good &lt;a href="http://biemond.blogspot.com/2008/12/using-database-tables-as-authentication.html"&gt;example&lt;/a&gt; of setting up both the database table structures and configuring the WLS SQL Authenticator against these tables.  To keep the example simple, for the password field in the JHS_USERS table Edwin's has set the SQL Authenticator to write raw plain text passwords to the table.  This makes it really easy for demonstration purposes to see what's written to the database.&lt;br /&gt;&lt;br /&gt;To extend Edwin's post, a common requirement will be that:&lt;br /&gt;&lt;br /&gt;a) The password value is written in an encrypted form to the database&lt;br /&gt;b) Other non-WLS applications can generate the same encrypted result such that the encrypted passwords can be compared&lt;br /&gt;&lt;br /&gt;The need for point "a" is obvious, unencrypted password in the database is a security weakness.  But what about "b", why would you want this?&lt;br /&gt;&lt;br /&gt;For many organisations the list of users and roles will be stored in database tables, and that information will be sourced by many different subsystems implemented in different technologies.  It's not uncommon for sites to have Oracle Forms, .Net, JEE (and ADF of course!) applications all relying on the database user tables for their authentication and authorisation information.&lt;br /&gt;&lt;br /&gt;Each of these subsystems would require users to login.  The subsystem would then encrypt the password, retrieve the corresponding password from the database for the identified user, and compare the results.  If they compare, we have a valid user; if the encrypted passwords are different, ring the alarm bells, we have an imposter (or at least make them login again ;-)&lt;br /&gt;&lt;br /&gt;All things would be well with this solution, until you throw in the fact that each subsystem may support different encryption algorithms that would produce different results, effectively failing the encrypted password comparison each time.  It becomes essential therefore that WLS's SQL Authenticator supports different encryption algorithms in order to provide as much flexibility as possible.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Password Settings&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On configuring a SQL Authenticator as per Edwin's example, on accessing the Provider Specific information (from the WLS console select Security Realms -&gt; myrealm -&gt; Providers tab -&gt; your named SQL Authenticator -&gt; Configuration tab -&gt; Provider Specific tab), you'll note the following options that influence the generation of encrypted passwords:&lt;br /&gt;&lt;br /&gt;* &lt;span style="font-weight:bold;"&gt;Plaintext Passwords Enabled&lt;/span&gt; – true/false – relates how passwords are read from the database table.  If true when WLS retrieves the password from the database, and it encounters a non encrypted password, it will undertake a non encrypted comparison between the user's password who is attempting to login against the database retrieved password.  If false, WLS will enforce the database password must be encrypted for it to undertake an encrypted password comparison.&lt;br /&gt;&lt;br /&gt;The question arises, how does WLS know the database password is encrypted?  The answer is derived from the next detailed property Password Style Retained, where WLS when writing a new encrypted password to the database prefixes the encrypted password with the encryption algorithm that was used to encrypt the password.  If it's missing, WLS assumes a plaintext password.&lt;br /&gt;&lt;br /&gt;If the Plaintext Passwords Enabled property is false, one other side effect is if you attempt to set the Password Style property to PLAINTEXT, then update a user's password in the database, WLS will throw an error stating it doesn't support PLAINTEXT passwords:&lt;br /&gt;&lt;br /&gt;[Security:099063]Plaintext password usage was rejected.&lt;br /&gt;&lt;br /&gt;Thanks to Ming at Oracle Support for clarifying this property.&lt;br /&gt;&lt;br /&gt;* &lt;span style="font-weight:bold;"&gt;Password Style Retained&lt;/span&gt; – true/false – the following properties unlike the Plaintext Passwords Enabled property deal with when updating existing user passwords in the database table, not when the password is read.  When WLS writes a password to the table's password field, along with the encrypted text, it prefixes the password with the password algorithm used wrapped in ellipses.  For example if the SHA-1 algorithm is used, the password would look like:&lt;br /&gt;&lt;br /&gt;{SHA-1}W6PH5MM5PZ8GGIULBPGZG37MJ9G=&lt;br /&gt;&lt;br /&gt;If the Password Style Retained property is set to true, and the existing password has a different encryption algorithm to that specified in the Password Algorithm field, WLS will use the latter to update the password.  If Password Style Retained is set to false, regardless, WLS will overwrite the password with that specified in the Password Algorithm field.&lt;br /&gt;&lt;br /&gt;* Password Algorithm – text field – default SHA-1 – as per the WLS documentation this can be any Java Cryptography Extension (JCE).  Questionably what are the allowable values derived from the JCE?  These are listed in the JSE 6.0 Java Cryptography Architecture Standard Algorithm Name &lt;a href="http://java.sun.com/javase/6/docs/technotes/guides/security/StandardNames.html#algspec"&gt;Documentation&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For password generation we want a &lt;a href="http://en.wikipedia.org/wiki/Cryptographic_hash_function"&gt;hash&lt;/a&gt; (aka. message digest or 1-way encryption) algorithm.  From the documentation we find that our options are limited to SHA-1 (the default Password Algorithm value), MD2 and MD5.  &lt;br /&gt;&lt;br /&gt;Note that the JSE documentation states the bit size of the produced message digest (SHA-1 = 160-bit, MD2 = 128-bit, MD5 = 128-bit), which will influence the size of your password field to store the encrypted database value.&lt;br /&gt;&lt;br /&gt;The Password Algorithm can be ignored if the Password Style is PLAINTEXT, or, the Password Style Retained is set to true and the password to be updated does not match the current Password Algorithm's specified function.&lt;br /&gt;&lt;br /&gt;* &lt;span style="font-weight:bold;"&gt;Password Style&lt;/span&gt; – PLAINTEXT, HASHED, SALTEDHASHED – as guessed the PLAINTEXT option will write the unencrypted password to the database.  A value of HASHED implies the Password Algorithm will be used.  SALTEDHASHED also produces encrypted passwords though different from HASHED.  I'm currently unsure of the difference between HASHED and SALTEDHASHED, the WLS documentation doesn't differentiate between them, though it does result in a different encrypted value.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Testing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Assuming you've configured your SQL Authenticator correctly as per Edwin's post, let's test what the different settings of the properties do.&lt;br /&gt;&lt;br /&gt;For our testing let's assume there's always an existing user ALPHA whose password we want to update, as well as new users BETA, CHARLIE and DELTA (and so on) who we want to create with a new password.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;First test&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Plaintext Passwords Enabled = true&lt;br /&gt;Password Style Retained = true&lt;br /&gt;Password Algorithm = SHA-1&lt;br /&gt;Password Style = HASHED&lt;br /&gt;&lt;br /&gt;For the existing user ALPHA the encrypted password doesn't include the algorithm prefix (ie. {SHA-1}), in fact it was created by some other system that doesn't include the prefix.  The ALPHA's password will be updated to "password".&lt;br /&gt;&lt;br /&gt;For a new user BETA the password will be set to "password".&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;First result&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Updated user ALPHA password = "password"&lt;br /&gt;&lt;br /&gt;For the ALPHA users this result occurs because WLS encounters the Plaintext Passwords Enabled set to true, and the original password stored for the ALPHA user is unencrypted (ie. it's missing the algorithm prefix).  WLS therefore decides an update to the password must be a plaintext password update.&lt;br /&gt;&lt;br /&gt;New user BETA password = {SHA-1}W6ph5Mm5Pz8GgiULbPgzG37mj9g=&lt;br /&gt;&lt;br /&gt;In this case the BETA user makes use of the SHA-1 algorithm.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Second test&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Plaintext Passwords Enabled = true&lt;br /&gt;Password Style Retained = false&lt;br /&gt;Password Algorithm = SHA-1&lt;br /&gt;Password Style = HASHED&lt;br /&gt;&lt;br /&gt;Same as the last test, for the existing ALPHA user the encrypted password doesn't include the algorithm prefix (ie. {SHA-1}), in fact it was created by some other system that doesn't include the prefix.  The ALPHA's password will be updated to "password".&lt;br /&gt;&lt;br /&gt;For a new user CHARLIE the password will be set to "password".&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Second result&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Updated user ALPHA password = {SHA-1}W6ph5Mm5Pz8GgiULbPgzG37mj9g=&lt;br /&gt;&lt;br /&gt;New user CHARLIE password = {SHA-1}W6ph5Mm5Pz8GgiULbPgzG37mj9g=&lt;br /&gt;&lt;br /&gt;In this case the Password Style Retained has overwritten the updated user ALPHA's password style with the new SHA-1 algorithm equivalent as the Password Style Retained = false setting removes the original plaintext algorithm – in other words the SHA-1 algorithm takes precedence.  As expected the CHARLIE user's passwords uses the SHA-1 algorithm by default.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Third test&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In this test we'll use the existing SHA-1 user ALPHA SHA-1 password, while switching to the MD2 algorithm, while not retaining passwords styles:&lt;br /&gt;&lt;br /&gt;Plaintext Passwords Enabled = true&lt;br /&gt;Password Style Retained = false&lt;br /&gt;Password Algorithm = MD2&lt;br /&gt;Password Style = HASHED&lt;br /&gt;&lt;br /&gt;Existing ALPHA password = {SHA-1}W6ph5Mm5Pz8GgiULbPgzG37mj9g=&lt;br /&gt;&lt;br /&gt;For a new user DELTA the password will be set to "password".&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Third result&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Existing ALPHA password = {MD2}8DiBqIxuORNfDsxg79YJuQ==&lt;br /&gt;&lt;br /&gt;New user DELTA password = {MD2}8DiBqIxuORNfDsxg79YJuQ==&lt;br /&gt;&lt;br /&gt;As can be seen WLS switches to the MD2 algorithm in both cases as the Password Style Retained = false property enforces this.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Fourth test&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the last test we'll switch back to the SHA-1 algorithm, and attempt to update the ALPHA user's MD2 password to the SHA-1 equivalent asking WLS not to retain the existing password style:&lt;br /&gt;&lt;br /&gt;Plaintext Passwords Enabled = true&lt;br /&gt;Password Style Retained = false&lt;br /&gt;Password Algorithm = SHA-1&lt;br /&gt;Password Style = HASHED&lt;br /&gt;&lt;br /&gt;Existing ALPHA password = {MD2}8DiBqIxuORNfDsxg79YJuQ==&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;Fourth result&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Existing ALPHA password = {SHA-1}W6ph5Mm5Pz8GgiULbPgzG37mj9g=&lt;br /&gt;&lt;br /&gt;As expected the ALPHA user's password is changed from the MD2 to SHA-1 encrypted password, again as the Password Style Retained = false property takes affect.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Conclusion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At this point we've seen how WLS can generate encrypted passwords using different algorithms down to the database.  From here it's important to check the encrypted results in the database are actually "standard".  In other words if a competing technology uses the SHA-1 algorithm to encrypt a password for example, will it see the same encrypted result WLS produced.  This will be addressed in a following post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-624150363070835252?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/20I7__6ktnU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/20I7__6ktnU/part-i-working-with-wls-1031.html</link><author>noreply@blogger.com (Chris Muir)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/10/part-i-working-with-wls-1031.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-5680804158647997916</guid><pubDate>Tue, 29 Sep 2009 05:08:00 +0000</pubDate><atom:updated>2009-09-29T13:27:52.270+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADF Enterprise Methodology Group</category><title>Where real ADF developers meet - OOW09 ADF EMG</title><description>Once again the &lt;a href="http://groups.google.com/group/adf-methodology"&gt;ADF Enterprise Methodology Group&lt;/a&gt; is meeting at &lt;a href="http://www.oracle.com/openworld"&gt;Oracle Open World&lt;/a&gt; to discuss JDeveloper and ADF, and we invite you to join us.  This year &lt;a href="http://www.veriton.co.uk/roller/fmw/"&gt;Simon Haslam&lt;/a&gt; has taken the reins and delivered not 1 but &lt;a href="http://wiki.oracle.com/page/ADF+EMG+Sessions"&gt;3 sessions&lt;/a&gt; at OOW which is an impressive effort.  &lt;br /&gt;&lt;br /&gt;Of particular interest to me is the "Show me yours!" session where ADF experts will be showing their production level ADF applications, essentially JDeveloper applications in the wild!  We encourage you to join us, if not to show and tell, to just hear discussions among ADF experts on what challenges and solutions they're working with each day in the ADF market.&lt;br /&gt;&lt;br /&gt;Can't make OOW this year but really want to attend ADF EMG?  Are you attending the upcoming &lt;a href="http://techandebs.ukoug.org/"&gt;UKOUG&lt;/a&gt; conference instead?  ADF EMG is going international this year, after our success at the ODTUG conference session in the excellent hands of &lt;a href="http://iadvise.blogspot.com/"&gt;Nathalie Roman&lt;/a&gt;, then OOW in October, we're happy to announce we'll be running a session at the UKOUG conference too.  Watch this space for more information soon!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-5680804158647997916?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/GHU5CoBQFxM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/GHU5CoBQFxM/where-real-adf-developers-meet-oow09.html</link><author>noreply@blogger.com (Chris Muir)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/09/where-real-adf-developers-meet-oow09.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-1333865049596122052</guid><pubDate>Tue, 22 Sep 2009 13:21:00 +0000</pubDate><atom:updated>2009-09-22T21:34:43.253+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SAGE Computing Services</category><title>Blatant advert: Yes, we still do Oracle Forms development and training</title><description>Blatant plug for &lt;a href="http://www.sagecomputing.com.au"&gt;SAGE Computing Services&lt;/a&gt;.  Avert your eyes now if you're not interested in the advert.&lt;br /&gt;&lt;br /&gt;I was again asked today by a fellow Oracle professional, as we at SAGE present and blog on the latest JDeveloper and APEX technologies among others, does that mean we've dropped Oracle Forms development and teaching our Oracle Forms training course in Australia altogether?&lt;br /&gt;&lt;br /&gt;Not at all.  Oracle Forms is still a primary area of development for us and many of our customers, and our Oracle Forms training course has been updated every version since 4.5 to 10g, and soon to be Oracle Forms 11g.  While our staff have interest in newer technologies, Forms will remain a skillset we'll maintain into the future, as Forms is pivotal to the success of our clients.&lt;br /&gt;&lt;br /&gt;Our Oracle Forms training course, as long as our other Australian Oracle training courses can be found on our &lt;a href="http://www.sagecomputing.com.au/oracle_training_australia.html"&gt;website&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-1333865049596122052?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/MBUnskxdW0U" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/MBUnskxdW0U/blatant-advert-yes-we-still-do-oracle.html</link><author>noreply@blogger.com (Chris Muir)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/09/blatant-advert-yes-we-still-do-oracle.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-7208138000885452388</guid><pubDate>Tue, 22 Sep 2009 02:44:00 +0000</pubDate><atom:updated>2009-09-22T10:52:49.420+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SAGE Computing Services</category><title>Another Aussie Oracle blogger - Scott Wesley</title><description>Did I already post/tweet/email about Scott and his blog somewhere?  I forgot.  In the rush up to Oracle Open World, and moving house, I'm losing track big time of what I've done and haven't done.  If I turn up to OOW without any pants you'll know why.&lt;br /&gt;&lt;br /&gt;Anyhow, Scott Wesley, a fellow &lt;a href="http://www.sagecomputing.com.au/"&gt;SAGE-ite&lt;/a&gt;, has taken up the Oracle blog reins, and can be found at &lt;a href="http://triangle-circle-square.blogspot.com/"&gt;Triangle Circle Square&lt;/a&gt;.  Scott's one of the team's ninja consultants and Oracle trainers, defender of all things Oracle, except JDeveloper it seems, which makes me highly suspicious.  Scott's current blog focus is SQL features, which seems oh-so-persistant-store-to-me.  However I'm sure the SQL keen among you will enjoy his posts.&lt;br /&gt;&lt;br /&gt;For the user groups out there, like much of the SAGE team, Scott is happy to present to your members.  Drop us an email to arrange.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-7208138000885452388?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/xn2VRI8rGp8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/xn2VRI8rGp8/another-aussie-oracle-blogger-scott.html</link><author>noreply@blogger.com (Chris Muir)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/09/another-aussie-oracle-blogger-scott.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-7659683152307350793</guid><pubDate>Fri, 11 Sep 2009 02:39:00 +0000</pubDate><atom:updated>2009-09-11T10:45:07.609+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Security</category><category domain="http://www.blogger.com/atom/ns#">WebLogic Server</category><title>WebLogic Server - identity vs trust keystores</title><description>In computing most technologies have lots of terms and acronyms to learn, it's par for the course, you get used to it.  However in computer security the frustration is multiplied as there are often many different terms that mean the same thing.  It makes implementing security hard, because understanding it is hard, and I'm not surprised why security is considered badly implemented because the average Joe will struggle (and for the record I'm the average Chris so I struggle too ;-).&lt;br /&gt;&lt;br /&gt;I've been trying recently to get straight in my head what is stored in the WLS identity and trust keystores, and what the difference between identity and trust is anyhow.  Thanks to kind assistance from &lt;a href="http://kingsfleet.blogspot.com/"&gt;Gerard Davison&lt;/a&gt;, I think I can now post my understandings, and as usual, hopefully the post is helpful to other readers.  As noted however security to me is a difficult area, and so be sure to check the facts here, your mileage with this post may vary.&lt;br /&gt;&lt;br /&gt;The following WLS documentation attempts to explain the concepts of identity and trust:&lt;br /&gt;&lt;a href=" http://download.oracle.com/docs/cd/E12839_01/web.1111/e13707/identity_trust.htm#i1170342"&gt;&lt;br /&gt;http://download.oracle.com/docs/cd/E12839_01/web.1111/e13707/identity_trust.htm#i1170342&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;...in ripping out one of the core paragraphs, with a slight rewrite of my own we can see the concept of identity, and how it relates to the public and private keys:&lt;br /&gt;&lt;br /&gt;"The public key is embedded in a digital certificate with additional information describing the owner of the public key, such as name, street address, and e-mail address *as well as the hostname*. *Along with this the digital certificate containing the public key, and the separate related private key, provide identity for the server*."&lt;br /&gt;&lt;br /&gt;...ultimately to identify the server, to assert the server is who the server says it is.&lt;br /&gt;&lt;br /&gt;The digital certificate containing the public key is also referred to as the "server certificate", as for example in 1-way-SSL traffic between the server and client, the server certificate containing the public key is what is initially passed to the client.&lt;br /&gt;&lt;br /&gt;There is a missing piece in the puzzle.  Regardless that the digital certificate states the owner of the public key, their name and so on, how does a client know that the "identity" asserted by the digital certificate is true?  That's where Certificate Authorities (CAs) come in. &lt;br /&gt;&lt;br /&gt;Ignoring self signed digital certificates, a typical digital certificate used on the internet containing the public key and owner details is signed by a trusted CA who has verified the identity of the owner.  Presumably when purchasing digital certificates from CAs, this is what some of the cost covers, the CAs research into ensuring that the identity details embedded in the digital cert are actually true.&lt;br /&gt;&lt;br /&gt;At runtime on receiving the digital certificate, the client checks the CA and if the CA is one that the client trusts (or a CA in a chain of trusted CAs), then the identity of the server is established/verified.&lt;br /&gt;&lt;br /&gt;Thus the "identity" of the server is established by what's stored in the "identity" keystore, and its contents are what are farmed out to clients establishing secure connections with the server, who then verify the supplied digital certificate's CA against the clients own list of trusted CAs.  The "identity keystore" is also referred to as the "server keystore", because it establishes the server's identity (ie. I am who I say I am). &lt;br /&gt;&lt;br /&gt;WLS side note: As mentioned the digital certificate also includes the host name of the server, or in other words the digital certificate is pegged to that server and that server alone.  This implies on that server with its relating digital certificate, *all* of the applications will share that single digital certificate for secure communications.  Occasionally a requirement will arise where each application must have its own digital certificate.  In WLS because keystores are configured under an individual WLS "managed server", if you have two separate applications, it is not possible to use separate digital certificates for each in one managed server.  The solution is to create another managed server with its own keystores.  &lt;br /&gt;&lt;br /&gt;WLS web service side note: Following on from the previous side note, for web services that use in-message encryption and digital signatures, there is often the requirement for multiple different digital certificates.  Under WLS to provision the WS-Security model, WLS has a separate Web Service Security Configuration (WSSC) to provision this setup.&lt;br /&gt;&lt;br /&gt;Finally regarding the trust keystore, what is its job in all of this?  The trust keystore is typically used for storing CA digital certificates, essentially the CAs who will be used to check any digital certificates that are given to the server at runtime (just the same as the client did above).  In the standard 1-way-SSL between a client and the WLS server, the trust keystore doesn't come into the equation as the client has its own trust keystore (containing the CAs) and the server has nothing to verify.  Yet in the case of mutual SSL (aka. 2 way SSL) between the client and server, the client and server actually swap each other digital certificates to establish identity of both parties, and in this case the server must be able to test the identity of the client through the CA of the client's digital certificate.&lt;br /&gt;&lt;br /&gt;Mutual SSL side note: the setup of mutual SSL is more complicated than this.  Readers are advised to refer to the following Oracle &lt;a href="http://www.oracle.com/technology/pub/articles/damo-howto.html"&gt;article&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Final author's note: if any readers find anything particularly wrong with the ideas presented in this post I'd be keen to hear them please.  As I've really only experience with 1-way-SSL, it's hard to know if what I've said applies to the concepts of mutual SSL and other security configurations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-7659683152307350793?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/E0uIN0OIr48" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/E0uIN0OIr48/weblogic-server-identity-vs-trust.html</link><author>noreply@blogger.com (Chris Muir)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/09/weblogic-server-identity-vs-trust.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-7150502317199297318</guid><pubDate>Wed, 02 Sep 2009 06:35:00 +0000</pubDate><atom:updated>2009-09-02T14:56:49.680+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADF Faces RC</category><category domain="http://www.blogger.com/atom/ns#">JDeveloper</category><title>JDev 11gR1 - af:tree mashup – using hierarchical tables and drag n drop</title><description>This blog post demonstrates creating an ADF Faces RC af:tree component that sources its data from a hierarchical database table, and supports drag n drop of the nodes.&lt;br /&gt;&lt;br /&gt;Both these topics have been discussed and demonstrated by other excellent bloggers, the core of this post is to bring both concepts together, with my usual own proof of concept documentation that may be useful to readers.&lt;br /&gt;&lt;br /&gt;The ADF Faces RC support for hierarchical data sources was defined by &lt;a href="http://cbhavsar.blogspot.com/2008/09/declarative-databinding-for-lazy.html"&gt;Chandu Bhavsar&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The drag and drop support for af:trees was documented by &lt;a href="http://technology.amis.nl/blog/3302/dropping-trees"&gt;Luc Bors&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;(Definitely the kudos for this post must go to both Chandu and Luc for their posts that sparked the inspiration for mine)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Data model&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In this example we'll use the following table:&lt;pre name="code" class="sql"&gt;CREATE TABLE organisations&lt;br /&gt;(org_id        NUMBER(4,0)  NOT NULL&lt;br /&gt;,parent_org_id NUMBER(4,0)&lt;br /&gt;,name          VARCHAR2(35) NOT NULL&lt;br /&gt;,CONSTRAINT org_pk PRIMARY KEY (org_id)&lt;br /&gt;,CONSTRAINT org_parent_fk&lt;br /&gt; FOREIGN KEY (parent_org_id)&lt;br /&gt; REFERENCES organisations (org_id));&lt;/pre&gt;Note the FK between the table and itself, essentially modelling that an organisation has sub-organisations (or agencies).&lt;br /&gt;&lt;br /&gt;The data:&lt;pre name="code" class="sql"&gt;ORG_ID  PARENT_ORG_ID  NAME&lt;br /&gt;------  -------------  -------------------------------&lt;br /&gt;1000    (null)         Sage Computing Services&lt;br /&gt;1010    1000           Training Division&lt;br /&gt;1030    1010           Self Study Program&lt;br /&gt;1040    1010           Classroom Training&lt;br /&gt;2264    (null)         Australian Medical Systems&lt;br /&gt;3210    (null)         Conservation Society&lt;br /&gt;3214    3210           Forests Division&lt;br /&gt;3216    3210           Rivers Division&lt;br /&gt;4394    (null)         Newface cosmetics&lt;br /&gt;3842    (null)         Institute of Business Services&lt;br /&gt;3843    3842           Marketing Services&lt;br /&gt;3844    3842           Financial Services&lt;/pre&gt;&lt;span style="font-weight:bold;"&gt;Hierarchical af:tree&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This details the steps to setup an ADF BC layer and ADF Faces RC bindings to support the af:tree with hierachical data from the organisations table, as previously described in Chandu Bhavsar &lt;a href="http://cbhavsar.blogspot.com/2008/09/declarative-databinding-for-lazy.html"&gt;post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Note the following steps are well documented on Chandu's post, though you will find slightly more detail on creating the correct bindings below:&lt;br /&gt;&lt;br /&gt;1) Create a Fusion Web App with an ADF BC Model project and ADF Faces RC ViewController.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Model project&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2) In the Model project create an empty Application Module (AM)&lt;br /&gt;&lt;br /&gt;3) Create an Entity Object (EO) based on your organisations table in the database.&lt;br /&gt;&lt;br /&gt;4) Create two View Objects (VO) based off the same EM.  Name the first ParentOrgView and the second LeafOrgView.&lt;br /&gt;&lt;br /&gt;5) Modify the ParentOrgView query as follows:&lt;pre name="code" class="sql"&gt;SELECT Organisations.ORG_ID, &lt;br /&gt;       Organisations.PARENT_ORG_ID, &lt;br /&gt;       Organisations.NAME&lt;br /&gt;FROM ORGANISATIONS Organisations&lt;br /&gt;WHERE Organisations.PARENT_ORG_ID IS NULL&lt;/pre&gt;6) You don't need to modify the LeafOrgView query.  For completeness it's described as follows:&lt;pre name="code" class="sql"&gt;SELECT Organisations.ORG_ID, &lt;br /&gt;       Organisations.PARENT_ORG_ID, &lt;br /&gt;       Organisations.NAME&lt;br /&gt;FROM ORGANISATIONS Organisations&lt;/pre&gt;7) Create a VO Link between the ParentOrgView and LeafOrgView as follows:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5hhNK2aXwp8/Sp4T5rrPvVI/AAAAAAAAA1I/3He0n26PTAk/s1600-h/adftreepic1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="http://2.bp.blogspot.com/_5hhNK2aXwp8/Sp4T5rrPvVI/AAAAAAAAA1I/3He0n26PTAk/s400/adftreepic1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5376756886824533330" /&gt;&lt;/a&gt;Essentially:&lt;br /&gt;&lt;br /&gt;ParentOrgView.OrgId = LeafOrgView.ParentOrgId&lt;br /&gt;&lt;br /&gt;8) Create a second VO Link between the LeafOrgView to itself as follows:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/Sp4T6Az-DOI/AAAAAAAAA1Q/481_ANDdye0/s1600-h/adftreepic2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/Sp4T6Az-DOI/AAAAAAAAA1Q/481_ANDdye0/s400/adftreepic2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5376756892498267362" /&gt;&lt;/a&gt;Essentially:&lt;br /&gt;&lt;br /&gt;LeafOrgView (source).OrgId = LeafOrgView (dest).ParentOrgId&lt;br /&gt;&lt;br /&gt;9) Externalize the VOs through the AM using the following model:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4T6kj9rvI/AAAAAAAAA1Y/uHL1L8Xz3xo/s1600-h/adftreepic3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 227px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4T6kj9rvI/AAAAAAAAA1Y/uHL1L8Xz3xo/s400/adftreepic3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5376756902094810866" /&gt;&lt;/a&gt;Essentially:&lt;br /&gt;&lt;br /&gt;ParentOrgView1&lt;br /&gt;- LeafOrgView1&lt;br /&gt;- - LeafOrgView2&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;ViewController project&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;10) In your ViewController project create a new blank JSF page called treeMashupDemo.jspx.&lt;br /&gt;&lt;br /&gt;11) From the Data Control Palette drag the ParentOrgView onto the page as a tree.  In the Edit Tree Binding you should see the following:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4T68xQIqI/AAAAAAAAA1g/I1LwS-5R32I/s1600-h/adftreepic4.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 357px; height: 400px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4T68xQIqI/AAAAAAAAA1g/I1LwS-5R32I/s400/adftreepic4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5376756908592997026" /&gt;&lt;/a&gt;Note the first level of the tree has been defined as model.ParentOrgView.&lt;br /&gt;&lt;br /&gt;12) For clarity when testing later, ensure both the OrgId and Name are included in the Display Attributes.&lt;br /&gt;&lt;br /&gt;13) With the model.ParentOrgView node selected in the Tree Level Rules, select the green plus (+) button and select LeafOrgView:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4T7RJuIpI/AAAAAAAAA1o/6zYfNqAEFHs/s1600-h/adftreepic5.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 357px; height: 400px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4T7RJuIpI/AAAAAAAAA1o/6zYfNqAEFHs/s400/adftreepic5.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5376756914064335506" /&gt;&lt;/a&gt;&lt;br /&gt;14) With the LeafOrgView node selected in the Tree Level Rules, ensure both the OrgId and Name are included in the Display Attributes.&lt;br /&gt;&lt;br /&gt;15) Again with the LeafOrgView node selected in the Tree Level Rules, again select the green plus (+) button, and select LeafOrgView__2:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5hhNK2aXwp8/Sp4UZoniQqI/AAAAAAAAA1w/iFc5rxWfOkw/s1600-h/adftreepic6.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 357px; height: 400px;" src="http://1.bp.blogspot.com/_5hhNK2aXwp8/Sp4UZoniQqI/AAAAAAAAA1w/iFc5rxWfOkw/s400/adftreepic6.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5376757435759477410" /&gt;&lt;/a&gt;Note how the Tree Level Rules only has 2 nodes, but to the right of each node is the child of the current node.  Of specific interest in the hierarchical relationship between LeafOrgView and LeafOrgView__2.&lt;br /&gt;&lt;br /&gt;16) For reference the JSF af:tree code is as follows:&lt;pre name="code" class="xml"&gt;&lt;af:tree value="#{bindings.ParentOrgView1.treeModel}"&lt;br /&gt;         var="node"&lt;br /&gt;         selectionListener="#{bindings.ParentOrgView1.treeModel.makeCurrent}" &lt;br /&gt;         rowSelection="single"&lt;br /&gt;         id="t1"&gt;&lt;br /&gt;  &lt;f:facet name="nodeStamp"&gt;&lt;br /&gt;    &lt;af:outputText value="#{node}" id="ot1"/&gt;&lt;br /&gt;  &lt;/f:facet&gt;&lt;br /&gt;&lt;/af:tree&gt;&lt;/pre&gt;...the bindings look as follows:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4UZwhUIMI/AAAAAAAAA14/WZ0PgSUJu0I/s1600-h/adftreepic7.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 129px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4UZwhUIMI/AAAAAAAAA14/WZ0PgSUJu0I/s400/adftreepic7.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5376757437880869058" /&gt;&lt;/a&gt;..and the page def XML file as follows:&lt;pre name="code" class="xml"&gt;&lt;?xml version="1.0" encoding="UTF-8" ?&gt;&lt;br /&gt;&lt;pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel" version="11.1.1.54.7" id="treeMashupDemoPageDef"&lt;br /&gt;                Package="view.pageDefs"&gt;&lt;br /&gt;  &lt;parameters/&gt;&lt;br /&gt;  &lt;executables&gt;&lt;br /&gt;    &lt;variableIterator id="variables"/&gt;&lt;br /&gt;    &lt;iterator Binds="ParentOrgView1" RangeSize="25" DataControl="AppModuleDataControl" id="ParentOrgView1Iterator"/&gt;&lt;br /&gt;  &lt;/executables&gt;&lt;br /&gt;  &lt;bindings&gt;&lt;br /&gt;    &lt;tree IterBinding="ParentOrgView1Iterator" id="ParentOrgView1"&gt;&lt;br /&gt;      &lt;nodeDefinition DefName="model.ParentOrgView" Name="ParentOrgView10"&gt;&lt;br /&gt;        &lt;AttrNames&gt;&lt;br /&gt;          &lt;Item Value="OrgId"/&gt;&lt;br /&gt;          &lt;Item Value="Name"/&gt;&lt;br /&gt;        &lt;/AttrNames&gt;&lt;br /&gt;        &lt;Accessors&gt;&lt;br /&gt;          &lt;Item Value="LeafOrgView"/&gt;&lt;br /&gt;        &lt;/Accessors&gt;&lt;br /&gt;      &lt;/nodeDefinition&gt;&lt;br /&gt;      &lt;nodeDefinition DefName="model.LeafOrgView" Name="ParentOrgView11"&gt;&lt;br /&gt;        &lt;AttrNames&gt;&lt;br /&gt;          &lt;Item Value="OrgId"/&gt;&lt;br /&gt;          &lt;Item Value="Name"/&gt;&lt;br /&gt;        &lt;/AttrNames&gt;&lt;br /&gt;        &lt;Accessors&gt;&lt;br /&gt;          &lt;Item Value="LeafOrgView_2"/&gt;&lt;br /&gt;        &lt;/Accessors&gt;&lt;br /&gt;      &lt;/nodeDefinition&gt;&lt;br /&gt;    &lt;/tree&gt;&lt;br /&gt;  &lt;/bindings&gt;&lt;br /&gt;&lt;/pageDefinition&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Testing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On running our web page we see the following:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5hhNK2aXwp8/Sp4UaeYDJAI/AAAAAAAAA2A/Zylhs-6Km-4/s1600-h/adftreepic8.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 268px; height: 281px;" src="http://1.bp.blogspot.com/_5hhNK2aXwp8/Sp4UaeYDJAI/AAAAAAAAA2A/Zylhs-6Km-4/s400/adftreepic8.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5376757450190038018" /&gt;&lt;/a&gt;Note that the tree is happily showing the hierarchical data based on our tree bindings.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Adding drag n drop to the tree&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The next set of functionality we wish to add is the ability to drag and drop nodes, or in our case organisations, in the tree.  This involves adding support for drag n drop to the tree, as well as behind the scenes updating the dropped organisation's parent_org_id  to that of the org_id of the organisation the original was dropped on.&lt;br /&gt;&lt;br /&gt;The inspiration of this section comes from Luc Bors blog &lt;a href="http://technology.amis.nl/blog/3302/dropping-trees"&gt;post&lt;/a&gt;, with slight difference in mine some of the supporting code is further spelt out:&lt;br /&gt;&lt;br /&gt;1) As a reminder at the moment our af:tree code looks as follows:&lt;pre name="code" class="xml"&gt;&lt;af:tree value="#{bindings.ParentOrgView1.treeModel}"&lt;br /&gt;         var="node"&lt;br /&gt;         selectionListener="#{bindings.ParentOrgView1.treeModel.makeCurrent}" &lt;br /&gt;         rowSelection="single"&lt;br /&gt;         id="t1"&gt;&lt;br /&gt;  &lt;f:facet name="nodeStamp"&gt;&lt;br /&gt;    &lt;af:outputText value="#{node}" id="ot1"/&gt;&lt;br /&gt;  &lt;/f:facet&gt;&lt;br /&gt;&lt;/af:tree&gt;&lt;/pre&gt;2) We then introduce a collectionDragSource and a collectionDropTarget to support the drag and drop within the tree:&lt;pre name="code" class="xml"&gt;&lt;af:tree value="#{bindings.ParentOrgView1.treeModel}"&lt;br /&gt;         var="node"&lt;br /&gt;         selectionListener="#{bindings.ParentOrgView1.treeModel.makeCurrent}" &lt;br /&gt;         rowSelection="single"&lt;br /&gt;         id="t1"&gt;&lt;br /&gt;  &lt;af:collectionDragSource actions="MOVE" &lt;br /&gt;                           modelName="DnDOrganisations"/&gt;&lt;br /&gt;  &lt;af:collectionDropTarget actions="MOVE" &lt;br /&gt;                           modelName="DnDOrganisations" &lt;br /&gt;                           dropListener="#{treeBean.dragAndDrop}"/&gt;&lt;br /&gt;  &lt;f:facet name="nodeStamp"&gt;&lt;br /&gt;    &lt;af:outputText value="#{node}" id="ot1"/&gt;&lt;br /&gt;  &lt;/f:facet&gt;&lt;br /&gt;&lt;/af:tree&gt;&lt;/pre&gt;Note both support the MOVE action, they both specify a matching modelName DnDOrganisations, and finally the dropListener maps to a backing bean method we'll define in a moment.  It's essential the modelName's match including the case of the name, and we'll be referring to this in the dragAndDrop backing bean treeBean method in a moment.&lt;br /&gt;&lt;br /&gt;3) In your adfc-config.xml file declare a bean treeBean of class view.TreeBean:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/Sp4Ua3In7nI/AAAAAAAAA2I/_PW7pyU9-wc/s1600-h/adftreepic9.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 164px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/Sp4Ua3In7nI/AAAAAAAAA2I/_PW7pyU9-wc/s400/adftreepic9.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5376757456836226674" /&gt;&lt;/a&gt;&lt;br /&gt;4) And create a Java class TreeBean in your view package within the ViewController project.&lt;pre name="code" class="java"&gt;package view;&lt;br /&gt;&lt;br /&gt;public class TreeBean {&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;The real work for drag and drop is done in the backing bean method.  However in order for the code to work there are a couple of items we need to configure in the Model project:&lt;br /&gt;&lt;br /&gt;5) Create an AppModuleImpl for the AM&lt;br /&gt;&lt;br /&gt;6) Create a LeafOrgViewImpl for the VO &lt;br /&gt;&lt;br /&gt;7) Create a LeafOrgViewRowImpl for the VO and ensure to include the accessors&lt;br /&gt;&lt;br /&gt;8) In the AM expose the LeafOrgView VO one more time as its own node (not a child), and call the usage LeafOrgViewAll as follows:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4UbPovzGI/AAAAAAAAA2Q/SvSwAYj51jk/s1600-h/adftreepic10.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 251px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4UbPovzGI/AAAAAAAAA2Q/SvSwAYj51jk/s400/adftreepic10.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5376757463413410914" /&gt;&lt;/a&gt;&lt;br /&gt;9) Finally the dragAndDrop code is as follows.  Note the code includes inline documentation comments that explains what is occurring:&lt;pre name="code" class="java"&gt;package view;&lt;br /&gt;&lt;br /&gt;import model.AppModuleImpl;&lt;br /&gt;import model.LeafOrgViewImpl;&lt;br /&gt;import model.LeafOrgViewRowImpl;&lt;br /&gt;import model.ParentOrgViewRowImpl;&lt;br /&gt;import oracle.adf.model.BindingContext;&lt;br /&gt;import oracle.adf.view.rich.component.rich.data.RichTree;&lt;br /&gt;import oracle.adf.view.rich.datatransfer.DataFlavor;&lt;br /&gt;import oracle.adf.view.rich.datatransfer.Transferable;&lt;br /&gt;import oracle.adf.view.rich.dnd.DnDAction;&lt;br /&gt;import oracle.adf.view.rich.event.DropEvent;&lt;br /&gt;import oracle.adfinternal.view.faces.model.binding.FacesCtrlHierNodeBinding;&lt;br /&gt;import oracle.jbo.Key;&lt;br /&gt;import oracle.jbo.uicli.binding.JUCtrlHierNodeBinding;&lt;br /&gt;import org.apache.myfaces.trinidad.model.CollectionModel;&lt;br /&gt;import org.apache.myfaces.trinidad.model.RowKeySet;&lt;br /&gt;&lt;br /&gt;public class TreeBean {&lt;br /&gt;  &lt;br /&gt;  public DnDAction dragAndDrop(DropEvent dropEvent) {&lt;br /&gt;    // The default action - do nothing&lt;br /&gt;    DnDAction result = DnDAction.NONE;&lt;br /&gt;&lt;br /&gt;    // Represents the object that was dropped    &lt;br /&gt;    Transferable draggedTransferObject = dropEvent.getTransferable();&lt;br /&gt;    &lt;br /&gt;    // The data in the draggedTransferObject "Transferrable" object is the row key for the dragged component.&lt;br /&gt;    // Note how the DnDOrganisations value in the call to getDataFlavor() matches the collectionDragSource&lt;br /&gt;    // and collectionDropTarget tags model attributes in our page.  It's essential the strings exactly match.&lt;br /&gt;    DataFlavor&lt;RowKeySet&gt; draggedRowKeySetFlavor = DataFlavor.getDataFlavor(RowKeySet.class, "DnDOrganisations");&lt;br /&gt;    RowKeySet draggedRowKeySet = draggedTransferObject.getData(draggedRowKeySetFlavor);&lt;br /&gt;       &lt;br /&gt;    if (draggedRowKeySet != null) {&lt;br /&gt;      // We grab the tree's data model, essentially the CollectionModel that stores the complete tree of nodes&lt;br /&gt;      CollectionModel treeModel = draggedTransferObject.getData(CollectionModel.class);&lt;br /&gt;       &lt;br /&gt;      // Ask the collection model to set the current row/node to that of the transferrable object that was dropped&lt;br /&gt;      Object draggedKey = draggedRowKeySet.iterator().next();&lt;br /&gt;      treeModel.setRowKey(draggedKey);&lt;br /&gt;    &lt;br /&gt;      // Grab that current row (thanks to the last statements work) and get the row's OrgId. It's essential the&lt;br /&gt;      // OrgId is one of the displayed attributes in the tree binding.&lt;br /&gt;      FacesCtrlHierNodeBinding draggedTreeNode =  (FacesCtrlHierNodeBinding)treeModel.getRowData();      &lt;br /&gt;      oracle.jbo.domain.Number draggedTreeNodeId = (oracle.jbo.domain.Number)draggedTreeNode.getAttribute("OrgId");&lt;br /&gt;&lt;br /&gt;      // The dropEvent carries the target/location's row key where the dropped organisations was dropped&lt;br /&gt;      Object serverRowKey = dropEvent.getDropSite();&lt;br /&gt;      RichTree richTree = (RichTree)dropEvent.getDropComponent();&lt;br /&gt;      // This time we use the tree itself to make it's current row that of the server row key (ie. the destination)&lt;br /&gt;      richTree.setRowKey(serverRowKey);&lt;br /&gt;      // And we retrieve that row's index&lt;br /&gt;      int rowIndex = richTree.getRowIndex();&lt;br /&gt;&lt;br /&gt;      // The rich tree based on the index allows us to retrieve that current row/organisation's OrgId&lt;br /&gt;      oracle.jbo.domain.Number targetNodeId = (oracle.jbo.domain.Number)((JUCtrlHierNodeBinding)richTree.getRowData(rowIndex)).getAttribute("OrgId");&lt;br /&gt;      &lt;br /&gt;      // At this point we now have the OrgId of the dropped organisation (draggedTreeNodeId) and the OrgId of the&lt;br /&gt;      // organisation that is the target.  From here we simply want to update the dropped organisations' ParentOrgId&lt;br /&gt;      // to the OrgId of the target.  This is best done through the model layer.&lt;br /&gt;      //&lt;br /&gt;      // Normally this would be best done by fetching the appropriate iterator bindings and making the changes through&lt;br /&gt;      // the bindings.  However in this case the tree doesn't expose any iterator for the leaf nodes, so we need to&lt;br /&gt;      // resort to retrieve the Model project's objects and do the work ourself.&lt;br /&gt;      &lt;br /&gt;      // Retrieve the AM and then a handle on the LeafOrgViewAll - this gives us access to all rows regardless of&lt;br /&gt;      // where they exist in the hierarchy&lt;br /&gt;      AppModuleImpl am = (AppModuleImpl)BindingContext.getCurrent().getDefaultDataControl().getApplicationModule();&lt;br /&gt;      LeafOrgViewImpl leafOrgView = (LeafOrgViewImpl)am.getLeafOrgViewAll();&lt;br /&gt;      &lt;br /&gt;      // Given the dragged organisation's OrgId, construct a key object, and then retrieve that row from the VO using&lt;br /&gt;      // the key&lt;br /&gt;      Object[] nodeObjectKey = new Object[] {draggedTreeNodeId};&lt;br /&gt;      Key nodeKey = new Key(nodeObjectKey);&lt;br /&gt;      LeafOrgViewRowImpl nodeRow = (LeafOrgViewRowImpl)leafOrgView.getRow(nodeKey);&lt;br /&gt;&lt;br /&gt;      // See below&lt;br /&gt;      boolean parentNode = nodeRow.getParentOrgId() == null;&lt;br /&gt;      &lt;br /&gt;      // Finally update that organisaiton's ParentOrgId to that of the target organisation's OrgId&lt;br /&gt;      nodeRow.setParentOrgId(targetNodeId);&lt;br /&gt;&lt;br /&gt;      // And commit the changes – obviously this has side effects on any other uncommitted data, be careful&lt;br /&gt;      am.getDBTransaction().commit();&lt;br /&gt;      &lt;br /&gt;      // If we've moved a parent node to become a leaf, we need to force the parent VO to requery itself to correctly&lt;br /&gt;      // reflect the data change.  This is destructive on the current expand/collapsed state of the tree.&lt;br /&gt;      // I'm not overly sure of a solution for this; maybe a reader can suggest one.&lt;br /&gt;      if (parentNode) {      &lt;br /&gt;        am.getParentOrgView1().clearCache();&lt;br /&gt;        am.getParentOrgView1().executeQuery();&lt;br /&gt;      }&lt;br /&gt;      &lt;br /&gt;      // Indicate to the dragEvent that the operation was succesful and visually the move should occur in the tree&lt;br /&gt;      result = DnDAction.MOVE;&lt;br /&gt;    }&lt;br /&gt;    return result;&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;You'll note in the code I take pains to mention it's essential the OrgId is one of the displayed attributes for the tree.  If you fail to supply this the routine has no OrgId attribute to fetch the OrgId value from.&lt;br /&gt; &lt;br /&gt;This does pose a problem, because while during testing it's fine to show the OrgId and Name of the organisations in the tree, for production we might not want to show these meaningless internal ID numbers to the user.  The simple fix for this is to return to the af:tree and update the af:outputText component who is responsible for what values to show for each node in the tree, changing the EL expression from #{code} to #{code.Name}:&lt;pre name="code" class="xml"&gt;&lt;af:tree value="#{bindings.ParentOrgView1.treeModel}"&lt;br /&gt;         var="node"&lt;br /&gt;         selectionListener="#{bindings.ParentOrgView1.treeModel.makeCurrent}" &lt;br /&gt;         rowSelection="single"&lt;br /&gt;         id="t1"&gt;&lt;br /&gt;  &lt;af:collectionDragSource actions="MOVE" &lt;br /&gt;                           modelName="DnDOrganisations"/&gt;&lt;br /&gt;  &lt;af:collectionDropTarget actions="MOVE" &lt;br /&gt;                           modelName="DnDOrganisations" &lt;br /&gt;                           dropListener="#{treeBean.dragAndDrop}"/&gt;&lt;br /&gt;  &lt;f:facet name="nodeStamp"&gt;&lt;br /&gt;    &lt;af:outputText value="#{node.Name}" id="ot1"/&gt;&lt;br /&gt;  &lt;/f:facet&gt;&lt;br /&gt;&lt;/af:tree&gt;&lt;/pre&gt;This ensures only the name attribute is displayed:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4Uy4f0CTI/AAAAAAAAA2Y/jBFLhLvCVng/s1600-h/adftreepic11.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 224px; height: 281px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4Uy4f0CTI/AAAAAAAAA2Y/jBFLhLvCVng/s400/adftreepic11.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5376757869518784818" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-7150502317199297318?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/iFnPrKdfaVw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/iFnPrKdfaVw/jdev-11gr1-aftree-mashup-using.html</link><author>noreply@blogger.com (Chris Muir)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_5hhNK2aXwp8/Sp4T5rrPvVI/AAAAAAAAA1I/3He0n26PTAk/s72-c/adftreepic1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/09/jdev-11gr1-aftree-mashup-using.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-1148435216553675620</guid><pubDate>Mon, 24 Aug 2009 23:59:00 +0000</pubDate><atom:updated>2009-08-25T08:00:44.797+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">WebLogic Server</category><category domain="http://www.blogger.com/atom/ns#">JDeveloper</category><title>Are your libraries targeted to the correct WLS managed server?</title><description>Recently we upgraded our Oracle WebLogic Server's from 10.3 to 10.3.1, and coincidentally migrated a JDeveloper ADF application 11g to 11gR1.  ADF applications require a set of libraries that must be deployed to WLS before the ADF application can run, of which we completed successfully, or so we thought.  This post documents a little trap for new players when configuring WLS and deployed applications.&lt;br /&gt;&lt;br /&gt;On deploying our upgraded ADF 11gR1 application to our WLS 10.3.1 server with the updated ADF libraries, we hit an error on deployment from JDev.  The logs showed the following results:&lt;pre name="code" class="xml"&gt;[08:54:26 AM] ----  Deployment started.  ----&lt;br /&gt;[08:54:26 AM] Target platform is  (Weblogic 10.3).&lt;br /&gt;[08:54:39 AM] Entering Target Selection Dialog&lt;br /&gt;[08:54:55 AM] Retrieving existing application information&lt;br /&gt;[08:54:55 AM] Running dependency analysis...&lt;br /&gt;[08:54:55 AM] Building...&lt;br /&gt;[08:54:59 AM] Deploying 4 profiles...&lt;br /&gt;[08:54:59 AM] Wrote Archive Module to C:\JDeveloper\mywork\CR123\trunk\CommonViewController\deploy\CommonViewController.jar&lt;br /&gt;[08:54:59 AM] Wrote Archive Module to C:\JDeveloper\mywork\CR123\trunk\CommonModel\deploy\CommonModel.jar&lt;br /&gt;[08:54:59 AM] Wrote Web Application Module to C:\JDeveloper\mywork\CR123\trunk\ViewController\deploy\App_ViewController.war&lt;br /&gt;[08:55:00 AM] Wrote Enterprise Application Module to C:\JDeveloper\mywork\CR123\trunk\deploy\App_application1.ear&lt;br /&gt;[08:55:04 AM] Deploying Application...&lt;br /&gt;[08:55:06 AM] [Deployer:149191]Operation 'deploy' on application 'App_application1' is initializing on 'ADFServer'&lt;br /&gt;[08:55:06 AM] [Deployer:149193]Operation 'deploy' on application 'App_application1' has failed on 'ADFServer'&lt;br /&gt;[08:55:06 AM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application App_application1 on ADFServer.: [J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: adf.oracle.domain, exact-match: false], [Extension-Name: oracle.jsp.next, exact-match: false]..&lt;br /&gt;[08:55:06 AM] Weblogic Server Exception: weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: adf.oracle.domain, exact-match: false], [Extension-Name: oracle.jsp.next, exact-match: false].&lt;br /&gt;[08:55:06 AM]   See server logs or server console for more details.&lt;br /&gt;[08:55:06 AM] weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: adf.oracle.domain, exact-match: false], [Extension-Name: oracle.jsp.next, exact-match: false].&lt;br /&gt;[08:55:06 AM] ####  Deployment incomplete.  ####&lt;br /&gt;[08:55:06 AM] Deployment Failed&lt;/pre&gt;The last set of errors reveals that the server can't find the libraries that the deployed application are dependent on.  To highlight them:&lt;pre name="code" class="xml"&gt;[08:55:06 AM] Weblogic Server Exception: weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: adf.oracle.domain, exact-match: false], [Extension-Name: oracle.jsp.next, exact-match: false].&lt;br /&gt;[08:55:06 AM]   See server logs or server console for more details.&lt;br /&gt;[08:55:06 AM] weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: adf.oracle.domain, exact-match: false], [Extension-Name: oracle.jsp.next, exact-match: false].&lt;/pre&gt;Note how WLS is stating it can't find adf.oracle.domain nor oracle.jsp.next.&lt;br /&gt;&lt;br /&gt;This confused us because we could actually see them installed under the deployments tab in the WLS console.  However the error in the end was a simple one on our part.&lt;br /&gt;&lt;br /&gt;On installing the updated ADF libraries we installed them into the WLS AdminServer managed server.  Yet on deploying our application, we chose to deploy the application to a separate WLS managed server called ADFServer (seen in the logs).  For the application to find the ADF libraries, they needed to be installed into the ADFServer as well.&lt;br /&gt;&lt;br /&gt;To fix this, one option is to head to the WLS console, locate the libraries in the Deployment node, and on selecting each library, under the Targets tab, ensure to allocate the libraries to the correct managed server.  Alternatively your other option is to deploy your application to the WLS managed server where the libraries are targeted/installed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-1148435216553675620?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/5APDPs8UXCk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/5APDPs8UXCk/are-your-libraries-targeted-to-correct.html</link><author>noreply@blogger.com (Chris Muir)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/08/are-your-libraries-targeted-to-correct.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-5229552844110935684</guid><pubDate>Tue, 18 Aug 2009 07:24:00 +0000</pubDate><atom:updated>2009-08-18T15:24:57.592+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">WebLogic Server</category><category domain="http://www.blogger.com/atom/ns#">Web Services</category><category domain="http://www.blogger.com/atom/ns#">JDeveloper</category><title>One-Way SSL with JAX-WS using JDeveloper 11gR1 and WLS 10.3.1</title><description>A while back Gerard Davison blogged some simple examples of using &lt;a href="http://kingsfleet.blogspot.com/2009/01/security-policy-worked-example.html"&gt;WS-Security Policies&lt;/a&gt;.  Gerard's specific example dealt with the WLS policy Wssp1.2-2007-Wss1.1-UsernameToken-Plain-X509-Basic256.xml.  As Gerard notes the said policy (further documented in the WLS 10.3.1 doco &lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/e13713/message.htm#i210119"&gt;here&lt;/a&gt;) implements user name tokens, encryption of the tokens and signing of the whole SOAP payload.&lt;br /&gt;&lt;br /&gt;The following post strips back Gerard's example to instead to consider the steps in setting up and testing One-Way SSL for a JAX-WS web service generated via JDeveloper 11gR1 and installed in WLS 10.3.1, using the WLS policy Wssp1.2-2007-Https.xml.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Assumptions&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;This article assumes the reader has the following basic knowledge:&lt;br /&gt;&lt;br /&gt;* HTTPS/SSL&lt;br /&gt;* Digital certificates and trusted/certificate authorities (CAs)&lt;br /&gt;* Oracle's WebLogic Server, WLS managed servers and the WLS console&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;One-Way SSL vs Two-Way SSL&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For those not familiar with either, Oracle's WLS documentation has a good explanation of the implementation of and differences between One-Way SSL and Two-Way SSL in the &lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/e13710/concepts.htm#i1122990"&gt;Understanding Security for Oracle WebLogic Server&lt;/a&gt; manual.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Steps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To implement a One-Way SSL example we'll run through the following steps:&lt;br /&gt;&lt;br /&gt;1) Create a basic JAX-WS web service with JDeveloper 11gR1&lt;br /&gt;2) Generate the digital certificates required for the WLS server&lt;br /&gt;3) Modify the web service to use the Wssp1.2-2007-Https.xml WLS policy&lt;br /&gt;4) Deploy the running web service to WLS&lt;br /&gt;5) Test the running web service via JDeveloper's HTTP Analyzer&lt;br /&gt;6) Test the running web service via SoapUI&lt;br /&gt;7) Test the running web service via a JAX-WS client&lt;br /&gt;8) Inspect the web service packets on the wire to verify the traffic is indeed encrypted&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;1) Create a basic JAX-WS web service with JDeveloper 11gR1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This step is documented in a previous &lt;a href="http://one-size-doesnt-fit-all.blogspot.com/2008/11/creating-jax-ws-web-services-via-wsdl.html"&gt;blog&lt;/a&gt; post Creating JAX-WS web services via a WSDL in JDev 11g.  There are also a number of viewlet demonstrations available from Oracle's &lt;a href="http://www.oracle.com/technology/products/jdev/viewlets/11/index.html"&gt;OTN&lt;/a&gt; which show how to construct the WSDL in a drag'n'drop fashion. &lt;br /&gt;&lt;br /&gt;The resulting web service we'll demonstrate here is a very simple one.  It is comprised of the following solutions:&lt;br /&gt;&lt;br /&gt;OneWaySSLExample.xsd&lt;pre name="code" class="xml"&gt;&lt;?xml version="1.0" encoding="windows-1252" ?&gt;&lt;br /&gt;&lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sagecomputing.com.au"&lt;br /&gt;            targetNamespace="http://www.sagecomputing.com.au" elementFormDefault="qualified"&gt;&lt;br /&gt;  &lt;xsd:element name="inputElement" type="xsd:string"/&gt;&lt;br /&gt;  &lt;xsd:element name="outputElement" type="xsd:string"/&gt;&lt;br /&gt;&lt;/xsd:schema&gt;&lt;/pre&gt;The inputElement and the outputElement will constitute the incoming and outgoing payloads of a simple HelloWorld web service.&lt;br /&gt;&lt;br /&gt;OneWaySSLExample.wsdl&lt;pre name="code" class="xml"&gt;&lt;?xml version="1.0" encoding="UTF-8" ?&gt;&lt;br /&gt;&lt;definitions targetNamespace="urn:OneWaySSLExample.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/"&lt;br /&gt;             xmlns:tns="urn:OneWaySSLExample.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&lt;br /&gt;             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"&lt;br /&gt;             xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsca="http://www.sagecomputing.com.au"&gt;&lt;br /&gt;  &lt;types&gt;&lt;br /&gt;    &lt;xsd:schema&gt;&lt;br /&gt;      &lt;xsd:import schemaLocation="../xsd/OneWaySSLExample.xsd" namespace="http://www.sagecomputing.com.au"/&gt;&lt;br /&gt;    &lt;/xsd:schema&gt;&lt;br /&gt;  &lt;/types&gt;&lt;br /&gt;  &lt;message name="InputMessage"&gt;&lt;br /&gt;    &lt;part name="part" element="wsca:inputElement"/&gt;&lt;br /&gt;  &lt;/message&gt;&lt;br /&gt;  &lt;message name="OutputMessage"&gt;&lt;br /&gt;    &lt;part name="part" element="wsca:outputElement"/&gt;&lt;br /&gt;  &lt;/message&gt;&lt;br /&gt;  &lt;portType name="OneWaySSLPortType"&gt;&lt;br /&gt;    &lt;operation name="OneWaySSLOperation"&gt;&lt;br /&gt;      &lt;input message="tns:InputMessage"/&gt;&lt;br /&gt;      &lt;output message="tns:OutputMessage"/&gt;&lt;br /&gt;    &lt;/operation&gt;&lt;br /&gt;  &lt;/portType&gt;&lt;br /&gt;  &lt;binding name="OneWaySSLBinding" type="tns:OneWaySSLPortType"&gt;&lt;br /&gt;    &lt;soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/&gt;&lt;br /&gt;    &lt;operation name="OneWaySSLOperation"&gt;&lt;br /&gt;      &lt;soap12:operation style="document" soapAction="urn:OneWaySSLExample.wsdl/OneWaySSLOperation"/&gt;&lt;br /&gt;      &lt;input&gt;&lt;br /&gt;        &lt;soap12:body use="literal" parts="part"/&gt;&lt;br /&gt;      &lt;/input&gt;&lt;br /&gt;      &lt;output&gt;&lt;br /&gt;        &lt;soap12:body use="literal" parts="part"/&gt;&lt;br /&gt;      &lt;/output&gt;&lt;br /&gt;    &lt;/operation&gt;&lt;br /&gt;  &lt;/binding&gt;&lt;br /&gt;  &lt;service name="OneWaySSLService"&gt;&lt;br /&gt;    &lt;port name="OneWaySSLPortTypePort" binding="tns:OneWaySSLBinding"&gt;&lt;br /&gt;      &lt;soap12:address location="http://www.sagecomputing.com.au "/&gt;&lt;br /&gt;    &lt;/port&gt;&lt;br /&gt;  &lt;/service&gt;&lt;br /&gt;&lt;/definitions&gt;&lt;/pre&gt;&lt;br /&gt;The overall web service comprises of a single operation accepting the inputElement and outputElement strings as specified in the XSD.&lt;br /&gt;&lt;br /&gt;OneWaySSLPortTypeImpl.java&lt;pre name="code" class="java"&gt;package au.com.sagecomputing.ws;&lt;br /&gt;&lt;br /&gt;import javax.jws.WebService;&lt;br /&gt;&lt;br /&gt;import javax.xml.ws.BindingType;&lt;br /&gt;import javax.xml.ws.soap.SOAPBinding;&lt;br /&gt;&lt;br /&gt;@WebService(serviceName = "OneWaySSLService",&lt;br /&gt;            targetNamespace = "urn:OneWaySSLExample.wsdl",&lt;br /&gt;            portName = "OneWaySSLPortTypePort",&lt;br /&gt;            endpointInterface = "au.com.sagecomputing.ws.OneWaySSLPortType",&lt;br /&gt;            wsdlLocation = "/WEB-INF/wsdl/OneWaySSLExample.wsdl")&lt;br /&gt;@BindingType(SOAPBinding.SOAP12HTTP_BINDING)&lt;br /&gt;public class OneWaySSLPortTypeImpl {&lt;br /&gt;&lt;br /&gt;  public String oneWaySSLOperation(String part) {&lt;br /&gt;    return "Hello " + part;&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;A very basic JAX-WS web service accepting the inputElement String and returning the outputElement String prefixed with "Hello ".&lt;br /&gt;&lt;br /&gt;Example request SOAP payload&lt;pre name="code" class="xml"&gt;&lt;env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://www.sagecomputing.com.au"&gt;&lt;br /&gt;   &lt;env:Header/&gt;&lt;br /&gt;   &lt;env:Body&gt;&lt;br /&gt;      &lt;ns1:inputElement&gt;Chris&lt;/ns1:inputElement&gt;&lt;br /&gt;   &lt;/env:Body&gt;&lt;br /&gt;&lt;/env:Envelope&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Example response SOAP payload&lt;pre name="code" class="xml"&gt;&lt;?xml version = '1.0' encoding = 'UTF-8'?&gt;&lt;br /&gt;&lt;S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"&gt;&lt;br /&gt;   &lt;S:Body&gt;&lt;br /&gt;      &lt;outputElement xmlns="http://www.sagecomputing.com.au"&gt;Hello Chris&lt;/outputElement&gt;&lt;br /&gt;   &lt;/S:Body&gt;&lt;br /&gt;&lt;/S:Envelope&gt;&lt;/pre&gt;The overall application/project structure will look as follows in JDeveloper's Application Navigator:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tOW0MlyI/AAAAAAAAAz0/Yh6wVO5dzNI/s1600-h/sslExamplePic0.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 254px; height: 400px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tOW0MlyI/AAAAAAAAAz0/Yh6wVO5dzNI/s400/sslExamplePic0.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5368199743003203362" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;2) Generate the digital certificates required for the WLS server&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In order for a client to undertake a SSL connection with our web service on the WLS server, the WLS server must be configured with a valid digital certificate.  &lt;br /&gt;&lt;br /&gt;Again note from the Oracle &lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/e13710/concepts.htm#i1122990"&gt;documentation&lt;/a&gt; how One-Way SSL works at runtime:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;With one-way SSL authentication, the target (the server) is required to present a digital certificate to the initiator (the client) to prove its identity. The client performs two checks to validate the digital certificate:&lt;br /&gt;&lt;br /&gt;1. The client verifies that the certificate is trusted (meaning, it was issued by the client's trusted CA), is valid (not expired), and satisfies the other certificate constraints.&lt;br /&gt;2. The client checks that the certificate Subject's common name (CN) field value matches the host name of the server to which the client is trying to connect&lt;br /&gt;&lt;br /&gt;If both of the above checks return true, the SSL connection is established.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;In this section we consider the digital certificates required for the WLS server.&lt;br /&gt;&lt;br /&gt;WLS is an interesting application server in that it keeps two separate Java keystores, 1 for storing the digital certificates for such actions as SSL, and another which is typically used for storing CA digital certificates.  The former is referred to as the identity keystore, the later the trust keystore.&lt;br /&gt;&lt;br /&gt;The WLS manual Securing Oracle WebLogic Server section 11 &lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/e13707/identity_trust.htm#i1202182"&gt;Configuring Identity and Trust&lt;/a&gt; has a detailed explanation of this setup.&lt;br /&gt;&lt;br /&gt;By default WLS comes with demonstration identity and trust keystores containing demonstration digital certificates.  As the WLS documentation takes great pains to explain these are for development purposes only and should never be used in a production environment.  For the purposes of this blog post if you're testing One-Way SSL in a development environment you can in fact skip this entire step as the demonstration WLS keystores will suffice.&lt;br /&gt;&lt;br /&gt;To check that the demonstration keystores are currently installed login to your WLS console, select your server, and under the Configurations -&gt; Keystores tab you'll see the following entries:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tO5JWl1I/AAAAAAAAAz8/bD2U_1xqnnA/s1600-h/sslExamplePic1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 376px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tO5JWl1I/AAAAAAAAAz8/bD2U_1xqnnA/s400/sslExamplePic1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5368199752218744658" /&gt;&lt;/a&gt;&lt;br /&gt;Your entries for the file locations of the keystore will be different from my example here dependent on where you installed WLS.&lt;br /&gt;&lt;br /&gt;However using the demonstration keystores avoids the whole learning exercise of configuring your own custom digital certificates in WLS which is an important lesson.  The following describes those steps in detail, as based off Gerard's original &lt;a href="http://kingsfleet.blogspot.com/2009/01/security-policy-worked-example.html"&gt;post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;To install our own digital certificate we followed these general steps:&lt;br /&gt;&lt;br /&gt;a) Open a command prompt and set the WLS environment&lt;br /&gt;b) Generate our own trusted certificate authority digital certificate&lt;br /&gt;c) Store the private key and digital certificate and import into the identity keystore&lt;br /&gt;d) Store the same digital certificate into the trust keystore.&lt;br /&gt;e) Configure the new keystores in WLS's identity and trust keystore&lt;br /&gt;&lt;br /&gt;The following describes those steps in detail.  In order to do this we've used WLS utilities to do as much of the work as possible.&lt;br /&gt;&lt;br /&gt;a) Open a command prompt and set the WLS environment&lt;br /&gt;&lt;br /&gt;Under Windows open a command prompt on the same machine as where WLS is installed, create a temporary directory in your favourite place and cd to that directory, and run your WLS server's setDomainEnv.cmd command.  Something like:&lt;br /&gt;&lt;br /&gt;"C:\&lt;wls_home&gt;\setDomainEnv.cmd"&lt;br /&gt;&lt;br /&gt;Once run ensure you're still in your new directory.&lt;br /&gt;&lt;br /&gt;b) Generate our own trusted certificate authority digital certificate&lt;pre name="code" class="xml"&gt;java utils.CertGen -certfile ServerCACert -keyfile ServerCAKey -keyfilepass ServerCAKey -selfsigned -e somebody@xxxx.com.au -ou FOR-DEVELOPMENT-ONLY -o XXXX -l PERTH -s WA -c AU&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This generates 4 files: ServerCACert.der, ServerCACert.pem, ServerCAKey.der, ServerCAKey.pem&lt;br /&gt;&lt;br /&gt;The utils.CertGen utility is useful for development purposes, but as per the WLS documentation, should not be used for production purposes.  Alternatively &lt;a href="http://www.openssl.org"&gt;OpenSSL&lt;/a&gt; could be used instead.&lt;br /&gt;&lt;br /&gt;Note the use of selfsigned flag.  This implies this digital certificate will be used both as the CA in the trust keystore and the served digital certificate in the identity keystore.  This is not what we'd do for a production environment using commercial Certificate Authorities, but is sufficient for demonstration purposes in this post.&lt;br /&gt;&lt;br /&gt;More information on:&lt;br /&gt;&lt;br /&gt;* the WLS CertGen utility can be found &lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/e13749/utils.htm#i1198919"&gt;here&lt;/a&gt;.&lt;br /&gt;* .der vs .pem files can be found &lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/e13707/identity_trust.htm#i1196582"&gt;here&lt;/a&gt; and &lt;a href="http://e-docs.bea.com/wls/docs92/secmanage/identity_trust.html#wp1195506"&gt;here&lt;/a&gt;.&lt;br /&gt;* WLS provides two utilities &lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/e13749/utils.htm#i1218395"&gt;der2pem&lt;/a&gt; and &lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/e13749/utils.htm#i1185185"&gt;pem2der&lt;/a&gt; can be used to convert between the two file types.&lt;br /&gt;&lt;br /&gt;Under Windows you can double click on the ServerCACert.der file to show its contents:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/Sn-tPTY5fuI/AAAAAAAAA0E/C8rY0ol90MA/s1600-h/sslExamplePic2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 322px; height: 400px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/Sn-tPTY5fuI/AAAAAAAAA0E/C8rY0ol90MA/s400/sslExamplePic2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5368199759263268578" /&gt;&lt;/a&gt;&lt;br /&gt;If you have access to the openSSL command line tool you can use it to query the certificate we just created:&lt;pre name="code" class="xml"&gt;openssl x509 -text -inform der -in ServerCACert.der&lt;br /&gt;&lt;br /&gt;Certificate:&lt;br /&gt;    Data:&lt;br /&gt;        Version: 3 (0x2)&lt;br /&gt;        Serial Number:&lt;br /&gt;            0d:a9:d1:4a:0f:0b:b2:61:13:90:89:f5:40:4d:4f:e2&lt;br /&gt;        Signature Algorithm: md5WithRSAEncryption&lt;br /&gt;        Issuer: C=AU, ST=WA, L=PERTH, O=SAGECOMPUTING, OU=FOR-DEVELOPMENT-ONLY, CN=&lt;hostname obscured - CM&gt;/emailAddress=somebody@sagecomputing.com.au&lt;br /&gt;        Validity&lt;br /&gt;            Not Before: Jul  9 07:06:49 2009 GMT&lt;br /&gt;            Not After : Jul 10 07:06:49 2029 GMT&lt;br /&gt;        Subject: C=AU, ST=WA, L=PERTH, O=SAGECOMPUTING, OU=FOR-DEVELOPMENT-ONLY, CN=&lt;hostname obscured - CM&gt;/emailAddress=somebody@sagecomputing.com.au&lt;br /&gt;        Subject Public Key Info:&lt;br /&gt;            Public Key Algorithm: rsaEncryption&lt;br /&gt;            RSA Public Key: (1024 bit)&lt;br /&gt;                Modulus (1024 bit):&lt;br /&gt;                    00:df:cb:6c:ed:86:75:4c:5b:66:cd:aa:3d:34:8f:&lt;br /&gt;                    &lt;snip&gt;&lt;br /&gt;                    73:f6:9c:b5:ed:82:9c:c3:15&lt;br /&gt;                Exponent: 65537 (0x10001)&lt;br /&gt;        X509v3 extensions:&lt;br /&gt;            X509v3 Key Usage: critical&lt;br /&gt;                Certificate Sign&lt;br /&gt;            X509v3 Basic Constraints: critical&lt;br /&gt;                CA:TRUE, pathlen:1&lt;br /&gt;    Signature Algorithm: md5WithRSAEncryption&lt;br /&gt;        b7:fa:1b:8f:c4:ee:af:6b:1d:f0:dc:f4:cf:35:20:f1:df:eb:&lt;br /&gt;        &lt;snip&gt;&lt;br /&gt;        0c:fe&lt;br /&gt;-----BEGIN CERTIFICATE-----&lt;br /&gt;MIIC8zCCAlygAwIBAgIQDanRSg8LsmETkIn1QE1P4jANBgkqhkiG9w0BAQQFADCB&lt;br /&gt;&lt;snip&gt;&lt;br /&gt;i7Pd63d03mWkI85tvsr5Q+40yitOL5JnLsbyHSrM+1aK8kkY7Qz+&lt;br /&gt;-----END CERTIFICATE-----&lt;br /&gt;&lt;snip&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This identifies information that maybe useful later if we make a mistake, such as the encryption algorithm used (RSA), the size of the keys (1024bit), the serial number of the certificate (a hex number).&lt;br /&gt;&lt;br /&gt;c) Store the private key and the digital certificate in the identity keystore&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="xml"&gt;java utils.ImportPrivateKey -certfile ServerCACert.der -keyfile ServerCAKey.der -keyfilepass ServerCAKey -keystore ServerIdentity.jks -storepass ServerCAKey -alias identity -keypass ServerCAKey&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;d) Store the same digital certificate into the trust keystore&lt;br /&gt;Import the certificate generated in step b into a trust keystore.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="xml"&gt;keytool -import -v -trustcacerts -alias identity -file ServerCACert.der -keystore ServerTrust.jks -storepass ServerTrustStorePass&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;e) Configure the new keystores in WLS's identity and trust keystore&lt;br /&gt;&lt;br /&gt;To configure the keystores in WLS enter the WLS console, select the managed server you're interested in, then make the following changes under the following tabs:&lt;br /&gt;&lt;br /&gt;Configuration tab -&gt; General subtab&lt;br /&gt;&lt;br /&gt;SSL Listed Port Enabled = checkbox&lt;br /&gt;SSL Listen Port = 7102 (and different from the Listen Port)&lt;br /&gt;&lt;br /&gt;Configuration tab -&gt; Keystores subtab&lt;br /&gt;&lt;br /&gt;Keystores = Custom Identity and Custom Trust&lt;br /&gt;Custom Identity Keystore = &lt;path&gt;\ServerIdentity.jks, such as c:\temp\ServerIdentity.jks&lt;br /&gt;Custom Identity Keystore Type = jks&lt;br /&gt;Custom Identity Keystore Passphrase = ServerCAKey&lt;br /&gt;Confirm Custom Identity Keystore Passphrase = ServerCAKey&lt;br /&gt;&lt;br /&gt;Custom Trust Keystore = &lt;path&gt;\ServerTrust.jks, such as c:\temp\ServerTrust.jks&lt;br /&gt;Custom Trust Keystore Type = jks&lt;br /&gt;Custom Trust Keystore Passphrase = ServerTrustStorePass&lt;br /&gt;Confirm Custom Trust Keystore Passphrase = ServerTrustStorePass&lt;br /&gt;&lt;br /&gt;Configuration tab -&gt; SSL subtab&lt;br /&gt;&lt;br /&gt;Identify and Trust Locations = Keystores&lt;br /&gt;Private key alias = identity&lt;br /&gt;Private Key Passphrase = ServerCAKey&lt;br /&gt;Confirm Private Key Passphrase = ServerCAKey&lt;br /&gt;&lt;br /&gt;Then save.&lt;br /&gt;&lt;br /&gt;After this restart your WLS server and you should see similar messages to the following in the WLS logs:&lt;pre name="code" class="xml"&gt;&lt;Jul 14, 2009 2:12:03 PM GMT+05:30&gt; &lt;Notice&gt; &lt;Security&gt; &lt;BEA-090171&gt; &lt;Loading the identity certificate and private key stored under the alias identity from the JKS keystore file C:\Temp\Server Identity.jks.&gt;&lt;br /&gt;&lt;Jul 14, 2009 2:12:03 PM GMT+05:30&gt; &lt;Notice&gt; &lt;Security&gt; &lt;BEA-090169&gt; &lt;Loading trusted certificates from the JKS keystore file C:\Temp\ServerTrust.jks.&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Alternatively is you see the following messages you have made a mistake in your configuration:&lt;pre name="code" class="xml"&gt;10/07/2009 4:08:30 PM WST&gt; &lt;Notice&gt; &lt;Security&gt; &lt;BEA-090171&gt; &lt;Loading the identity certificate and private key stored under the alias identity from the jks keystore file c:\temp\ServerIdentity.jks.&gt; &lt;br /&gt;&lt;10/07/2009 4:08:30 PM WST&gt; &lt;Notice&gt; &lt;Security&gt; &lt;BEA-090169&gt; &lt;Loading trusted certificates from the jks keystore file c:\temp\ServerTrust.jks.&gt; &lt;br /&gt;&lt;10/07/2009 4:08:30 PM WST&gt; &lt;Warning&gt; &lt;Security&gt; &lt;BEA-090172&gt; &lt;No trusted certificates have been loaded. Server will not trust to any certificate it receives.&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;3) Modify the web service to use the Wssp1.2-2007-Https.xml WLS policy&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This can be done in a number of ways in JDeveloper, the easiest of which for this blog post at least is just to insert the @Policy annotation into the JAX-WS endpoint as follows:&lt;br /&gt;&lt;br /&gt;(Note if you're using earlier versions of JDeveloper or Eclipse, this mechanism wont work, you must manually add the policies to the WSDL).&lt;pre name="code" class="java"&gt;package au.com.sagecomputing.ws;&lt;br /&gt;&lt;br /&gt;import javax.jws.WebService;&lt;br /&gt;&lt;br /&gt;import javax.xml.ws.BindingType;&lt;br /&gt;import javax.xml.ws.soap.SOAPBinding;&lt;br /&gt;&lt;br /&gt;import weblogic.jws.Policy;&lt;br /&gt;&lt;br /&gt;@WebService(serviceName = "OneWaySSLService",&lt;br /&gt;            targetNamespace = "urn:OneWaySSLExample.wsdl",&lt;br /&gt;            portName = "OneWaySSLPortTypePort",&lt;br /&gt;            endpointInterface = "au.com.sagecomputing.ws.OneWaySSLPortType",&lt;br /&gt;            wsdlLocation = "/WEB-INF/wsdl/OneWaySSLExample.wsdl")&lt;br /&gt;@BindingType(SOAPBinding.SOAP12HTTP_BINDING)&lt;br /&gt;@Policy(uri = "policy:Wssp1.2-2007-Https.xml") &lt;br /&gt;public class OneWaySSLPortTypeImpl {&lt;br /&gt;&lt;br /&gt;  public String oneWaySSLOperation(String part) {&lt;br /&gt;    return "Hello " + part;&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;&lt;span style="font-weight:bold;"&gt;4) Deploy the running web service to WLS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Within JDeveloper to deploy and run from the integrated WLS, it's simply a case of right clicking on the JAX-WS file and selecting Run.&lt;br /&gt;&lt;br /&gt;If you click on the hyperlink provided in the log window, this will open the HTTP Analyzer.  From the HTTP Analyzer you can open the WSDL at the top of the window:&lt;pre name="code" class="xml"&gt;&lt;?xml version='1.0' encoding='UTF-8'?&gt;&lt;!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.4. --&gt;&lt;definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:OneWaySSLExample.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsca="http://www.sagecomputing.com.au" targetNamespace="urn:OneWaySSLExample.wsdl" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wssutil="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"&gt;&lt;wsp:UsingPolicy wssutil:Required="true" /&gt;&lt;wsp:Policy wssutil:Id="Wssp1.2-2007-Https.xml"&gt;&lt;ns0:TransportBinding xmlns:ns0="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"&gt;&lt;wsp:Policy&gt;&lt;ns0:TransportToken&gt;&lt;wsp:Policy&gt;&lt;ns0:HttpsToken /&gt;&lt;/wsp:Policy&gt;&lt;/ns0:TransportToken&gt;&lt;ns0:AlgorithmSuite&gt;&lt;wsp:Policy&gt;&lt;ns0:Basic256 /&gt;&lt;/wsp:Policy&gt;&lt;/ns0:AlgorithmSuite&gt;&lt;ns0:Layout&gt;&lt;wsp:Policy&gt;&lt;ns0:Lax /&gt;&lt;/wsp:Policy&gt;&lt;/ns0:Layout&gt;&lt;ns0:IncludeTimestamp /&gt;&lt;/wsp:Policy&gt;&lt;/ns0:TransportBinding&gt;&lt;/wsp:Policy&gt;&lt;br /&gt;  &lt;types&gt;&lt;br /&gt;    &lt;xsd:schema&gt;&lt;br /&gt;      &lt;xsd:import schemaLocation="http://localhost:7101/WebServiceSSLExamples-OneWaySSLExample-context-root/OneWaySSLPortTypePort?xsd=1" namespace="http://www.sagecomputing.com.au" /&gt;&lt;br /&gt;    &lt;/xsd:schema&gt;&lt;br /&gt;  &lt;/types&gt;&lt;br /&gt;  &lt;message name="InputMessage"&gt;&lt;br /&gt;    &lt;part name="part" element="wsca:inputElement" /&gt;&lt;br /&gt;  &lt;/message&gt;&lt;br /&gt;  &lt;message name="OutputMessage"&gt;&lt;br /&gt;    &lt;part name="part" element="wsca:outputElement" /&gt;&lt;br /&gt;  &lt;/message&gt;&lt;br /&gt;  &lt;portType name="OneWaySSLPortType"&gt;&lt;br /&gt;    &lt;operation name="OneWaySSLOperation"&gt;&lt;br /&gt;      &lt;input message="tns:InputMessage" /&gt;&lt;br /&gt;      &lt;output message="tns:OutputMessage" /&gt;&lt;br /&gt;    &lt;/operation&gt;&lt;br /&gt;  &lt;/portType&gt;&lt;br /&gt;  &lt;binding name="OneWaySSLBinding" type="tns:OneWaySSLPortType"&gt;&lt;wsp:PolicyReference URI="#Wssp1.2-2007-Https.xml" /&gt;&lt;br /&gt;    &lt;soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /&gt;&lt;br /&gt;    &lt;operation name="OneWaySSLOperation"&gt;&lt;br /&gt;      &lt;soap12:operation style="document" soapAction="urn:OneWaySSLExample.wsdl/OneWaySSLOperation" /&gt;&lt;br /&gt;      &lt;input&gt;&lt;br /&gt;        &lt;soap12:body use="literal" parts="part" /&gt;&lt;br /&gt;      &lt;/input&gt;&lt;br /&gt;      &lt;output&gt;&lt;br /&gt;        &lt;soap12:body use="literal" parts="part" /&gt;&lt;br /&gt;      &lt;/output&gt;&lt;br /&gt;    &lt;/operation&gt;&lt;br /&gt;  &lt;/binding&gt;&lt;br /&gt;  &lt;service name="OneWaySSLService"&gt;&lt;br /&gt;    &lt;port name="OneWaySSLPortTypePort" binding="tns:OneWaySSLBinding"&gt;&lt;br /&gt;      &lt;soap12:address location="https://localhost:7102/WebServiceSSLExamples-OneWaySSLExample-context-root/OneWaySSLPortTypePort" /&gt;&lt;br /&gt;    &lt;/port&gt;&lt;br /&gt;  &lt;/service&gt;&lt;br /&gt;&lt;/definitions&gt;&lt;/pre&gt;Note on deployment to WLS you can see that the Wssp1.2-2007-Https.xml policy has been added to the binding to enforce One-Way SSL, and in addition the service address now runs from HTTPS, not HTTP, on the now enabled SSL port.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;5) Test the running web service via JDeveloper's HTTP Analyzer&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;JDeveloper out of the box includes HTTP Analyzer for testing your web services.  It's particularly useful as you don't have to leave the confines of your IDE to test your web services.&lt;br /&gt;&lt;br /&gt;In order to run the HTTP Analyzer with SSL'ed web service traffic, you need to make some changes to the configuration of JDeveloper.  Selecting the Tools-&gt;Preferences menu option, followed by Https and Truststore Settings, you can configure the Client and Server keystores HTTP Analyzer needs to run with SSL.&lt;br /&gt;&lt;br /&gt;If you followed my exact instructions on setting up a selfsigned CA into the WLS identity and trust keystores, you need to enter the following options in the Preferences Https and Trusting Settings page:&lt;br /&gt;&lt;br /&gt;Client Trusted Certificate Keystore: c:\temp\ServerTrust.jks&lt;br /&gt;Client Trusted Keystore Password: ServerTrustStorePass&lt;br /&gt;&lt;br /&gt;Server Keystore: c:\temp\ServerIdentity.jks&lt;br /&gt;Server Keystore Password: ServerCAKey&lt;br /&gt;Server Private Key Password: ServerCAKey&lt;br /&gt;&lt;br /&gt;When you run your web service you can access the HTTP Analyzer by clicking on the URL of your served web service in the JDev IDE log window, among other methods.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tds-LA1I/AAAAAAAAA0c/SHX8Xt6G2Fg/s1600-h/sslExamplePic6.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 135px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tds-LA1I/AAAAAAAAA0c/SHX8Xt6G2Fg/s400/sslExamplePic6.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5368200006648660818" /&gt;&lt;/a&gt;&lt;br /&gt;This presents the following HTTP Analyzer screens:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5hhNK2aXwp8/Sn-tdyoISaI/AAAAAAAAA0k/XZECMIMtqAo/s1600-h/sslExamplePic7.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 318px;" src="http://1.bp.blogspot.com/_5hhNK2aXwp8/Sn-tdyoISaI/AAAAAAAAA0k/XZECMIMtqAo/s400/sslExamplePic7.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5368200008166820258" /&gt;&lt;/a&gt;&lt;br /&gt;In the top of the screen you'll see the HTTP Analyzer has formed a dummy request for you to send out based on the web service's WSDL.  In my example picture I've filled out the part field and pressed Send Request, of which you can see the reply from the web service on the right hand side.&lt;br /&gt;&lt;br /&gt;At the bottom of the screen you can the individual request/responses that were generated in order to service the request.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;6) Test the running web service via SoapUI&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.soapui.org"&gt;SoapUI&lt;/a&gt; is a popular web service testing tool.  I wanted to show how to configure it here to show similar results to the HTTP Analyzer.  The following steps were built with SoapUI v3.0.&lt;br /&gt;&lt;br /&gt;a) Create a new Project via File -&gt; New soapUI Project&lt;br /&gt;b) In the New SoapUI Project dialog, enter a custom project name, then your WSDL, leave the rest of the fields as default.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5hhNK2aXwp8/Sn-tPyT8L9I/AAAAAAAAA0M/02PavQnXVWk/s1600-h/sslExamplePic3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 199px;" src="http://1.bp.blogspot.com/_5hhNK2aXwp8/Sn-tPyT8L9I/AAAAAAAAA0M/02PavQnXVWk/s400/sslExamplePic3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5368199767563972562" /&gt;&lt;/a&gt;&lt;br /&gt;c) In the Project list expand your new project to the last Request 1 node, and double click it.&lt;br /&gt;d) This will open the Request 1 window, showing on the left handside the outgoing request payload, where you can modify the inputElement XML element with your name.&lt;br /&gt;e) Pressing the green arrow executes the request against the webservice, you'll now hopefully see the SOAP response on the right handside of the window.&lt;br /&gt;f) Note at the bottom right of the right handside of the window you have the text SSL Info.  Clicking on this shows another sub-window with the SSL certificate information that was swapped with the WLS server to undertake the SSL communications.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/Sn-tdVNlc2I/AAAAAAAAA0U/mE_WmvxK4dY/s1600-h/sslExamplePic4.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 243px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/Sn-tdVNlc2I/AAAAAAAAA0U/mE_WmvxK4dY/s400/sslExamplePic4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5368200000270857058" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;7) Test the running web service via a JAX-WS client&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Assuming under JDeveloper you know how to create a Java Proxy for the deployed web service, you'll end up with the following code:&lt;pre name="code" class="java"&gt;import clientexamples.SSLUtilities;&lt;br /&gt;&lt;br /&gt;import javax.xml.ws.WebServiceRef;&lt;br /&gt;&lt;br /&gt;public class OneWaySSLPortTypePortClient&lt;br /&gt;{&lt;br /&gt;  @WebServiceRef&lt;br /&gt;  private static OneWaySSLService oneWaySSLService;&lt;br /&gt;&lt;br /&gt;  public static void main(String [] args)&lt;br /&gt;  {&lt;br /&gt;    oneWaySSLService = new OneWaySSLService();&lt;br /&gt;    OneWaySSLPortType oneWaySSLPortType = oneWaySSLService.getOneWaySSLPortTypePort();&lt;br /&gt;&lt;br /&gt;    SSLUtilities.trustAllHttpsCertificates(); &lt;br /&gt;&lt;br /&gt;    System.out.println(oneWaySSLPortType.oneWaySSLOperation("Chris"));&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;Note SSLUtilities is a handy class written by &lt;a href="http://schrepfler.blogspot.com/2009/06/relaxing-ssl-validation-for-jaxws.html"&gt;Srgjan Srepfler&lt;/a&gt; that includes a number of methods for handling and modifying the default SSL behaviour.  In our case in writing a simple test client we're not overly concerned about trusting the server's CA, so we can use SSUtilities.trustAllHttpsCertificates to stop the required checking.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;8) Inspect the web service packets on the wire to verify the traffic is indeed encrypted&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;What neither JDeveloper's HTTP Analyzer nor SoapUI can do is actually confirm for you that the traffic on the network was actually encrypted. To check this we can use a wire sniffing tool called &lt;a href="http://www.wireshark.org/"&gt;WireShark&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Warning: at some sites using wire sniffing tools like WireShark can be a dismissible offence because you can see private data on the network.  Be careful to check your organisation policies before doing this.&lt;br /&gt;&lt;br /&gt;Note if you're running the JAX-WS web services via the integrated WLS on the same localhost as SoapUI, you're most likely running through the localhost address.  For various technical reasons WireShark cannot sniff packets through localhost or the MS loopback adapter in Windows.  Instead we must separate our WLS and SoapUI installations, and place them on different hosts.  Let's call them Box1 and Box2, with WLS and SoapUI installed respectively&lt;br /&gt;&lt;br /&gt;Once you have both up and running, determine the IP address of Box2.  Let's say that IP address was: 101.102.103.104&lt;br /&gt;&lt;br /&gt;a) Start WireShark.  In the filter box top left enter: ip.addr == 101.102.103.104&lt;br /&gt;b) Select the filter Apply button.&lt;br /&gt;c) Select the Capture -&gt; Interfaces&lt;br /&gt;d) Select the Start button for your ethernet card&lt;br /&gt;e) WireShark is now sitting listening for traffic from the other ip.address of Box2.&lt;br /&gt;&lt;br /&gt;f) Now in SoapUI execute the request.&lt;br /&gt;g)In WireShark you should see the incoming requests:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tOGA54oI/AAAAAAAAAzs/1IjFetqMjdo/s1600-h/sslExample5.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 248px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tOGA54oI/AAAAAAAAAzs/1IjFetqMjdo/s400/sslExample5.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5368199738493100674" /&gt;&lt;/a&gt;&lt;br /&gt;As WireShark works at the network level it sees the individual packets, several of which will comprise the request/response between SoapUI and WLS, effectively an incredible amount of detail.  You can select each packet and look at the data contained within in the bottom window of the display.  This window shows the data in both hex and raw text, so you'll need to carefully look to see the data contained within.  Obviously if the traffic is encrypted you wont see much meaning at all which is what we want! To see the unencrypted traffic, remove the policy from your web service, redeploy it and run the same scenario again.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Thanks&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I must aim my very strong thanks to Gerard Davison from Oracle UK with assistance with this article, Gerard's help has been invaluable.  Any mistakes in this post are of course mine however, of which I'm sure there will be a few in such a long post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-5229552844110935684?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/O59z4Eqp0Uw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/O59z4Eqp0Uw/one-way-ssl-with-jax-ws-using.html</link><author>noreply@blogger.com (Chris Muir)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tOW0MlyI/AAAAAAAAAz0/Yh6wVO5dzNI/s72-c/sslExamplePic0.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/08/one-way-ssl-with-jax-ws-using.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-8464929017003318944</guid><pubDate>Tue, 11 Aug 2009 07:03:00 +0000</pubDate><atom:updated>2009-08-11T15:08:34.873+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JDeveloper</category><title>JDev/ADF – the importance of getting PS_TXN and PS_TXN_SEQ correct</title><description>This is a revisit post about two important database objects for ADF, the database objects PS_TXN and PS_TXN_SEQ.  The table and sequence are used by ADF to serialize user session state to the database.  An old Oracle OTN &lt;a href="http://www.oracle.com/technology/products/jdev/htdocs/bc4j/bc4j_temp_tables.html"&gt;whitepaper&lt;/a&gt; gives the low-down on these 2 objects.&lt;br /&gt;&lt;br /&gt;Without these database objects your application can't scale effectively to multiple users, you'll see some bizarre and wonderful behaviour as ADF chokes on not having the ability to serialize to the database objects.  However it's not an ADF problem, the &lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcstatemgmt.htm#ADFFD1307"&gt;manuals&lt;/a&gt; clearly state that you need to grant specific privileges to the database user or create the database objects beforehand.&lt;br /&gt;&lt;br /&gt;I know now of 2 projects where serious problems occurred because the database wasn't configured correctly to accept the objects, and found another blog post detailing the same issue.&lt;br /&gt;&lt;br /&gt;Pascal Alma's blog post can be found &lt;a href="http://www.pascalalma.net/2007/01/02/jbo-28006-exceptions-when-running-adf-bc-application/"&gt;here&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;In the 1st project, the developers overlooked giving privileges to the ADF database user schema to create the table and sequence, and didn't undertake load/stress tests to see how the application performed with more than one user.  As soon as the application hit production with multiple users, ADF attempted to serialize to the database objects, and the system started hitting a huge array of issues.  The worst bit was some of the errors were real red herrings making the problem hard to diagnose.  However after much time with Oracle Support assistance the problem was solved.  This destroyed the developers' faith in ADF and the users' faith in the developers and new ADF system.&lt;br /&gt;&lt;br /&gt;The 2nd project is one I'm involved in currently.  We were creating new database schemas for the ADF user and for some reason we didn't grant the create sequence privilege, but did grant the create table priv.  Luckily I stress tested the app and found the problem fairly early on (with Steve Muench's kind help).  However it did take a full 8 hours to debug, so I thought worth documenting here to help others.&lt;br /&gt;&lt;br /&gt;What I'd thought I document is what errors you'll see in the WLS logs for JDev 11g build 5188 and JDev 11gR1 build 5407.  I don't have an earlier version of JDev to test what happens but Pascal's blog post from above may assist.&lt;br /&gt;&lt;br /&gt;Under JDev 11g build 5188 you'll see the following WLS log entries:&lt;br /&gt;&lt;br /&gt;First it'll throw errors that it can't retrieve user session state:&lt;pre name="code" class="java"&gt;SEVERE: Could not find saved view state for token -505abe38&lt;br /&gt;11/08/2009 14:29:29 org.apache.myfaces.trinidadinternal.application.StateManagerImpl restoreView&lt;br /&gt;SEVERE: Could not find saved view state for token -505abe38&lt;br /&gt;11/08/2009 14:29:29 org.apache.myfaces.trinidadinternal.application.StateManagerImpl restoreView&lt;br /&gt;SEVERE: Could not find saved view state for token -505abe38&lt;br /&gt;11/08/2009 14:29:29 org.apache.myfaces.trinidadinternal.application.StateManagerImpl restoreView&lt;/pre&gt;At a later point in the logs you'll see exceptions thrown, but they're not very meaningful:&lt;pre name="code" class="java"&gt;WARNING: ADFc: Error while opening JDBC connection.&lt;br /&gt;oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.&lt;br /&gt; at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:253)&lt;br /&gt; at oracle.jbo.server.ConnectionPool.instantiateResource(ConnectionPool.java:168)&lt;br /&gt; at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:546)&lt;br /&gt; at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:327)&lt;br /&gt;&lt;snip&gt;&lt;/pre&gt;Further in the logs you may see the following TNS Listener issue (though this may just be particular to my Oracle XE setup):&lt;pre name="code" class="java"&gt;Caused by: java.sql.SQLException: Listener refused the connection with the following error:&lt;br /&gt;ORA-12519, TNS:no appropriate service handler found&lt;br /&gt;The Connection descriptor used by the client was:&lt;br /&gt;localhost:1521:xe&lt;br /&gt; at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)&lt;br /&gt; at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:116)&lt;br /&gt; at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:177)&lt;br /&gt;&lt;snip&gt;&lt;/pre&gt;And you may see NullPointerExceptions dependent on what ADF was attempting to do with the database connection at the time:&lt;pre name="code" class="java"&gt;Caused by: java.lang.NullPointerException&lt;br /&gt; at oracle.adf.model.binding.DCIteratorBinding.initSourceRSI(DCIteratorBinding.java:1735)&lt;br /&gt; at oracle.adf.model.binding.DCIteratorBinding.callInitSourceRSI(DCIteratorBinding.java:1625)&lt;br /&gt; ... 75 more&lt;br /&gt;&lt;snip&gt;&lt;/pre&gt;Under JDev 11gR1 build 5407 gives you a more meaningful error message:&lt;br /&gt;&lt;br /&gt;Again, first you'll see errors that it can't retrieve user session state:&lt;pre name="code" class="java"&gt;SEVERE: Could not find saved view state for token -ce0efchp5&lt;br /&gt;11/08/2009 2:35:31 PM org.apache.myfaces.trinidadinternal.application.StateManagerImpl restoreView&lt;br /&gt;SEVERE: Could not find saved view state for token -ce0efchp7&lt;br /&gt;11/08/2009 2:35:31 PM org.apache.myfaces.trinidadinternal.application.StateManagerImpl restoreView&lt;br /&gt;SEVERE: Could not find saved view state for token -ce0efchp7&lt;br /&gt;11/08/2009 2:35:31 PM org.apache.myfaces.trinidadinternal.application.StateManagerImpl restoreView&lt;/pre&gt;But then you'll see a much more meaningful message that ADF can't create the required objects:&lt;pre name="code" class="java"&gt;oracle.jbo.PCollException: JBO-28006: Could not create persistence table PS_TXN_seq&lt;br /&gt; at oracle.jbo.PCollException.throwException(PCollException.java:36)&lt;br /&gt; at oracle.jbo.pcoll.OraclePersistManager.createTable(OraclePersistManager.java:908)&lt;br /&gt; at oracle.jbo.pcoll.OraclePersistManager.queryNextCollectionId(OraclePersistManager.java:1444)&lt;br /&gt;&lt;snip&gt;&lt;/pre&gt;And further down:&lt;pre name="code" class="java"&gt;Caused by: java.sql.SQLSyntaxErrorException: ORA-01031: insufficient privileges&lt;br /&gt; at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)&lt;br /&gt; at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)&lt;br /&gt; at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)&lt;br /&gt; at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)&lt;br /&gt; at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)&lt;br /&gt;&lt;snip&gt;&lt;/pre&gt;Hopefully in Googling these error messages and landing on this page, you'll be able to work out how to correctly configure the database objects to avoid these issues.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-8464929017003318944?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/vNAtVWkotzU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/vNAtVWkotzU/jdevadf-importance-of-getting-pstxn-and.html</link><author>noreply@blogger.com (Chris Muir)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/08/jdevadf-importance-of-getting-pstxn-and.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-3480055710955643498</guid><pubDate>Fri, 07 Aug 2009 06:11:00 +0000</pubDate><atom:updated>2009-08-07T14:33:54.649+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Web Services</category><title>SoapUI for web service testing</title><description>A popular tool for web service testing is &lt;a href="http://www.soapui.org/"&gt;SoapUI&lt;/a&gt;.  The following blog post describes how to use it for testing a simple web service, as well as setting up a series of tests and even load/stress testing. Without a doubt similar documentation is available on the SoapUI website; my post gives my spin on the product that maybe useful to others.&lt;br /&gt;&lt;br /&gt;In this post we'll look at:&lt;br /&gt;&lt;br /&gt;1) A simple web service example&lt;br /&gt;2) Creating a simple test in SoapUI&lt;br /&gt;3) Creating a test suite&lt;br /&gt;4) Loast/stress testing your web services&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Our web service&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The web service we'll use here for testing is a simple Hello World example.  It is comprised of the following solutions:&lt;br /&gt;&lt;br /&gt;HelloWorldExample.xsd&lt;pre name="code" class="xml"&gt;&lt;?xml version="1.0" encoding="windows-1252" ?&gt;&lt;br /&gt;&lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" &lt;br /&gt;xmlns="http://www.sagecomputing.com.au"&lt;br /&gt;            targetNamespace="http://www.sagecomputing.com.au" elementFormDefault="qualified"&gt;&lt;br /&gt;  &lt;xsd:element name="inputElement" type="xsd:string"/&gt;&lt;br /&gt;  &lt;xsd:element name="outputElement" type="xsd:string"/&gt;&lt;br /&gt;&lt;/xsd:schema&gt;&lt;/pre&gt;The inputElement and the outputElement will constitute the incoming and outgoing payloads of a simple HelloWorld web service.&lt;br /&gt;&lt;br /&gt;HelloWorldExample.wsdl&lt;pre name="code" class="xml"&gt;&lt;?xml version="1.0" encoding="UTF-8" ?&gt;&lt;br /&gt;&lt;definitions targetNamespace="urn: HelloWorldExample.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/"&lt;br /&gt;             xmlns:tns="urn: HelloWorldExample.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&lt;br /&gt;             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"&lt;br /&gt;             xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsca="http://www.sagecomputing.com.au"&gt;&lt;br /&gt;  &lt;types&gt;&lt;br /&gt;    &lt;xsd:schema&gt;&lt;br /&gt;      &lt;xsd:import schemaLocation="../xsd/HelloWorldExample.xsd" namespace="http://www.sagecomputing.com.au"/&gt;&lt;br /&gt;    &lt;/xsd:schema&gt;&lt;br /&gt;  &lt;/types&gt;&lt;br /&gt;  &lt;message name="InputMessage"&gt;&lt;br /&gt;    &lt;part name="part" element="wsca:inputElement"/&gt;&lt;br /&gt;  &lt;/message&gt;&lt;br /&gt;  &lt;message name="OutputMessage"&gt;&lt;br /&gt;    &lt;part name="part" element="wsca:outputElement"/&gt;&lt;br /&gt;  &lt;/message&gt;&lt;br /&gt;  &lt;portType name="HelloWorldPortType"&gt;&lt;br /&gt;    &lt;operation name="HelloWorldOperation"&gt;&lt;br /&gt;      &lt;input message="tns:InputMessage"/&gt;&lt;br /&gt;      &lt;output message="tns:OutputMessage"/&gt;&lt;br /&gt;    &lt;/operation&gt;&lt;br /&gt;  &lt;/portType&gt;&lt;br /&gt;  &lt;binding name="HelloWorldBinding" type="tns:HelloWorldPortType"&gt;&lt;br /&gt;    &lt;soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/&gt;&lt;br /&gt;    &lt;operation name="HelloWorldOperation"&gt;&lt;br /&gt;      &lt;soap12:operation style="document" soapAction="urn:HelloWorldExample.wsdl/HelloWorldOperation"/&gt;&lt;br /&gt;      &lt;input&gt;&lt;br /&gt;        &lt;soap12:body use="literal" parts="part"/&gt;&lt;br /&gt;      &lt;/input&gt;&lt;br /&gt;      &lt;output&gt;&lt;br /&gt;        &lt;soap12:body use="literal" parts="part"/&gt;&lt;br /&gt;      &lt;/output&gt;&lt;br /&gt;    &lt;/operation&gt;&lt;br /&gt;  &lt;/binding&gt;&lt;br /&gt;  &lt;service name="HelloWorldService"&gt;&lt;br /&gt;    &lt;port name="HelloWorldPortTypePort" binding="tns:HelloWorldBinding"&gt;&lt;br /&gt;      &lt;soap12:address location="http://www.sagecomputing.com.au "/&gt;&lt;br /&gt;    &lt;/port&gt;&lt;br /&gt;  &lt;/service&gt;&lt;br /&gt;&lt;/definitions&gt;&lt;/pre&gt;Finally the web service is served at the following address:&lt;br /&gt;&lt;br /&gt;http://www.sagecomputing.com.au:7101/SoapUIWebServiceExample /HelloWorldPortTypePort&lt;br /&gt;&lt;br /&gt;...and the WSDL at this location...&lt;br /&gt;&lt;br /&gt;http://www.sagecomputing.com.au:7101/SoapUIWebServiceExample /HelloWorldPortTypePort?WSDL&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Starting SoapUI 3.0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On starting SoapUI 3.0 you'll see this screen:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5hhNK2aXwp8/SnvGKJK49LI/AAAAAAAAAxU/a5GEBS1-fII/s1600-h/soapuipic1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_5hhNK2aXwp8/SnvGKJK49LI/AAAAAAAAAxU/a5GEBS1-fII/s400/soapuipic1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367101258504664242" /&gt;&lt;/a&gt;&lt;br /&gt;Note in the left navigator the Projects node.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Creating your first web service test&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We want to test the web service we recently created.  To do follow these steps:&lt;br /&gt;&lt;br /&gt;Right click on the Projects node and select New soapUI Project from the context menu.  This will display the New soapUI Project dialog.&lt;br /&gt;&lt;br /&gt;We'll enter an arbitrary Project Name.  For the Initial WSDL/WADL we enter the complete URL of our web service's WSDL:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5hhNK2aXwp8/SnvGKb8qJnI/AAAAAAAAAxc/u4Hxf315_Qk/s1600-h/soapuipic2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 199px;" src="http://1.bp.blogspot.com/_5hhNK2aXwp8/SnvGKb8qJnI/AAAAAAAAAxc/u4Hxf315_Qk/s400/soapuipic2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367101263545247346" /&gt;&lt;/a&gt;&lt;br /&gt;Leave the default check boxes, where Create Requests is checked, and the rest unchecked.&lt;br /&gt;&lt;br /&gt;On completing the dialog the navigator will now look as follows:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/SnvGKyFLcOI/AAAAAAAAAxk/DxkrO87vO_U/s1600-h/soapuipic3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 256px; height: 168px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/SnvGKyFLcOI/AAAAAAAAAxk/DxkrO87vO_U/s400/soapuipic3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367101269486563554" /&gt;&lt;/a&gt;&lt;br /&gt;Note how SoapUI has created the project, a node to represent the WSDL binding, a node to represent the WSDL operations (one in this case), and a dummy request.&lt;br /&gt;&lt;br /&gt;If you double click on the request, this shows where SoapUI begins to sing:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/SnvGLLhBwOI/AAAAAAAAAxs/aN3gbj9JSPE/s1600-h/soapuipic4.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/SnvGLLhBwOI/AAAAAAAAAxs/aN3gbj9JSPE/s400/soapuipic4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367101276314255586" /&gt;&lt;/a&gt;&lt;br /&gt;The new window shows a potential request to send to your web service.  You'll note thanks to the WSDLs and XSDs defined within the web service, SoapUI has automatically created a dummy payload with the required XML structure.  We could overtype the inputElement's value, and then press the green arrow button to send the request to the web service, seeing this result:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/SnvGLhOrw0I/AAAAAAAAAx0/eBkXx3noVCI/s1600-h/soapuipic5.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/SnvGLhOrw0I/AAAAAAAAAx0/eBkXx3noVCI/s400/soapuipic5.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367101282142896962" /&gt;&lt;/a&gt;&lt;br /&gt;The beauty of SoapUI is its taken care of virtually everything but the actual data values for you.  Network communications, formation of the SOAP payloads, and even validating the XML structures.  For the developer this is a boon as you can test one of your web services to see what's happening without writing any client side code.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Creating a test suite&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The previous steps were good for one of adlibbed tests on our web service, but what if you wanted to create a series of tests, replay them, and add assertions based around the results?  SoapUI offers the Test Suite.&lt;br /&gt;&lt;br /&gt;In the navigator right click the dummy request (Request 1) and select Add to Test Case.  In the Create Test Suite dialog, and the Create Test Case dialog, accept the default names.  In the Add Request to Test Case dialog accept the defaults as following:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5hhNK2aXwp8/SnvGmCIMSaI/AAAAAAAAAx8/NPvJmzqt5wo/s1600-h/soapuipic6.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 234px;" src="http://2.bp.blogspot.com/_5hhNK2aXwp8/SnvGmCIMSaI/AAAAAAAAAx8/NPvJmzqt5wo/s400/soapuipic6.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367101737650637218" /&gt;&lt;/a&gt;&lt;br /&gt;On accepting the dialog you'll have the following structure in the navigator and a new window for the Test Suite:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5hhNK2aXwp8/SnvGmfNvwSI/AAAAAAAAAyE/8L1qmL2KMRc/s1600-h/soapuipic7.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_5hhNK2aXwp8/SnvGmfNvwSI/AAAAAAAAAyE/8L1qmL2KMRc/s400/soapuipic7.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367101745458561314" /&gt;&lt;/a&gt;&lt;br /&gt;From the navigator you can guess that from the Test Suite you can create a number of Test Cases, with a sequenced set of Step Tests made up of requests.  In our example the request has been copied from our previous dummy request:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5hhNK2aXwp8/SnvGmlFm5fI/AAAAAAAAAyM/db8ZUo9Lamo/s1600-h/soapuipic8.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_5hhNK2aXwp8/SnvGmlFm5fI/AAAAAAAAAyM/db8ZUo9Lamo/s400/soapuipic8.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367101747035039218" /&gt;&lt;/a&gt;&lt;br /&gt;Also unlike our original dummy request, with the test request open, looking at the bottom of the window we have an Assertions option, of which when we click on it (the word Assertion) we see the following:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5hhNK2aXwp8/SnvGnGqApsI/AAAAAAAAAyU/mNuhyZJomh0/s1600-h/soapuipic9.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 334px;" src="http://2.bp.blogspot.com/_5hhNK2aXwp8/SnvGnGqApsI/AAAAAAAAAyU/mNuhyZJomh0/s400/soapuipic9.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367101756046091970" /&gt;&lt;/a&gt;&lt;br /&gt;An Assertion is a test to run against the web service response to ensure we get the result we require.  The current Assertion SOAP Response – UNKNOWN is simply saying we should get a valid SOAP response.  We could alternative add another Assertion to ensure the result is not a SOAP Fault by selecting the Add button then the "Not a SOAP Fault" option:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5hhNK2aXwp8/SnvGnUA6qYI/AAAAAAAAAyc/qSCxUN2b3gA/s1600-h/soaupuipic10.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 333px;" src="http://1.bp.blogspot.com/_5hhNK2aXwp8/SnvGnUA6qYI/AAAAAAAAAyc/qSCxUN2b3gA/s400/soaupuipic10.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367101759631829378" /&gt;&lt;/a&gt;&lt;br /&gt;Once we've set up our tests and assertions, we want to run them.  We return to the test case in the project navigator, open it and select the green arrow button to run the complete test suite.  Assuming all things go well, we should see the following result:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/SnvHEAbR9WI/AAAAAAAAAys/3pu7poPyD2I/s1600-h/soapuipic12.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 338px; height: 400px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/SnvHEAbR9WI/AAAAAAAAAys/3pu7poPyD2I/s400/soapuipic12.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367102252589905250" /&gt;&lt;/a&gt;&lt;br /&gt;If one of our assertions on our test case fails we'll see the following result:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/SnvJ4k-D-LI/AAAAAAAAAzc/79OLmQ7nBCQ/s1600-h/soapuipic20.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 335px; height: 400px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/SnvJ4k-D-LI/AAAAAAAAAzc/79OLmQ7nBCQ/s400/soapuipic20.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367105354775918770" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Load/stress testing your web services&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;While running a test suite of tests can prove your web services are functionally correct, they don't tell you:&lt;br /&gt;&lt;br /&gt;a) What's the maximum transactions per second (ie. load testing)&lt;br /&gt;b) Does your program fail under multiple requests (ie. stress testing)&lt;br /&gt;&lt;br /&gt;Load and stress testing are an integral part of ensuring your application will work on hitting productions.&lt;br /&gt;&lt;br /&gt;Strictly speaking load and stress testing are proving different things, but for the remainder of this post I'll assume they're one and the same as they use the same facilities in SoapUI.&lt;br /&gt;&lt;br /&gt;You'll have noted in the project navigator under the Test Suite an additional node Load Tests was created:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5hhNK2aXwp8/SnvKbhzjp2I/AAAAAAAAAzk/e7qsLtVLIuE/s1600-h/soapuipic21.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 346px; height: 249px;" src="http://3.bp.blogspot.com/_5hhNK2aXwp8/SnvKbhzjp2I/AAAAAAAAAzk/e7qsLtVLIuE/s400/soapuipic21.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367105955221972834" /&gt;&lt;/a&gt;&lt;br /&gt;Right clicking on the Load Tests node, select New Load Test, accepting the default name in the New Load Test dialog, you'll see the Load Test window:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/SnvHFM42X-I/AAAAAAAAAy8/nS3auZakgi0/s1600-h/soapuipic14.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 297px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/SnvHFM42X-I/AAAAAAAAAy8/nS3auZakgi0/s400/soapuipic14.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367102273115021282" /&gt;&lt;/a&gt;&lt;br /&gt;The easiest thing to do to understand this screen is just hit the green arrow.  So what's happening?:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5hhNK2aXwp8/SnvHFV6jYkI/AAAAAAAAAzE/XvpO_dER25g/s1600-h/soapuipic15.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 298px;" src="http://2.bp.blogspot.com/_5hhNK2aXwp8/SnvHFV6jYkI/AAAAAAAAAzE/XvpO_dER25g/s400/soapuipic15.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367102275538084418" /&gt;&lt;/a&gt;&lt;br /&gt;In the above picture you can see that the web service is being called multiple times.  The process bar tells you the percentage completeness of the tests.  The Limit field is the number of seconds the test will run for.  The Threads is the number of threads (essentially simulated users) that SoapUI will spawn to send requests to the web service.  Finally the Test Delay is the milliseconds between each response and next requests.&lt;br /&gt;&lt;br /&gt;On completion of the test you'll see the collated statistics in the table:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/SnvHXnBcBYI/AAAAAAAAAzM/keD1dx46V_4/s1600-h/soapuipic16.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 298px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/SnvHXnBcBYI/AAAAAAAAAzM/keD1dx46V_4/s400/soapuipic16.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367102589368010114" /&gt;&lt;/a&gt;&lt;br /&gt;Different figures are useful in assessing the performance of your web services, including:&lt;br /&gt;&lt;br /&gt;Min and max shows you how fast and how slow your web service could process a request and send a response.  Typically your worst time is on startup as the server initializes the web services.&lt;br /&gt;&lt;br /&gt;Tps – the average transactions per second, which gives you a rough idea of the concurrent sessions you can support (remembering that at startup you will service less, but once the server is initialized generally you can support more)&lt;br /&gt;&lt;br /&gt;Err – number of errors detected such as SOAP Faults.&lt;br /&gt;&lt;br /&gt;Now an average of 6.71 transaction per second doesn't look that healthy.  In this case it's SoapUI that's throttling your web services as the number of threads and the delay between requests means your web services can't fly, they're just not receiving enough work to do.  If we change the numbers, increasing the threads, and reducing the delay as per the following screen shot we see we can really put our servers under some pressure:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5hhNK2aXwp8/SnvHYAwg11I/AAAAAAAAAzU/drmJ0JrTpEs/s1600-h/soapuipic17.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 276px;" src="http://2.bp.blogspot.com/_5hhNK2aXwp8/SnvHYAwg11I/AAAAAAAAAzU/drmJ0JrTpEs/s400/soapuipic17.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5367102596276344658" /&gt;&lt;/a&gt;&lt;br /&gt;(Nice bit about this screenshot is we're using an Oracle WebLogic Server behind the scenes, a fairly expensive server all round, but it certainly cranks along with this simplistic test case).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-3480055710955643498?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/kAMn-6lkrGQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/kAMn-6lkrGQ/soapui-for-web-service-testing.html</link><author>noreply@blogger.com (Chris Muir)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_5hhNK2aXwp8/SnvGKJK49LI/AAAAAAAAAxU/a5GEBS1-fII/s72-c/soapuipic1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/08/soapui-for-web-service-testing.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-6559405980455782014</guid><pubDate>Tue, 28 Jul 2009 02:45:00 +0000</pubDate><atom:updated>2009-07-28T10:48:24.373+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">WebLogic Server</category><title>WLS: Nonsensical error message on web services HTTPS policy enforcement</title><description>Mostly a post to document something I keep on forgetting, hopefully useful to someone else.&lt;br /&gt;&lt;br /&gt;Under WebLogic Server 10.3.1 (and maybe present in earlier versions of WLS?), on testing a deployed web service I occasionally get this HTTP response from WLS:&lt;br /&gt;&lt;pre name="code" class="java"&gt;Error 500--Internal Server Error&lt;br /&gt;&lt;br /&gt;javax.servlet.ServletException: unable to send error:&lt;br /&gt;at weblogic.wsee.jaxws.HttpServletAdapter.sendAccessError(HttpServletAdapter.java:240)&lt;br /&gt;at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:195)&lt;br /&gt;at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:297)&lt;br /&gt;at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)&lt;br /&gt;.. snip ..&lt;br /&gt;Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: {http://www.w3.org/2003/05/soap-envelope}Client.Access is not a standard Code value&lt;br /&gt;at com.sun.xml.internal.messaging.saaj.soap.ver1_2.Fault1_2Impl.checkIfStandardFaultCode(Fault1_2Impl.java:134)&lt;br /&gt;at com.sun.xml.internal.messaging.saaj.soap.impl.FaultImpl.setFaultCode(FaultImpl.java:126)&lt;br /&gt;at com.sun.xml.internal.messaging.saaj.soap.impl.FaultImpl.setFaultCode(FaultImpl.java:91)&lt;br /&gt;.. snip ..&lt;/pre&gt;Note the message half way down the stack trace "Caused by".  In turn in the WLS logs I receive the following error:&lt;br /&gt;&lt;pre name="code" class="java"&gt;22/07/2009 12:15:46 PM com.sun.xml.internal.messaging.saaj.soap.ver1_2.Fault1_2Impl checkIfStandardFaultCode&lt;br /&gt;SEVERE: SAAJ0435: {http://www.w3.org/2003/05/soap-envelope}Client.Access is not a standard Code value&lt;br /&gt;&lt;22/07/2009 12:15:46 PM WST&gt; &lt;Error&gt; &lt;HTTP&gt; &lt;BEA-101017&gt; &lt;[ServletContext@23322757[app:MyWebServices module:MyWebServices path:/MyWebServices spec-version:2.5], request: weblogic.servlet.internal.ServletRequestImpl@61061d[&lt;br /&gt;POST /MyWebServices/My.Service HTTP/1.1&lt;br /&gt;Accept-Encoding: gzip,deflate&lt;br /&gt;Content-Type: application/soap+xml;charset=UTF-8;action="http://acme.com/com/my.service"&lt;br /&gt;User-Agent: Jakarta Commons-HttpClient/3.1&lt;br /&gt;Content-Length: 4948&lt;br /&gt;&lt;br /&gt;]] Root cause of ServletException.&lt;br /&gt;com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: {http://www.w3.org/2003/05/soap-envelope}Client.Access is not a standard Code value&lt;br /&gt;at com.sun.xml.internal.messaging.saaj.soap.ver1_2.Fault1_2Impl.checkIfStandardFaultCode(Fault1_2Impl.java:134)&lt;br /&gt;at com.sun.xml.internal.messaging.saaj.soap.impl.FaultImpl.setFaultCode(FaultImpl.java:126)&lt;br /&gt;at com.sun.xml.internal.messaging.saaj.soap.impl.FaultImpl.setFaultCode(FaultImpl.java:91)&lt;br /&gt;.. snip ..&lt;/pre&gt;You can see between the HTTP error and the WLS logs the same message:&lt;br /&gt;&lt;pre name="code" class="java"&gt;com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: {http://www.w3.org/2003/05/soap-envelope}Client.Access is not a standard Code value&lt;/pre&gt;...followed by the SAAJ classes complaining about the SOAP Fault in the stack trace.  In guessing what's occurring, the web service or WLS has thrown an error, but in transferring that error to a SOAP Fault response, the SAAJ classes don't think the SOAP fault itself is valid.  In other words the real error is obscured because the error mechanism itself is bust.&lt;br /&gt;&lt;br /&gt;So ignoring the error mechanism failure, what had I done wrong?  After a lot of head scratching, I discovered my mistake.&lt;br /&gt;&lt;br /&gt;I'd originally built a client to access my web service at the following URL:&lt;br /&gt;&lt;br /&gt;http://MyWlsServer:7001/MyWebServices/My.Service&lt;br /&gt;&lt;br /&gt;Subsequently I'd changed my web service to implement SSL via the WLS policy Wssp1.2-2007-Https.xml.  To successfully access the web service thereafter I needed to access it at this new URL:&lt;br /&gt;&lt;br /&gt;(Note the https delineator and port 7003, my configured WLS SSL port)&lt;br /&gt;&lt;br /&gt;https://MyWlsServer:7003/MyWebServices/My.Service&lt;br /&gt;&lt;br /&gt;...but in forgetting to change my client to the new URL, the error as above is thrown.  Presumably the real error message would be "No such service" or "Service requires HTTPS" or "Chris, you've made another mistake!"&lt;br /&gt;&lt;br /&gt;For reference I've tested this the other way around, where the web service isn't enforcing the WLS HTTPS policy, but the client access the https URL, and it works fine.  This makes sense as the WLS policy is an enforcement of HTTPS traffic for that specific web service, not implementing HTTPS in general for WLS, that's left up to WLS which we've already preconfigured for WLS traffic.  As such we can still use HTTPS for our web service even if the web service isn't enforcing HTTPS.&lt;br /&gt;&lt;br /&gt;In addition note because of the generic error message returned here, readers should be careful to ascertain if what I describe in this post actually applies in their case.  There's also the good chance this error will be for totally different reasons in different implementations of WLS.&lt;br /&gt;&lt;br /&gt;And for the record I'll get around to logging an SR with Oracle Support soon.  Anybody want to write the simple test case and steps to reproduce for me please? ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-6559405980455782014?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/hCW9c94F5jg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/hCW9c94F5jg/wls-nonsensical-error-message-on-web.html</link><author>noreply@blogger.com (Chris Muir)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/07/wls-nonsensical-error-message-on-web.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-6035647955070793820</guid><pubDate>Tue, 14 Jul 2009 00:00:00 +0000</pubDate><atom:updated>2009-07-14T08:47:19.781+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JDeveloper</category><title>JDev 11gR1: the most obscure new IDE feature</title><description>Each new release of JDeveloper brings an explosion of blog posts from the excited JDeveloper advocates and Oracle staff.  Within a week or so all the major new features are identified and explained, leaving slow typers like me wondering what to cover to get readers excited.&lt;br /&gt;&lt;br /&gt;So for the latest JDeveloper 11gR1 release, I've taken the opportunity to explore for the most obscure feature, the feature hardly anybody is likely to see, or possibly even care about until they discover it.&lt;br /&gt;&lt;br /&gt;And today I think I found it.  Small celebratory "woohoo!" on my part.&lt;br /&gt;&lt;br /&gt;Take a look at this screenshot of the source code of a standard ADF Faces RC page in all its XML glory:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5hhNK2aXwp8/SlV8LDQVHNI/AAAAAAAAAwU/uf-9XX3Kitw/s1600-h/pic1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 156px;" src="http://1.bp.blogspot.com/_5hhNK2aXwp8/SlV8LDQVHNI/AAAAAAAAAwU/uf-9XX3Kitw/s400/pic1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5356323861121277138" /&gt;&lt;/a&gt;&lt;br /&gt;In the next picture I've deleted the af:inputText tag. Besides the removal of the tag, can you see the subtle change in the source code editor? Believe me you'll have to look really hard:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/SlV8LcmDD_I/AAAAAAAAAwc/ULz8LH2qcL4/s1600-h/pic2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 155px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/SlV8LcmDD_I/AAAAAAAAAwc/ULz8LH2qcL4/s400/pic2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5356323867923255282" /&gt;&lt;/a&gt;&lt;br /&gt;Spotted it? Let me point it out:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/SlV8L-Y93cI/AAAAAAAAAwk/E9U0ZM218EI/s1600-h/pic3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 155px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/SlV8L-Y93cI/AAAAAAAAAwk/E9U0ZM218EI/s400/pic3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5356323876995194306" /&gt;&lt;/a&gt;&lt;br /&gt;Can you see the little pastel pink colour in the new thin left margin that runs down the page?  If you float the mouse over the colour you get:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5hhNK2aXwp8/SlV8MJgNBeI/AAAAAAAAAws/NQ2CLIMEKro/s1600-h/pic4.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 155px;" src="http://1.bp.blogspot.com/_5hhNK2aXwp8/SlV8MJgNBeI/AAAAAAAAAws/NQ2CLIMEKro/s400/pic4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5356323879978337762" /&gt;&lt;/a&gt;&lt;br /&gt;...a little popup that shows the code you deleted. The new margin feature shows visually the addition and removal of code as tied to the IDE's undo history. If you right click on the small colour segment you get a context menu that lets you work with the change:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5hhNK2aXwp8/SlV8Mds7OoI/AAAAAAAAAw0/Wh9kJ8GV99E/s1600-h/pic5.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 172px;" src="http://4.bp.blogspot.com/_5hhNK2aXwp8/SlV8Mds7OoI/AAAAAAAAAw0/Wh9kJ8GV99E/s400/pic5.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5356323885400406658" /&gt;&lt;/a&gt;&lt;br /&gt;As promised, I believe this to be the most obscure new feature in JDev11gR1. I set a friendly challenge to readers to find an even smaller obscure new feature in the latest release.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-6035647955070793820?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/LWPuOrxFfAw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/LWPuOrxFfAw/jdev-11gr1-most-obscure-new-ide-feature.html</link><author>noreply@blogger.com (Chris Muir)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_5hhNK2aXwp8/SlV8LDQVHNI/AAAAAAAAAwU/uf-9XX3Kitw/s72-c/pic1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/07/jdev-11gr1-most-obscure-new-ide-feature.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-38586079.post-6242865007391840494</guid><pubDate>Tue, 07 Jul 2009 04:08:00 +0000</pubDate><atom:updated>2009-07-07T13:33:21.593+08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ADF Faces RC</category><category domain="http://www.blogger.com/atom/ns#">JDeveloper</category><title>Increasing/decreasing JDev 11g ADF Faces RC page font size at runtime</title><description>A feature seen on some web sites is buttons to increase and decrease the text font size.  While most browsers supply this functionality by default (eg. In Firefox you can press Ctrl plus or minus), giving web page buttons to do this can assist less computer literate users who may not now about the browser's inbuilt functions.&lt;br /&gt;&lt;br /&gt;The solution requires a javascript routine.  A quick Google on "javascript increase fontsize" returns a number of useful hits including this &lt;a href="http://www.white-hat-web-design.co.uk/articles/js-fontsize.php"&gt;one&lt;/a&gt; by White Hat Web Design.&lt;br /&gt;&lt;br /&gt;White Hat's code is a fairly common example available on the internet for doing just this in a standard web page.&lt;br /&gt;&lt;br /&gt;Providing this functionality in JDeveloper 11g's ADF Faces RC requires a bit of tweaking.  The following describes the bits of code you'll need.&lt;br /&gt;&lt;br /&gt;Javascript&lt;br /&gt;&lt;br /&gt;The following code takes the White Hat javascript and tweaks it:&lt;pre name="code" class="java"&gt;&lt;br /&gt;var fontMin=10;&lt;br /&gt;var fontMax=36;&lt;br /&gt;function increaseFontSize(event) {&lt;br /&gt;   event.cancel();&lt;br /&gt;   var p = document.getElementsByTagName('span'); // here&lt;br /&gt;   for(i=0; i &lt; p.length; i++) {&lt;br /&gt;      if(p[i].style.fontSize) {&lt;br /&gt;         var s = parseInt(p[i].style.fontSize.replace('px',''));&lt;br /&gt;      } else {&lt;br /&gt;         var s = 14;&lt;br /&gt;      }&lt;br /&gt;      if(s!=fontMax) {&lt;br /&gt;         s += 2;&lt;br /&gt;      }&lt;br /&gt;      p[i].style.fontSize = s+'px';&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function decreaseFontSize(event) {&lt;br /&gt;   event.cancel();&lt;br /&gt;   var p = document.getElementsByTagName('span'); // and here&lt;br /&gt;   for(i=0; i &lt; p.length;i++) {&lt;br /&gt;      if(p[i].style.fontSize) {&lt;br /&gt;         var s = parseInt(p[i].style.fontSize.replace('px',''));&lt;br /&gt;      } else {&lt;br /&gt;         var s = 12;&lt;br /&gt;      }&lt;br /&gt;      if(s!=fontMin) {&lt;br /&gt;         s -= 2;&lt;br /&gt;      }&lt;br /&gt;      p[i].style.fontSize = s+'px';&lt;br /&gt;   }   &lt;br /&gt;}&lt;/pre&gt;First tweaks to the original code, note that each method now takes an event object, and then cancels the event on executing the javascript.  While I'm not entirely over the need for this, my understanding is it hooks into the ADF Faces RC javascript engine and we'll see a bit further down in this post the usage of the clientListener tags to invoke this javascript.  (Some more documentation on the ADF javascript engine would be appreciated Oracle – hint hint).&lt;br /&gt;&lt;br /&gt;Secondly note the two commented lines. The original code searched for &amp;lt;p&gt; tags, while in ADF Faces RC pages we need to search for &amp;lt;span&gt; tags, as this is where ADF Faces RC places raw text.&lt;br /&gt;&lt;br /&gt;Load the javascript into JSF&lt;br /&gt;&lt;br /&gt;In the page we wish to include the javascript we include the following code:&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&lt;trh:script source="js/fonts.js"/&gt;&lt;br /&gt;&lt;/pre&gt;...assuming you stored the above javascript in the ViewController public_html/js subdirectory as fonts.js.&lt;br /&gt;&lt;br /&gt;(Alternatively this tag could go into your JSF template so you only need to include it once)&lt;br /&gt;&lt;br /&gt;Note that this is in fact a Apache Trinidad component, not ADF Faces RC.  As such you also need to change your JSF page's &amp;lt;jsp:root&gt; tag to include the Trinidad HTML tag library as follows:&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&lt;jsp:root&lt;br /&gt;  xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" &lt;br /&gt;  xmlns:f="http://java.sun.com/jsf/core"&lt;br /&gt;  xmlns:h="http://java.sun.com/jsf/html"   &lt;br /&gt;  xmlns:af="http://xmlns.oracle.com/adf/faces/rich"&lt;br /&gt;  xmlns:trh="http://myfaces.apache.org/trinidad/html"&gt;&lt;br /&gt;&lt;/pre&gt;Buttons&lt;br /&gt;&lt;br /&gt;Next in order to provide buttons to call the javascript we include the following command controls on our page:&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&lt;af:commandLink text="Smaller"&gt;&lt;br /&gt;  &lt;af:clientListener method="decreaseFontSize" type="action"/&gt;&lt;br /&gt;&lt;/af:commandLink&gt;&lt;br /&gt;&lt;af:commandLink text="Larger"&gt;&lt;br /&gt;  &lt;af:clientListener method="increaseFontSize" type="action"/&gt;&lt;br /&gt;&lt;/af:commandLink&gt;&lt;br /&gt;&lt;/pre&gt;Note the use of the clientListener tag to invoke the javascript functions we defined above.&lt;br /&gt;&lt;br /&gt;Near success&lt;br /&gt;&lt;br /&gt;At this point if you run your page you should see the fonts scale up and down when you press the relevant commandLink button.&lt;br /&gt;&lt;br /&gt;One thing you may notice is that if you have other text based command and go components on the page (eg. &amp;lt;af:commandLink&gt; &amp;lt;goLink&gt;), the text fails to grow or shrink on pressing your new buttons.  This occurs because the command and go components are rendered in a HTML &amp;lt; href&gt; tag rather than the &amp;lt;span&gt; tag we coded in our javascript. An easy solution to this is to modify your components as follows:&lt;br /&gt;&lt;br /&gt;Original&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&lt;af:commandLink text="Do something really important"/&gt;&lt;br /&gt;&lt;/pre&gt;Fix&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&lt;af:commandLink&gt;&lt;br /&gt;  &lt;af:outputText value="Do something really important" noWrap="true"/&gt;&lt;br /&gt;&lt;/af:commandLink&gt;&lt;br /&gt;&lt;/pre&gt;As the command control now uses a normal outputText component to render the text, this in turn is rendered as a HTML &amp;lt;span&gt; tag in the end HTML page and will be subject to our javascript routines results.&lt;br /&gt;&lt;br /&gt;One other thing you might notice, is in Firefox the font fails to shrink at all.  Remember that Firefox has a user preference that stops this from occurring under Tools -&gt; Options -&gt; Content -&gt; Fonts &amp;amp; Colours -&gt; Advanced -&gt; Minimum Font Size, a particularly useful feature on my laptop that runs at 1 sqwillion by 1 sqwillion resolution, where I can't see a d@mned thing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/38586079-6242865007391840494?l=one-size-doesnt-fit-all.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/5ad_syAPiAo" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/OneSizeDoesntFitAll/~3/5ad_syAPiAo/increasingdecreasing-jdev-11g-adf-faces.html</link><author>noreply@blogger.com (Chris Muir)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://one-size-doesnt-fit-all.blogspot.com/2009/06/increasingdecreasing-jdev-11g-adf-faces.html</feedburner:origLink></item></channel></rss>
