<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://chrismuir.sys-con.com"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Latest News from Chris Muir</title>
 <link>http://chrismuir.sys-con.com/</link>
 <description>Latest News from Chris Muir</description>
 <language>en</language>
 <copyright>Copyright 2009 Ulitzer.com</copyright>
 <generator>Ulitzer.com</generator>
 <lastBuildDate>Tue, 01 Dec 2009 02:47:51 EST</lastBuildDate>
 <docs>http://backend.userland.com/rss</docs>
 <ttl>360</ttl>
<item>
 <title>Oracle Dynamic Tabs Shell - ADF 11gR1 – UI Shell </title>
 <link>http://chrismuir.sys-con.com/node/1202777</link>
 <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 &quot;Oracle Dynamic Tabs Shell&quot;.  This template is part of Oracle&#039;s &lt;a href=&quot;http://www.oracle.com/technology/products/adf/patterns/index.html&quot;&gt;ADF Functional Patterns and Best Practices&lt;/a&gt; efforts, also referred to as the &quot;UI Shell&quot;. Complete documentation is available &lt;a href=&quot;http://www.oracle.com/technology/products/adf/patterns/11/uishell.html&quot;&gt;here&lt;/a&gt;.  I&#039;ll leave readers unfamiliar with the UI Shell to read Oracle&#039;s documentation to understand the basics.&lt;br /&gt;&lt;br /&gt;With my current client we&#039;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=&quot;http://groups.google.com/group/adf-methodology/browse_thread/thread/f84bdcec40b7819f?hl=en&quot;&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 &quot;Oracle Dynamic Tabs Shell&quot; page template option:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/SxNJYCjctLI/AAAAAAAAA2w/4Hvqaq9DCdg/s1600/ui1.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 258px;&quot; src=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/SxNJYCjctLI/AAAAAAAAA2w/4Hvqaq9DCdg/s400/ui1.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5409748254753338546&quot; /&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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SxNJYiwIQEI/AAAAAAAAA24/V_LJeYLROI0/s1600/ui2.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 350px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SxNJYiwIQEI/AAAAAAAAA24/V_LJeYLROI0/s400/ui2.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5409748263396458562&quot; /&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=&quot;http://blogs.oracle.com/smuenchadf/2009/11/source_for_ps1_dynamic_tab_she.html&quot;&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 &quot;discussions&quot; of &quot;standard&quot; web page layouts versus RIA layouts.  The technical team knows the standard web page layouts weren&#039;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&#039;re building applications now.  With the UI Shell we can short cut the layout &quot;discussions&quot;, say this is what Oracle&#039;s provided us, it works well and this is what we&#039;ll use, allowing us to focus on the more important matter of hand and that&#039;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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SxNJY6jiKeI/AAAAAAAAA3A/0sbVrvQ7FD8/s1600/ui3.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 112px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SxNJY6jiKeI/AAAAAAAAA3A/0sbVrvQ7FD8/s400/ui3.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5409748269786081762&quot; /&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 &quot;Activities&quot; 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&#039;re using the default UI Shell provided through JDeveloper rather than downloading the UI Shell as per Steve Muench&#039;s blog above, and you wish to have a common element in every page using the template, you&#039;ll need to code them in every page which isn&#039;t ideal.  The solution is to download Oracle&#039;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 &quot;Oracle Dynamic Tabs Shell&quot; 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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/SxNJfFM__II/AAAAAAAAA3Y/Awb9o8nH8mk/s1600/ui6.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 271px;&quot; src=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/SxNJfFM__II/AAAAAAAAA3Y/Awb9o8nH8mk/s400/ui6.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5409748375723572354&quot; /&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&#039;re not sure on building an ADF equivalent with a chance to redesign the users&#039; workflow will they still need to do this, if they do we&#039;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=&quot;http://groups.google.com/group/adf-methodology/browse_thread/thread/e7c9d557ab03b1cb?hl=en&quot;&gt;thread&lt;/a&gt; the UI Shell makes a great addition to the &quot;Master JDev Application Workspace&quot; 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&#039;ve made &quot;it dirty&quot;.  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&#039;s activities.  Clicking on a different subsystem tab/page doesn&#039;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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SxNJZCJRpdI/AAAAAAAAA3I/oVBJde4YIRo/s1600/ui4.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 318px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SxNJZCJRpdI/AAAAAAAAA3I/oVBJde4YIRo/s400/ui4.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5409748271823431122&quot; /&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&#039;t look like B and C can be set in the default UI Shell.  Ideally we&#039;d want something like this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SxNJZYL53dI/AAAAAAAAA3Q/na2NJtbfqcA/s1600/ui5.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 322px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SxNJZYL53dI/AAAAAAAAA3Q/na2NJtbfqcA/s400/ui5.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5409748277740035538&quot; /&gt;&lt;/a&gt;13) The overall template is extremely small – only 74k – wow, Oracle can create something that doesn&#039;t take up an entire CD! ;-)&lt;br /&gt;&lt;br /&gt;14) I note in the source code downloadable from Steve Muench&#039;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&#039;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&#039;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=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-6440026580328519387?l=one-size-doesnt-fit-all.blogspot.com&#039; alt=&#039;&#039; /&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/ce5PvdTToxc&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1202777&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Mon, 30 Nov 2009 10:30:00 EST</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1202777</guid>
 <comments>http://chrismuir.sys-con.com/node/1202777#feedback</comments>
</item>
<item>
 <title>ADF EMG goes international - UKOUG style</title>
 <link>http://chrismuir.sys-con.com/node/1186544</link>
 <description>I&#039;m happy to say that the &lt;a href=&quot;http://groups.google.com/group/adf-methodology?hl=en&quot;&gt;ADF Enterprise Methodology Group&lt;/a&gt; is running its first UKOUG &lt;a href=&quot;http://techandebs.ukoug.org/default.asp?p=3227&amp;dlgact=shwprs&amp;prs_prsid=4178&amp;day_dayid=34&quot;&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=&quot;http://www.veriton.co.uk/roller/fmw/&quot;&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 &quot;production&quot; 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&#039;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=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-131286136674525512?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/wsrujZTZ0nc&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1186544&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sat, 14 Nov 2009 02:19:00 EST</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1186544</guid>
 <comments>http://chrismuir.sys-con.com/node/1186544#feedback</comments>
</item>
<item>
 <title>ADF BC Groovy – Showing Old Values Along with New</title>
 <link>http://chrismuir.sys-con.com/node/1185105</link>
 <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&#039;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 &quot;Persistent&quot; and &quot;Derived from SQL Expression&quot; properties are turned off for the new transient attribute.&lt;br /&gt;&lt;br /&gt;3) Set the &quot;Value Type&quot; 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&#039;t familiar to you in JDeveloper 11g consult Grant Ronald&#039;s &lt;a href=&quot;http://www.oracle.com/technology/products/jdev/11/how-tos/groovy/introduction_to_groovy.pdf&quot;&gt;Introduction to Groovy&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A bad steer here maybe to try and use ADF Groovy&#039;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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/Su--b2b8OXI/AAAAAAAAA2o/MYyCNlsBuRU/s1600-h/groovy.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 186px;&quot; src=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/Su--b2b8OXI/AAAAAAAAA2o/MYyCNlsBuRU/s400/groovy.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5399743863918967154&quot; /&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&#039;ll note that initially the OldPosition field shows what&#039;s in the Position field.  When you change the Position field&#039;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=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-10124615613825984?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/HfFV9pc8uwY&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1185105&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Fri, 13 Nov 2009 14:45:00 EST</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1185105</guid>
 <comments>http://chrismuir.sys-con.com/node/1185105#feedback</comments>
</item>
<item>
 <title>Just how famous can one man get?</title>
 <link>http://chrismuir.sys-con.com/node/1173591</link>
 <description>Between OOW and the &lt;a href=&quot;http://www.ausoug.org.au/2020&quot;&gt;AUSOUG&lt;/a&gt; conferences it&#039;s a bit of a slow blogging time for me, while presentation preparation takes priority.  With a little spare time I thought I&#039;d share this photo of some recent booty (and before you get all excited, that&#039;s arrrrgh &quot;Pirate&quot; booty, not the other sort):&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/Su7cd_jd35I/AAAAAAAAA2g/WSARtWlJ41c/s1600-h/DSC02217a.JPG&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 273px;&quot; src=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/Su7cd_jd35I/AAAAAAAAA2g/WSARtWlJ41c/s400/DSC02217a.JPG&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5399495411098312594&quot; /&gt;&lt;/a&gt;&lt;br /&gt;On the right my coveted Oracle ACE Director of the Year award from &lt;a href=&quot;http://www.oracle.com/technology/oramag/oracle/09-nov/o69awards.html#muir&quot;&gt;Oracle Magazine&lt;/a&gt;.  In the middle Duke, thrown from &lt;a href=&quot;http://en.wikipedia.org/wiki/James_Gosling&quot;&gt;James Gosling&lt;/a&gt; himself at his Oracle Develop OOW session.  And on the left my cherished &lt;a href=&quot;http://www.sagecomputing.com.au/&quot;&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&#039; own Chris &quot;ACE Director of the Year&quot; Muir - &quot;How famous can one man get&quot; 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=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-3587814987944206452?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/XmivNLMKLmU&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1173591&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 04 Nov 2009 04:20:00 EST</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1173591</guid>
 <comments>http://chrismuir.sys-con.com/node/1173591#feedback</comments>
</item>
<item>
 <title>ODTUG Down Under – More ACEs than a Pack of Cards</title>
 <link>http://chrismuir.sys-con.com/node/1169469</link>
 <description>Regular readers already know that ODTUG in conjunction with Oracle Technology Network has invited a number of Oracle ACEs and ACE Directors to present down under. ODTUG has teamed with AUSOUG 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;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1169469&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Mon, 02 Nov 2009 19:50:00 EST</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1169469</guid>
 <comments>http://chrismuir.sys-con.com/node/1169469#feedback</comments>
</item>
<item>
 <title>Working with WLS 10.3.1 SQLAuthenticator Password Algorithms</title>
 <link>http://chrismuir.sys-con.com/node/1159532</link>
 <description>In the &lt;a href=&quot;http://one-size-doesnt-fit-all.blogspot.com/2009/10/part-i-working-with-wls-1031.html&quot;&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 &quot;password&quot; 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&#039;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&#039;ll investigate generating a SHA-1 password using the Oracle database&#039;s encryption facilities (so in this case the database acts as the other subsystem), comparing the database&#039;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=&quot;font-weight:bold;&quot;&gt;dbms_crypto&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Oracle database fans will be familiar with the &lt;a href=&quot;http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_crypto.htm#BJFCGDIC&quot;&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&#039;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=&quot;code&quot; class=&quot;java&quot;&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 := &#039;password&#039;;&lt;br /&gt;  raw_input    := utl_raw.cast_to_raw(convert(input_string, &#039;AL32UTF8&#039;,&#039;US7ASCII&#039;));&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(&#039;Output: &#039; || 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&#039;t match our WLS output for the same plaintext password &quot;password&quot; encrypted with SHA-1.&lt;br /&gt;&lt;br /&gt;The missing bit of information (that I haven&#039;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&#039;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=&quot;code&quot; class=&quot;java&quot;&gt;&lt;br /&gt;byte[] bytearray = hexStringToByteArray(&quot;5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8&quot;);&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=&quot;http://stackoverflow.com/questions/140131/convert-a-string-representation-of-a-hex-dump-to-a-byte-array-using-java&quot;&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=&quot;font-weight:bold;&quot;&gt;Conclusion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Why the WebLogic Server&#039;s SQLAuthenticator can make use of different encryption algorithm when writing to the database, it&#039;s important to ensure that the results are expected and understood and can be used by other subsystems.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-9056575003088041413?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/L3EavdFuwnM&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1159532&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 27 Oct 2009 11:15:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1159532</guid>
 <comments>http://chrismuir.sys-con.com/node/1159532#feedback</comments>
</item>
<item>
 <title>My OOW presentations - part II</title>
 <link>http://chrismuir.sys-con.com/node/1148211</link>
 <description>My 2 presentations for OOW are now available for download from the &lt;a href=&quot;http://www.sagecomputing.com.au&quot;&gt;SAGE Computing Services&lt;/a&gt; website here:&lt;br /&gt;&lt;a href=&quot;http://www.sagecomputing.com.au/papers_presentations/SOALite.ppt&quot;&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=&quot;http://www.sagecomputing.com.au/papers_presentations/webservice1-2-3v1.0.pdf&quot;&gt;Oracle JDeveloper 11g JAX-WS Web Services: As easy as 1-2-3: XSD, WSDL, Generate!&lt;/a&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-9182944295252006441?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/h-Z7DUhQ-gA&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1148211&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sun, 18 Oct 2009 16:53:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1148211</guid>
 <comments>http://chrismuir.sys-con.com/node/1148211#feedback</comments>
</item>
<item>
 <title>Working with WLS 10.3.1 SQLAuthenticator Password Algorithms - Part 1</title>
 <link>http://chrismuir.sys-con.com/node/1130973</link>
 <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 &quot;Security Providers&quot;.  In order to work with a database table structure a &quot;SQL Authenticator&quot; provider is required.&lt;br /&gt;&lt;br /&gt;Edwin Biemond has a good &lt;a href=&quot;http://biemond.blogspot.com/2008/12/using-database-tables-as-authentication.html&quot;&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&#039;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&#039;s written to the database.&lt;br /&gt;&lt;br /&gt;To extend Edwin&#039;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 &quot;a&quot; is obvious, unencrypted password in the database is a security weakness.  But what about &quot;b&quot;, 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&#039;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&#039;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=&quot;font-weight:bold;&quot;&gt;Password Settings&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On configuring a SQL Authenticator as per Edwin&#039;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&#039;ll note the following options that influence the generation of encrypted passwords:&lt;br /&gt;&lt;br /&gt;* &lt;span style=&quot;font-weight:bold;&quot;&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&#039;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&#039;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&#039;s password in the database, WLS will throw an error stating it doesn&#039;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=&quot;font-weight:bold;&quot;&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&#039;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=&quot;http://java.sun.com/javase/6/docs/technotes/guides/security/StandardNames.html#algspec&quot;&gt;Documentation&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For password generation we want a &lt;a href=&quot;http://en.wikipedia.org/wiki/Cryptographic_hash_function&quot;&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&#039;s specified function.&lt;br /&gt;&lt;br /&gt;* &lt;span style=&quot;font-weight:bold;&quot;&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&#039;m currently unsure of the difference between HASHED and SALTEDHASHED, the WLS documentation doesn&#039;t differentiate between them, though it does result in a different encrypted value.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Testing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Assuming you&#039;ve configured your SQL Authenticator correctly as per Edwin&#039;s post, let&#039;s test what the different settings of the properties do.&lt;br /&gt;&lt;br /&gt;For our testing let&#039;s assume there&#039;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=&quot;font-style:italic;&quot;&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&#039;t include the algorithm prefix (ie. {SHA-1}), in fact it was created by some other system that doesn&#039;t include the prefix.  The ALPHA&#039;s password will be updated to &quot;password&quot;.&lt;br /&gt;&lt;br /&gt;For a new user BETA the password will be set to &quot;password&quot;.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;First result&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Updated user ALPHA password = &quot;password&quot;&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&#039;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=&quot;font-style:italic;&quot;&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&#039;t include the algorithm prefix (ie. {SHA-1}), in fact it was created by some other system that doesn&#039;t include the prefix.  The ALPHA&#039;s password will be updated to &quot;password&quot;.&lt;br /&gt;&lt;br /&gt;For a new user CHARLIE the password will be set to &quot;password&quot;.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&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&#039;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&#039;s passwords uses the SHA-1 algorithm by default.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;Third test&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In this test we&#039;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 &quot;password&quot;.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&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=&quot;font-style:italic;&quot;&gt;Fourth test&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the last test we&#039;ll switch back to the SHA-1 algorithm, and attempt to update the ALPHA user&#039;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=&quot;font-style:italic;&quot;&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&#039;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=&quot;font-weight:bold;&quot;&gt;Conclusion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At this point we&#039;ve seen how WLS can generate encrypted passwords using different algorithms down to the database.  From here it&#039;s important to check the encrypted results in the database are actually &quot;standard&quot;.  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=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-624150363070835252?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/20I7__6ktnU&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1130973&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Mon, 05 Oct 2009 15:00:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1130973</guid>
 <comments>http://chrismuir.sys-con.com/node/1130973#feedback</comments>
</item>
<item>
 <title>Where real ADF developers meet - OOW09 ADF EMG</title>
 <link>http://chrismuir.sys-con.com/node/1123760</link>
 <description>Once again the &lt;a href=&quot;http://groups.google.com/group/adf-methodology&quot;&gt;ADF Enterprise Methodology Group&lt;/a&gt; is meeting at &lt;a href=&quot;http://www.oracle.com/openworld&quot;&gt;Oracle Open World&lt;/a&gt; to discuss JDeveloper and ADF, and we invite you to join us.  This year &lt;a href=&quot;http://www.veriton.co.uk/roller/fmw/&quot;&gt;Simon Haslam&lt;/a&gt; has taken the reins and delivered not 1 but &lt;a href=&quot;http://wiki.oracle.com/page/ADF+EMG+Sessions&quot;&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 &quot;Show me yours!&quot; 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&#039;re working with each day in the ADF market.&lt;br /&gt;&lt;br /&gt;Can&#039;t make OOW this year but really want to attend ADF EMG?  Are you attending the upcoming &lt;a href=&quot;http://techandebs.ukoug.org/&quot;&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=&quot;http://iadvise.blogspot.com/&quot;&gt;Nathalie Roman&lt;/a&gt;, then OOW in October, we&#039;re happy to announce we&#039;ll be running a session at the UKOUG conference too.  Watch this space for more information soon!&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-5680804158647997916?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/GHU5CoBQFxM&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1123760&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 29 Sep 2009 01:08:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1123760</guid>
 <comments>http://chrismuir.sys-con.com/node/1123760#feedback</comments>
</item>
<item>
 <title>Blatant advert: Yes, we still do Oracle Forms development and training</title>
 <link>http://chrismuir.sys-con.com/node/1116437</link>
 <description>Blatant plug for &lt;a href=&quot;http://www.sagecomputing.com.au&quot;&gt;SAGE Computing Services&lt;/a&gt;.  Avert your eyes now if you&#039;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&#039;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&#039;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=&quot;http://www.sagecomputing.com.au/oracle_training_australia.html&quot;&gt;website&lt;/a&gt;.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-1333865049596122052?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/MBUnskxdW0U&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1116437&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 22 Sep 2009 09:21:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1116437</guid>
 <comments>http://chrismuir.sys-con.com/node/1116437#feedback</comments>
</item>
<item>
 <title>Another Aussie Oracle blogger - Scott Wesley</title>
 <link>http://chrismuir.sys-con.com/node/1115236</link>
 <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&#039;m losing track big time of what I&#039;ve done and haven&#039;t done.  If I turn up to OOW without any pants you&#039;ll know why.&lt;br /&gt;&lt;br /&gt;Anyhow, Scott Wesley, a fellow &lt;a href=&quot;http://www.sagecomputing.com.au/&quot;&gt;SAGE-ite&lt;/a&gt;, has taken up the Oracle blog reins, and can be found at &lt;a href=&quot;http://triangle-circle-square.blogspot.com/&quot;&gt;Triangle Circle Square&lt;/a&gt;.  Scott&#039;s one of the team&#039;s ninja consultants and Oracle trainers, defender of all things Oracle, except JDeveloper it seems, which makes me highly suspicious.  Scott&#039;s current blog focus is SQL features, which seems oh-so-persistant-store-to-me.  However I&#039;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=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-7208138000885452388?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/xn2VRI8rGp8&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1115236&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Mon, 21 Sep 2009 22:44:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1115236</guid>
 <comments>http://chrismuir.sys-con.com/node/1115236#feedback</comments>
</item>
<item>
 <title>Upgrading Oracle WebLogic Servers from 10.3 to 10.3.1</title>
 <link>http://chrismuir.sys-con.com/node/1081416</link>
 <description>Recently we upgraded our Oracle WebLogic Servers 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=&quot;code&quot; class=&quot;xml&quot;&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 &#039;deploy&#039; on application &#039;App_application1&#039; is initializing on &#039;ADFServer&#039;&lt;br /&gt;[08:55:06 AM] [Deployer:149193]Operation &#039;deploy&#039; on application &#039;App_application1&#039; has failed on &#039;ADFServer&#039;&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&#039;t find the libraries that the deployed application are dependent on.  To highlight them:&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&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&#039;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=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-1148435216553675620?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/5APDPs8UXCk&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1081416&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sat, 19 Sep 2009 09:15:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1081416</guid>
 <comments>http://chrismuir.sys-con.com/node/1081416#feedback</comments>
</item>
<item>
 <title>WebLogic Server - Identity vs Trust Keystores</title>
 <link>http://chrismuir.sys-con.com/node/1102839</link>
 <description>In computing most technologies have lots of terms and acronyms to learn, it&#039;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&#039;m not surprised why security is considered badly implemented because the average Joe will struggle (and for the record I&#039;m the average Chris so I struggle too ;-).&lt;br /&gt;&lt;br /&gt;I&#039;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=&quot;http://kingsfleet.blogspot.com/&quot;&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=&quot; http://download.oracle.com/docs/cd/E12839_01/web.1111/e13707/identity_trust.htm#i1170342&quot;&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;&quot;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*.&quot;&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 &quot;server certificate&quot;, 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 &quot;identity&quot; asserted by the digital certificate is true?  That&#039;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 &quot;identity&quot; of the server is established by what&#039;s stored in the &quot;identity&quot; keystore, and its contents are what are farmed out to clients establishing secure connections with the server, who then verify the supplied digital certificate&#039;s CA against the clients own list of trusted CAs.  The &quot;identity keystore&quot; is also referred to as the &quot;server keystore&quot;, because it establishes the server&#039;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 &quot;managed server&quot;, 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&#039;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&#039;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=&quot;http://www.oracle.com/technology/pub/articles/damo-howto.html&quot;&gt;article&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Final author&#039;s note: if any readers find anything particularly wrong with the ideas presented in this post I&#039;d be keen to hear them please.  As I&#039;ve really only experience with 1-way-SSL, it&#039;s hard to know if what I&#039;ve said applies to the concepts of mutual SSL and other security configurations.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-7659683152307350793?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/E0uIN0OIr48&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1102839&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sat, 12 Sep 2009 17:30:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1102839</guid>
 <comments>http://chrismuir.sys-con.com/node/1102839#feedback</comments>
</item>
<item>
 <title>One-Way SSL with JAX-WS Using JDeveloper 11gR1 and WLS 10.3.1</title>
 <link>http://chrismuir.sys-con.com/node/1075471</link>
 <description>A while back Gerard Davison blogged some simple examples of using &lt;a href=&quot;http://kingsfleet.blogspot.com/2009/01/security-policy-worked-example.html&quot;&gt;WS-Security Policies&lt;/a&gt;.  Gerard&#039;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=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/e13713/message.htm#i210119&quot;&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&#039;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=&quot;font-weight:bold;&quot;&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&#039;s WebLogic Server, WLS managed servers and the WLS console&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;One-Way SSL vs Two-Way SSL&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For those not familiar with either, Oracle&#039;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=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/e13710/concepts.htm#i1122990&quot;&gt;Understanding Security for Oracle WebLogic Server&lt;/a&gt; manual.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Steps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To implement a One-Way SSL example we&#039;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&#039;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=&quot;font-weight:bold;&quot;&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=&quot;http://one-size-doesnt-fit-all.blogspot.com/2008/11/creating-jax-ws-web-services-via-wsdl.html&quot;&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&#039;s &lt;a href=&quot;http://www.oracle.com/technology/products/jdev/viewlets/11/index.html&quot;&gt;OTN&lt;/a&gt; which show how to construct the WSDL in a drag&#039;n&#039;drop fashion. &lt;br /&gt;&lt;br /&gt;The resulting web service we&#039;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=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;?xml version=&quot;1.0&quot; encoding=&quot;windows-1252&quot; ?&gt;&lt;br /&gt;&lt;xsd:schema xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns=&quot;http://www.sagecomputing.com.au&quot;&lt;br /&gt;            targetNamespace=&quot;http://www.sagecomputing.com.au&quot; elementFormDefault=&quot;qualified&quot;&gt;&lt;br /&gt;  &lt;xsd:element name=&quot;inputElement&quot; type=&quot;xsd:string&quot;/&gt;&lt;br /&gt;  &lt;xsd:element name=&quot;outputElement&quot; type=&quot;xsd:string&quot;/&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=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;&lt;br /&gt;&lt;definitions targetNamespace=&quot;urn:OneWaySSLExample.wsdl&quot; xmlns=&quot;http://schemas.xmlsoap.org/wsdl/&quot;&lt;br /&gt;             xmlns:tns=&quot;urn:OneWaySSLExample.wsdl&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&lt;br /&gt;             xmlns:soap=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; xmlns:mime=&quot;http://schemas.xmlsoap.org/wsdl/mime/&quot;&lt;br /&gt;             xmlns:soap12=&quot;http://schemas.xmlsoap.org/wsdl/soap12/&quot; xmlns:wsca=&quot;http://www.sagecomputing.com.au&quot;&gt;&lt;br /&gt;  &lt;types&gt;&lt;br /&gt;    &lt;xsd:schema&gt;&lt;br /&gt;      &lt;xsd:import schemaLocation=&quot;../xsd/OneWaySSLExample.xsd&quot; namespace=&quot;http://www.sagecomputing.com.au&quot;/&gt;&lt;br /&gt;    &lt;/xsd:schema&gt;&lt;br /&gt;  &lt;/types&gt;&lt;br /&gt;  &lt;message name=&quot;InputMessage&quot;&gt;&lt;br /&gt;    &lt;part name=&quot;part&quot; element=&quot;wsca:inputElement&quot;/&gt;&lt;br /&gt;  &lt;/message&gt;&lt;br /&gt;  &lt;message name=&quot;OutputMessage&quot;&gt;&lt;br /&gt;    &lt;part name=&quot;part&quot; element=&quot;wsca:outputElement&quot;/&gt;&lt;br /&gt;  &lt;/message&gt;&lt;br /&gt;  &lt;portType name=&quot;OneWaySSLPortType&quot;&gt;&lt;br /&gt;    &lt;operation name=&quot;OneWaySSLOperation&quot;&gt;&lt;br /&gt;      &lt;input message=&quot;tns:InputMessage&quot;/&gt;&lt;br /&gt;      &lt;output message=&quot;tns:OutputMessage&quot;/&gt;&lt;br /&gt;    &lt;/operation&gt;&lt;br /&gt;  &lt;/portType&gt;&lt;br /&gt;  &lt;binding name=&quot;OneWaySSLBinding&quot; type=&quot;tns:OneWaySSLPortType&quot;&gt;&lt;br /&gt;    &lt;soap12:binding style=&quot;document&quot; transport=&quot;http://schemas.xmlsoap.org/soap/http&quot;/&gt;&lt;br /&gt;    &lt;operation name=&quot;OneWaySSLOperation&quot;&gt;&lt;br /&gt;      &lt;soap12:operation style=&quot;document&quot; soapAction=&quot;urn:OneWaySSLExample.wsdl/OneWaySSLOperation&quot;/&gt;&lt;br /&gt;      &lt;input&gt;&lt;br /&gt;        &lt;soap12:body use=&quot;literal&quot; parts=&quot;part&quot;/&gt;&lt;br /&gt;      &lt;/input&gt;&lt;br /&gt;      &lt;output&gt;&lt;br /&gt;        &lt;soap12:body use=&quot;literal&quot; parts=&quot;part&quot;/&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=&quot;OneWaySSLService&quot;&gt;&lt;br /&gt;    &lt;port name=&quot;OneWaySSLPortTypePort&quot; binding=&quot;tns:OneWaySSLBinding&quot;&gt;&lt;br /&gt;      &lt;soap12:address location=&quot;http://www.sagecomputing.com.au &quot;/&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=&quot;code&quot; class=&quot;java&quot;&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 = &quot;OneWaySSLService&quot;,&lt;br /&gt;            targetNamespace = &quot;urn:OneWaySSLExample.wsdl&quot;,&lt;br /&gt;            portName = &quot;OneWaySSLPortTypePort&quot;,&lt;br /&gt;            endpointInterface = &quot;au.com.sagecomputing.ws.OneWaySSLPortType&quot;,&lt;br /&gt;            wsdlLocation = &quot;/WEB-INF/wsdl/OneWaySSLExample.wsdl&quot;)&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 &quot;Hello &quot; + 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 &quot;Hello &quot;.&lt;br /&gt;&lt;br /&gt;Example request SOAP payload&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;env:Envelope xmlns:env=&quot;http://www.w3.org/2003/05/soap-envelope&quot; xmlns:ns1=&quot;http://www.sagecomputing.com.au&quot;&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=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;?xml version = &#039;1.0&#039; encoding = &#039;UTF-8&#039;?&gt;&lt;br /&gt;&lt;S:Envelope xmlns:S=&quot;http://www.w3.org/2003/05/soap-envelope&quot;&gt;&lt;br /&gt;   &lt;S:Body&gt;&lt;br /&gt;      &lt;outputElement xmlns=&quot;http://www.sagecomputing.com.au&quot;&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&#039;s Application Navigator:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tOW0MlyI/AAAAAAAAAz0/Yh6wVO5dzNI/s1600-h/sslExamplePic0.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 254px; height: 400px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tOW0MlyI/AAAAAAAAAz0/Yh6wVO5dzNI/s400/sslExamplePic0.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5368199743003203362&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&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=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/e13710/concepts.htm#i1122990&quot;&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&#039;s trusted CA), is valid (not expired), and satisfies the other certificate constraints.&lt;br /&gt;2. The client checks that the certificate Subject&#039;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=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/e13707/identity_trust.htm#i1202182&quot;&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&#039;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&#039;ll see the following entries:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tO5JWl1I/AAAAAAAAAz8/bD2U_1xqnnA/s1600-h/sslExamplePic1.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 376px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tO5JWl1I/AAAAAAAAAz8/bD2U_1xqnnA/s400/sslExamplePic1.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5368199752218744658&quot; /&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&#039;s original &lt;a href=&quot;http://kingsfleet.blogspot.com/2009/01/security-policy-worked-example.html&quot;&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&#039;s identity and trust keystore&lt;br /&gt;&lt;br /&gt;The following describes those steps in detail.  In order to do this we&#039;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&#039;s setDomainEnv.cmd command.  Something like:&lt;br /&gt;&lt;br /&gt;&quot;C:\&lt;wls_home&gt;\setDomainEnv.cmd&quot;&lt;br /&gt;&lt;br /&gt;Once run ensure you&#039;re still in your new directory.&lt;br /&gt;&lt;br /&gt;b) Generate our own trusted certificate authority digital certificate&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;java utils.CertGen -certfile ServerCACert -keyfile ServerCAKey -keyfilepass ServerCAKey -selfsigned -e &lt;a href=&quot;mailto:somebody@xxxx.com.au&quot;&gt;somebody@xxxx.com.au&lt;/a&gt; -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=&quot;http://www.openssl.org&quot;&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&#039;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=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/e13749/utils.htm#i1198919&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;* .der vs .pem files can be found &lt;a href=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/e13707/identity_trust.htm#i1196582&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://e-docs.bea.com/wls/docs92/secmanage/identity_trust.html#wp1195506&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;* WLS provides two utilities &lt;a href=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/e13749/utils.htm#i1218395&quot;&gt;der2pem&lt;/a&gt; and &lt;a href=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/e13749/utils.htm#i1185185&quot;&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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sn-tPTY5fuI/AAAAAAAAA0E/C8rY0ol90MA/s1600-h/sslExamplePic2.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 322px; height: 400px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sn-tPTY5fuI/AAAAAAAAA0E/C8rY0ol90MA/s400/sslExamplePic2.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5368199759263268578&quot; /&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=&quot;code&quot; class=&quot;xml&quot;&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=&quot;code&quot; class=&quot;xml&quot;&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=&quot;code&quot; class=&quot;xml&quot;&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&#039;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&#039;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=&quot;code&quot; class=&quot;xml&quot;&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=&quot;code&quot; class=&quot;xml&quot;&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=&quot;font-weight:bold;&quot;&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&#039;re using earlier versions of JDeveloper or Eclipse, this mechanism wont work, you must manually add the policies to the WSDL).&lt;pre name=&quot;code&quot; class=&quot;java&quot;&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 = &quot;OneWaySSLService&quot;,&lt;br /&gt;            targetNamespace = &quot;urn:OneWaySSLExample.wsdl&quot;,&lt;br /&gt;            portName = &quot;OneWaySSLPortTypePort&quot;,&lt;br /&gt;            endpointInterface = &quot;au.com.sagecomputing.ws.OneWaySSLPortType&quot;,&lt;br /&gt;            wsdlLocation = &quot;/WEB-INF/wsdl/OneWaySSLExample.wsdl&quot;)&lt;br /&gt;@BindingType(SOAPBinding.SOAP12HTTP_BINDING)&lt;br /&gt;@Policy(uri = &quot;policy:Wssp1.2-2007-Https.xml&quot;) &lt;br /&gt;public class OneWaySSLPortTypeImpl {&lt;br /&gt;&lt;br /&gt;  public String oneWaySSLOperation(String part) {&lt;br /&gt;    return &quot;Hello &quot; + part;&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;&lt;span style=&quot;font-weight:bold;&quot;&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&#039;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=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;?xml version=&#039;1.0&#039; encoding=&#039;UTF-8&#039;?&gt;&lt;!-- Published by JAX-WS RI at &lt;a href=&quot;http://jax-ws.dev.java.net&quot; title=&quot;http://jax-ws.dev.java.net&quot;&gt;http://jax-ws.dev.java.net&lt;/a&gt;. RI&#039;s version is Oracle JAX-WS 2.1.4. --&gt;&lt;definitions xmlns=&quot;http://schemas.xmlsoap.org/wsdl/&quot; xmlns:tns=&quot;urn:OneWaySSLExample.wsdl&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:soap=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; xmlns:mime=&quot;http://schemas.xmlsoap.org/wsdl/mime/&quot; xmlns:soap12=&quot;http://schemas.xmlsoap.org/wsdl/soap12/&quot; xmlns:wsca=&quot;http://www.sagecomputing.com.au&quot; targetNamespace=&quot;urn:OneWaySSLExample.wsdl&quot; xmlns:wsp=&quot;http://schemas.xmlsoap.org/ws/2004/09/policy&quot; xmlns:wssutil=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot;&gt;&lt;wsp:UsingPolicy wssutil:Required=&quot;true&quot; /&gt;&lt;wsp:Policy wssutil:Id=&quot;Wssp1.2-2007-Https.xml&quot;&gt;&lt;ns0:TransportBinding xmlns:ns0=&quot;http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702&quot;&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=&quot;http://localhost:7101/WebServiceSSLExamples-OneWaySSLExample-context-root/OneWaySSLPortTypePort?xsd=1&quot; namespace=&quot;http://www.sagecomputing.com.au&quot; /&gt;&lt;br /&gt;    &lt;/xsd:schema&gt;&lt;br /&gt;  &lt;/types&gt;&lt;br /&gt;  &lt;message name=&quot;InputMessage&quot;&gt;&lt;br /&gt;    &lt;part name=&quot;part&quot; element=&quot;wsca:inputElement&quot; /&gt;&lt;br /&gt;  &lt;/message&gt;&lt;br /&gt;  &lt;message name=&quot;OutputMessage&quot;&gt;&lt;br /&gt;    &lt;part name=&quot;part&quot; element=&quot;wsca:outputElement&quot; /&gt;&lt;br /&gt;  &lt;/message&gt;&lt;br /&gt;  &lt;portType name=&quot;OneWaySSLPortType&quot;&gt;&lt;br /&gt;    &lt;operation name=&quot;OneWaySSLOperation&quot;&gt;&lt;br /&gt;      &lt;input message=&quot;tns:InputMessage&quot; /&gt;&lt;br /&gt;      &lt;output message=&quot;tns:OutputMessage&quot; /&gt;&lt;br /&gt;    &lt;/operation&gt;&lt;br /&gt;  &lt;/portType&gt;&lt;br /&gt;  &lt;binding name=&quot;OneWaySSLBinding&quot; type=&quot;tns:OneWaySSLPortType&quot;&gt;&lt;wsp:PolicyReference URI=&quot;#Wssp1.2-2007-Https.xml&quot; /&gt;&lt;br /&gt;    &lt;soap12:binding style=&quot;document&quot; transport=&quot;http://schemas.xmlsoap.org/soap/http&quot; /&gt;&lt;br /&gt;    &lt;operation name=&quot;OneWaySSLOperation&quot;&gt;&lt;br /&gt;      &lt;soap12:operation style=&quot;document&quot; soapAction=&quot;urn:OneWaySSLExample.wsdl/OneWaySSLOperation&quot; /&gt;&lt;br /&gt;      &lt;input&gt;&lt;br /&gt;        &lt;soap12:body use=&quot;literal&quot; parts=&quot;part&quot; /&gt;&lt;br /&gt;      &lt;/input&gt;&lt;br /&gt;      &lt;output&gt;&lt;br /&gt;        &lt;soap12:body use=&quot;literal&quot; parts=&quot;part&quot; /&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=&quot;OneWaySSLService&quot;&gt;&lt;br /&gt;    &lt;port name=&quot;OneWaySSLPortTypePort&quot; binding=&quot;tns:OneWaySSLBinding&quot;&gt;&lt;br /&gt;      &lt;soap12:address location=&quot;https://localhost:7102/WebServiceSSLExamples-OneWaySSLExample-context-root/OneWaySSLPortTypePort&quot; /&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=&quot;font-weight:bold;&quot;&gt;5) Test the running web service via JDeveloper&#039;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&#039;s particularly useful as you don&#039;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&#039;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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tds-LA1I/AAAAAAAAA0c/SHX8Xt6G2Fg/s1600-h/sslExamplePic6.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 135px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tds-LA1I/AAAAAAAAA0c/SHX8Xt6G2Fg/s400/sslExamplePic6.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5368200006648660818&quot; /&gt;&lt;/a&gt;&lt;br /&gt;This presents the following HTTP Analyzer screens:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/Sn-tdyoISaI/AAAAAAAAA0k/XZECMIMtqAo/s1600-h/sslExamplePic7.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 318px;&quot; src=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/Sn-tdyoISaI/AAAAAAAAA0k/XZECMIMtqAo/s400/sslExamplePic7.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5368200008166820258&quot; /&gt;&lt;/a&gt;&lt;br /&gt;In the top of the screen you&#039;ll see the HTTP Analyzer has formed a dummy request for you to send out based on the web service&#039;s WSDL.  In my example picture I&#039;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=&quot;font-weight:bold;&quot;&gt;6) Test the running web service via SoapUI&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.soapui.org&quot;&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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/Sn-tPyT8L9I/AAAAAAAAA0M/02PavQnXVWk/s1600-h/sslExamplePic3.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 199px;&quot; src=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/Sn-tPyT8L9I/AAAAAAAAA0M/02PavQnXVWk/s400/sslExamplePic3.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5368199767563972562&quot; /&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&#039;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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sn-tdVNlc2I/AAAAAAAAA0U/mE_WmvxK4dY/s1600-h/sslExamplePic4.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 243px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sn-tdVNlc2I/AAAAAAAAA0U/mE_WmvxK4dY/s400/sslExamplePic4.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5368200000270857058&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&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&#039;ll end up with the following code:&lt;pre name=&quot;code&quot; class=&quot;java&quot;&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(&quot;Chris&quot;));&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;Note SSLUtilities is a handy class written by &lt;a href=&quot;http://schrepfler.blogspot.com/2009/06/relaxing-ssl-validation-for-jaxws.html&quot;&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&#039;re not overly concerned about trusting the server&#039;s CA, so we can use SSUtilities.trustAllHttpsCertificates to stop the required checking.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&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&#039;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=&quot;http://www.wireshark.org/&quot;&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&#039;re running the JAX-WS web services via the integrated WLS on the same localhost as SoapUI, you&#039;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&#039;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&#039;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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tOGA54oI/AAAAAAAAAzs/1IjFetqMjdo/s1600-h/sslExample5.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 248px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sn-tOGA54oI/AAAAAAAAAzs/1IjFetqMjdo/s400/sslExample5.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5368199738493100674&quot; /&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&#039;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=&quot;font-weight:bold;&quot;&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&#039;s help has been invaluable.  Any mistakes in this post are of course mine however, of which I&#039;m sure there will be a few in such a long post.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-5229552844110935684?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/O59z4Eqp0Uw&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1075471&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 02 Sep 2009 11:00:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1075471</guid>
 <comments>http://chrismuir.sys-con.com/node/1075471#feedback</comments>
</item>
<item>
 <title>JDev 11gR1 - af:tree mashup – Using Hierarchical Tables and Drag-n-Drop</title>
 <link>http://chrismuir.sys-con.com/node/1091514</link>
 <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=&quot;http://cbhavsar.blogspot.com/2008/09/declarative-databinding-for-lazy.html&quot;&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=&quot;http://technology.amis.nl/blog/3302/dropping-trees&quot;&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=&quot;font-weight:bold;&quot;&gt;Data model&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In this example we&#039;ll use the following table:&lt;pre name=&quot;code&quot; class=&quot;sql&quot;&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=&quot;code&quot; class=&quot;sql&quot;&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=&quot;font-weight:bold;&quot;&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=&quot;http://cbhavsar.blogspot.com/2008/09/declarative-databinding-for-lazy.html&quot;&gt;post&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Note the following steps are well documented on Chandu&#039;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=&quot;font-weight:bold;&quot;&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=&quot;code&quot; class=&quot;sql&quot;&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&#039;t need to modify the LeafOrgView query.  For completeness it&#039;s described as follows:&lt;pre name=&quot;code&quot; class=&quot;sql&quot;&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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/Sp4T5rrPvVI/AAAAAAAAA1I/3He0n26PTAk/s1600-h/adftreepic1.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;&quot; src=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/Sp4T5rrPvVI/AAAAAAAAA1I/3He0n26PTAk/s400/adftreepic1.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5376756886824533330&quot; /&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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sp4T6Az-DOI/AAAAAAAAA1Q/481_ANDdye0/s1600-h/adftreepic2.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sp4T6Az-DOI/AAAAAAAAA1Q/481_ANDdye0/s400/adftreepic2.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5376756892498267362&quot; /&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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4T6kj9rvI/AAAAAAAAA1Y/uHL1L8Xz3xo/s1600-h/adftreepic3.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 227px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4T6kj9rvI/AAAAAAAAA1Y/uHL1L8Xz3xo/s400/adftreepic3.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5376756902094810866&quot; /&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=&quot;font-weight:bold;&quot;&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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4T68xQIqI/AAAAAAAAA1g/I1LwS-5R32I/s1600-h/adftreepic4.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 357px; height: 400px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4T68xQIqI/AAAAAAAAA1g/I1LwS-5R32I/s400/adftreepic4.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5376756908592997026&quot; /&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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4T7RJuIpI/AAAAAAAAA1o/6zYfNqAEFHs/s1600-h/adftreepic5.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 357px; height: 400px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4T7RJuIpI/AAAAAAAAA1o/6zYfNqAEFHs/s400/adftreepic5.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5376756914064335506&quot; /&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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/Sp4UZoniQqI/AAAAAAAAA1w/iFc5rxWfOkw/s1600-h/adftreepic6.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 357px; height: 400px;&quot; src=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/Sp4UZoniQqI/AAAAAAAAA1w/iFc5rxWfOkw/s400/adftreepic6.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5376757435759477410&quot; /&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=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;af:tree value=&quot;#{bindings.ParentOrgView1.treeModel}&quot;&lt;br /&gt;         var=&quot;node&quot;&lt;br /&gt;         selectionListener=&quot;#{bindings.ParentOrgView1.treeModel.makeCurrent}&quot; &lt;br /&gt;         rowSelection=&quot;single&quot;&lt;br /&gt;         id=&quot;t1&quot;&gt;&lt;br /&gt;  &lt;f:facet name=&quot;nodeStamp&quot;&gt;&lt;br /&gt;    &lt;af:outputText value=&quot;#{node}&quot; id=&quot;ot1&quot;/&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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4UZwhUIMI/AAAAAAAAA14/WZ0PgSUJu0I/s1600-h/adftreepic7.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 129px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4UZwhUIMI/AAAAAAAAA14/WZ0PgSUJu0I/s400/adftreepic7.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5376757437880869058&quot; /&gt;&lt;/a&gt;..and the page def XML file as follows:&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;&lt;br /&gt;&lt;pageDefinition xmlns=&quot;http://xmlns.oracle.com/adfm/uimodel&quot; version=&quot;11.1.1.54.7&quot; id=&quot;treeMashupDemoPageDef&quot;&lt;br /&gt;                Package=&quot;view.pageDefs&quot;&gt;&lt;br /&gt;  &lt;parameters/&gt;&lt;br /&gt;  &lt;executables&gt;&lt;br /&gt;    &lt;variableIterator id=&quot;variables&quot;/&gt;&lt;br /&gt;    &lt;iterator Binds=&quot;ParentOrgView1&quot; RangeSize=&quot;25&quot; DataControl=&quot;AppModuleDataControl&quot; id=&quot;ParentOrgView1Iterator&quot;/&gt;&lt;br /&gt;  &lt;/executables&gt;&lt;br /&gt;  &lt;bindings&gt;&lt;br /&gt;    &lt;tree IterBinding=&quot;ParentOrgView1Iterator&quot; id=&quot;ParentOrgView1&quot;&gt;&lt;br /&gt;      &lt;nodeDefinition DefName=&quot;model.ParentOrgView&quot; Name=&quot;ParentOrgView10&quot;&gt;&lt;br /&gt;        &lt;AttrNames&gt;&lt;br /&gt;          &lt;Item Value=&quot;OrgId&quot;/&gt;&lt;br /&gt;          &lt;Item Value=&quot;Name&quot;/&gt;&lt;br /&gt;        &lt;/AttrNames&gt;&lt;br /&gt;        &lt;Accessors&gt;&lt;br /&gt;          &lt;Item Value=&quot;LeafOrgView&quot;/&gt;&lt;br /&gt;        &lt;/Accessors&gt;&lt;br /&gt;      &lt;/nodeDefinition&gt;&lt;br /&gt;      &lt;nodeDefinition DefName=&quot;model.LeafOrgView&quot; Name=&quot;ParentOrgView11&quot;&gt;&lt;br /&gt;        &lt;AttrNames&gt;&lt;br /&gt;          &lt;Item Value=&quot;OrgId&quot;/&gt;&lt;br /&gt;          &lt;Item Value=&quot;Name&quot;/&gt;&lt;br /&gt;        &lt;/AttrNames&gt;&lt;br /&gt;        &lt;Accessors&gt;&lt;br /&gt;          &lt;Item Value=&quot;LeafOrgView_2&quot;/&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=&quot;font-weight:bold;&quot;&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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/Sp4UaeYDJAI/AAAAAAAAA2A/Zylhs-6Km-4/s1600-h/adftreepic8.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 268px; height: 281px;&quot; src=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/Sp4UaeYDJAI/AAAAAAAAA2A/Zylhs-6Km-4/s400/adftreepic8.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5376757450190038018&quot; /&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=&quot;font-weight:bold;&quot;&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&#039;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=&quot;http://technology.amis.nl/blog/3302/dropping-trees&quot;&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=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;af:tree value=&quot;#{bindings.ParentOrgView1.treeModel}&quot;&lt;br /&gt;         var=&quot;node&quot;&lt;br /&gt;         selectionListener=&quot;#{bindings.ParentOrgView1.treeModel.makeCurrent}&quot; &lt;br /&gt;         rowSelection=&quot;single&quot;&lt;br /&gt;         id=&quot;t1&quot;&gt;&lt;br /&gt;  &lt;f:facet name=&quot;nodeStamp&quot;&gt;&lt;br /&gt;    &lt;af:outputText value=&quot;#{node}&quot; id=&quot;ot1&quot;/&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=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;af:tree value=&quot;#{bindings.ParentOrgView1.treeModel}&quot;&lt;br /&gt;         var=&quot;node&quot;&lt;br /&gt;         selectionListener=&quot;#{bindings.ParentOrgView1.treeModel.makeCurrent}&quot; &lt;br /&gt;         rowSelection=&quot;single&quot;&lt;br /&gt;         id=&quot;t1&quot;&gt;&lt;br /&gt;  &lt;af:collectionDragSource actions=&quot;MOVE&quot; &lt;br /&gt;                           modelName=&quot;DnDOrganisations&quot;/&gt;&lt;br /&gt;  &lt;af:collectionDropTarget actions=&quot;MOVE&quot; &lt;br /&gt;                           modelName=&quot;DnDOrganisations&quot; &lt;br /&gt;                           dropListener=&quot;#{treeBean.dragAndDrop}&quot;/&gt;&lt;br /&gt;  &lt;f:facet name=&quot;nodeStamp&quot;&gt;&lt;br /&gt;    &lt;af:outputText value=&quot;#{node}&quot; id=&quot;ot1&quot;/&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&#039;ll define in a moment.  It&#039;s essential the modelName&#039;s match including the case of the name, and we&#039;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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sp4Ua3In7nI/AAAAAAAAA2I/_PW7pyU9-wc/s1600-h/adftreepic9.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 164px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Sp4Ua3In7nI/AAAAAAAAA2I/_PW7pyU9-wc/s400/adftreepic9.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5376757456836226674&quot; /&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=&quot;code&quot; class=&quot;java&quot;&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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4UbPovzGI/AAAAAAAAA2Q/SvSwAYj51jk/s1600-h/adftreepic10.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 251px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4UbPovzGI/AAAAAAAAA2Q/SvSwAYj51jk/s400/adftreepic10.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5376757463413410914&quot; /&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=&quot;code&quot; class=&quot;java&quot;&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 &quot;Transferrable&quot; 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&#039;s essential the strings exactly match.&lt;br /&gt;    DataFlavor&lt;RowKeySet&gt; draggedRowKeySetFlavor = DataFlavor.getDataFlavor(RowKeySet.class, &quot;DnDOrganisations&quot;);&lt;br /&gt;    RowKeySet draggedRowKeySet = draggedTransferObject.getData(draggedRowKeySetFlavor);&lt;br /&gt;       &lt;br /&gt;    if (draggedRowKeySet != null) {&lt;br /&gt;      // We grab the tree&#039;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&#039;s OrgId. It&#039;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(&quot;OrgId&quot;);&lt;br /&gt;&lt;br /&gt;      // The dropEvent carries the target/location&#039;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&#039;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&#039;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&#039;s OrgId&lt;br /&gt;      oracle.jbo.domain.Number targetNodeId = (oracle.jbo.domain.Number)((JUCtrlHierNodeBinding)richTree.getRowData(rowIndex)).getAttribute(&quot;OrgId&quot;);&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&#039; 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&#039;t expose any iterator for the leaf nodes, so we need to&lt;br /&gt;      // resort to retrieve the Model project&#039;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&#039;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&#039;s ParentOrgId to that of the target organisation&#039;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&#039;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&#039;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&#039;ll note in the code I take pains to mention it&#039;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&#039;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=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;af:tree value=&quot;#{bindings.ParentOrgView1.treeModel}&quot;&lt;br /&gt;         var=&quot;node&quot;&lt;br /&gt;         selectionListener=&quot;#{bindings.ParentOrgView1.treeModel.makeCurrent}&quot; &lt;br /&gt;         rowSelection=&quot;single&quot;&lt;br /&gt;         id=&quot;t1&quot;&gt;&lt;br /&gt;  &lt;af:collectionDragSource actions=&quot;MOVE&quot; &lt;br /&gt;                           modelName=&quot;DnDOrganisations&quot;/&gt;&lt;br /&gt;  &lt;af:collectionDropTarget actions=&quot;MOVE&quot; &lt;br /&gt;                           modelName=&quot;DnDOrganisations&quot; &lt;br /&gt;                           dropListener=&quot;#{treeBean.dragAndDrop}&quot;/&gt;&lt;br /&gt;  &lt;f:facet name=&quot;nodeStamp&quot;&gt;&lt;br /&gt;    &lt;af:outputText value=&quot;#{node.Name}&quot; id=&quot;ot1&quot;/&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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4Uy4f0CTI/AAAAAAAAA2Y/jBFLhLvCVng/s1600-h/adftreepic11.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 224px; height: 281px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/Sp4Uy4f0CTI/AAAAAAAAA2Y/jBFLhLvCVng/s400/adftreepic11.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5376757869518784818&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-7150502317199297318?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/iFnPrKdfaVw&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1091514&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 02 Sep 2009 02:35:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1091514</guid>
 <comments>http://chrismuir.sys-con.com/node/1091514#feedback</comments>
</item>
<item>
 <title>JDev/ADF – the importance of getting PS_TXN and PS_TXN_SEQ correct</title>
 <link>http://chrismuir.sys-con.com/node/1067419</link>
 <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=&quot;http://www.oracle.com/technology/products/jdev/htdocs/bc4j/bc4j_temp_tables.html&quot;&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&#039;t scale effectively to multiple users, you&#039;ll see some bizarre and wonderful behaviour as ADF chokes on not having the ability to serialize to the database objects.  However it&#039;s not an ADF problem, the &lt;a href=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcstatemgmt.htm#ADFFD1307&quot;&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&#039;t configured correctly to accept the objects, and found another blog post detailing the same issue.&lt;br /&gt;&lt;br /&gt;Pascal Alma&#039;s blog post can be found &lt;a href=&quot;http://www.pascalalma.net/2007/01/02/jbo-28006-exceptions-when-running-adf-bc-application/&quot;&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&#039;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&#039; faith in ADF and the users&#039; faith in the developers and new ADF system.&lt;br /&gt;&lt;br /&gt;The 2nd project is one I&#039;m involved in currently.  We were creating new database schemas for the ADF user and for some reason we didn&#039;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&#039;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&#039;d thought I document is what errors you&#039;ll see in the WLS logs for JDev 11g build 5188 and JDev 11gR1 build 5407.  I don&#039;t have an earlier version of JDev to test what happens but Pascal&#039;s blog post from above may assist.&lt;br /&gt;&lt;br /&gt;Under JDev 11g build 5188 you&#039;ll see the following WLS log entries:&lt;br /&gt;&lt;br /&gt;First it&#039;ll throw errors that it can&#039;t retrieve user session state:&lt;pre name=&quot;code&quot; class=&quot;java&quot;&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&#039;ll see exceptions thrown, but they&#039;re not very meaningful:&lt;pre name=&quot;code&quot; class=&quot;java&quot;&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=&quot;code&quot; class=&quot;java&quot;&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=&quot;code&quot; class=&quot;java&quot;&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&#039;ll see errors that it can&#039;t retrieve user session state:&lt;pre name=&quot;code&quot; class=&quot;java&quot;&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&#039;ll see a much more meaningful message that ADF can&#039;t create the required objects:&lt;pre name=&quot;code&quot; class=&quot;java&quot;&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=&quot;code&quot; class=&quot;java&quot;&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&#039;ll be able to work out how to correctly configure the database objects to avoid these issues.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-8464929017003318944?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/vNAtVWkotzU&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1067419&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 11 Aug 2009 03:03:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1067419</guid>
 <comments>http://chrismuir.sys-con.com/node/1067419#feedback</comments>
</item>
<item>
 <title>SoapUI for Web Service Testing</title>
 <link>http://chrismuir.sys-con.com/node/1064221</link>
 <description>A popular tool for web service testing is SoapUI. 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;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1064221&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Fri, 07 Aug 2009 02:11:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1064221</guid>
 <comments>http://chrismuir.sys-con.com/node/1064221#feedback</comments>
</item>
<item>
 <title>WLS: Nonsensical error message on web services HTTPS policy enforcement</title>
 <link>http://chrismuir.sys-con.com/node/1050045</link>
 <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=&quot;code&quot; class=&quot;java&quot;&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 &quot;Caused by&quot;.  In turn in the WLS logs I receive the following error:&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;java&quot;&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=&quot;http://acme.com/com/my.service&quot;&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=&quot;code&quot; class=&quot;java&quot;&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&#039;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&#039;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&#039;d originally built a client to access my web service at the following URL:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://MyWlsServer:7001/MyWebServices/My.Service&quot; title=&quot;http://MyWlsServer:7001/MyWebServices/My.Service&quot;&gt;http://MyWlsServer:7001/MyWebServices/My.Service&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Subsequently I&#039;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;&lt;a href=&quot;https://MyWlsServer:7003/MyWebServices/My.Service&quot; title=&quot;https://MyWlsServer:7003/MyWebServices/My.Service&quot;&gt;https://MyWlsServer:7003/MyWebServices/My.Service&lt;/a&gt;&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 &quot;No such service&quot; or &quot;Service requires HTTPS&quot; or &quot;Chris, you&#039;ve made another mistake!&quot;&lt;br /&gt;&lt;br /&gt;For reference I&#039;ve tested this the other way around, where the web service isn&#039;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&#039;s left up to WLS which we&#039;ve already preconfigured for WLS traffic.  As such we can still use HTTPS for our web service even if the web service isn&#039;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&#039;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&#039;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=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-6559405980455782014?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/hCW9c94F5jg&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1050045&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Mon, 27 Jul 2009 22:45:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1050045</guid>
 <comments>http://chrismuir.sys-con.com/node/1050045#feedback</comments>
</item>
<item>
 <title>JDev 11gR1: the most obscure new IDE feature</title>
 <link>http://chrismuir.sys-con.com/node/1033932</link>
 <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&#039;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 &quot;woohoo!&quot; 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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/SlV8LDQVHNI/AAAAAAAAAwU/uf-9XX3Kitw/s1600-h/pic1.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 156px;&quot; src=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/SlV8LDQVHNI/AAAAAAAAAwU/uf-9XX3Kitw/s400/pic1.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5356323861121277138&quot; /&gt;&lt;/a&gt;&lt;br /&gt;In the next picture I&#039;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&#039;ll have to look really hard:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SlV8LcmDD_I/AAAAAAAAAwc/ULz8LH2qcL4/s1600-h/pic2.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 155px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SlV8LcmDD_I/AAAAAAAAAwc/ULz8LH2qcL4/s400/pic2.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5356323867923255282&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Spotted it? Let me point it out:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SlV8L-Y93cI/AAAAAAAAAwk/E9U0ZM218EI/s1600-h/pic3.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 155px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SlV8L-Y93cI/AAAAAAAAAwk/E9U0ZM218EI/s400/pic3.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5356323876995194306&quot; /&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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/SlV8MJgNBeI/AAAAAAAAAws/NQ2CLIMEKro/s1600-h/pic4.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 155px;&quot; src=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/SlV8MJgNBeI/AAAAAAAAAws/NQ2CLIMEKro/s400/pic4.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5356323879978337762&quot; /&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&#039;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=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SlV8Mds7OoI/AAAAAAAAAw0/Wh9kJ8GV99E/s1600-h/pic5.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 172px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SlV8Mds7OoI/AAAAAAAAAw0/Wh9kJ8GV99E/s400/pic5.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5356323885400406658&quot; /&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=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-6035647955070793820?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/LWPuOrxFfAw&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1033932&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Mon, 13 Jul 2009 20:00:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1033932</guid>
 <comments>http://chrismuir.sys-con.com/node/1033932#feedback</comments>
</item>
<item>
 <title>Increasing/decreasing JDev 11g ADF Faces RC page font size at runtime</title>
 <link>http://chrismuir.sys-con.com/node/1026064</link>
 <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&#039;s inbuilt functions.&lt;br /&gt;&lt;br /&gt;The solution requires a javascript routine.  A quick Google on &quot;javascript increase fontsize&quot; returns a number of useful hits including this &lt;a href=&quot;http://www.white-hat-web-design.co.uk/articles/js-fontsize.php&quot;&gt;one&lt;/a&gt; by White Hat Web Design.&lt;br /&gt;&lt;br /&gt;White Hat&#039;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&#039;s ADF Faces RC requires a bit of tweaking.  The following describes the bits of code you&#039;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=&quot;code&quot; class=&quot;java&quot;&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(&#039;span&#039;); // 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(&#039;px&#039;,&#039;&#039;));&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+&#039;px&#039;;&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(&#039;span&#039;); // 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(&#039;px&#039;,&#039;&#039;));&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+&#039;px&#039;;&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&#039;m not entirely over the need for this, my understanding is it hooks into the ADF Faces RC javascript engine and we&#039;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=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;br /&gt;&lt;trh:script source=&quot;js/fonts.js&quot;/&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&#039;s &amp;lt;jsp:root&gt; tag to include the Trinidad HTML tag library as follows:&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;br /&gt;&lt;jsp:root&lt;br /&gt;  xmlns:jsp=&quot;http://java.sun.com/JSP/Page&quot; version=&quot;2.1&quot; &lt;br /&gt;  xmlns:f=&quot;http://java.sun.com/jsf/core&quot;&lt;br /&gt;  xmlns:h=&quot;http://java.sun.com/jsf/html&quot;   &lt;br /&gt;  xmlns:af=&quot;http://xmlns.oracle.com/adf/faces/rich&quot;&lt;br /&gt;  xmlns:trh=&quot;http://myfaces.apache.org/trinidad/html&quot;&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=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;br /&gt;&lt;af:commandLink text=&quot;Smaller&quot;&gt;&lt;br /&gt;  &lt;af:clientListener method=&quot;decreaseFontSize&quot; type=&quot;action&quot;/&gt;&lt;br /&gt;&lt;/af:commandLink&gt;&lt;br /&gt;&lt;af:commandLink text=&quot;Larger&quot;&gt;&lt;br /&gt;  &lt;af:clientListener method=&quot;increaseFontSize&quot; type=&quot;action&quot;/&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=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;br /&gt;&lt;af:commandLink text=&quot;Do something really important&quot;/&gt;&lt;br /&gt;&lt;/pre&gt;Fix&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;br /&gt;&lt;af:commandLink&gt;&lt;br /&gt;  &lt;af:outputText value=&quot;Do something really important&quot; noWrap=&quot;true&quot;/&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&#039;t see a d@mned thing.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-6242865007391840494?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/5ad_syAPiAo&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1026064&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 07 Jul 2009 00:08:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1026064</guid>
 <comments>http://chrismuir.sys-con.com/node/1026064#feedback</comments>
</item>
<item>
 <title>Oracle ACE Director of the Year</title>
 <link>http://chrismuir.sys-con.com/node/1021408</link>
 <description>I had the very pleasent surprise at the end of the ODTUG conference this year to be told that I&#039;ve won Oracle Magazine&#039;s Oracle ACE Director of the Year award for 2009.  With out a doubt this is an honour and I&#039;m very appreciative to Oracle Corporation and its staff for this award, and especially to those who were kind enough to nominate me.&lt;br /&gt;&lt;br /&gt;I was joking with Grant Ronald a few months back that I received my original ACE Director nomination when my first daughter was born, so was looking forward to becoming the grand-poo-bar when my second arrived. Apparently such flippant remarks become reality.&lt;br /&gt;&lt;br /&gt;Thanks to everyone who has sent on their congratz via the other media channels including Twitter, LinkedIn, email and more.  &lt;br /&gt;&lt;br /&gt;I must also give a very special thanks to my &quot;partner&quot; in crime Jenny who gives her generous support and incredible patience in letting me pursue my Oracle activities.  Mind you I&#039;ve kept my side of the bargain and neither of my children yet know what an Oracle database is.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-1851942676275633568?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/RoEsORnxugE&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1021408&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 30 Jun 2009 17:50:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1021408</guid>
 <comments>http://chrismuir.sys-con.com/node/1021408#feedback</comments>
</item>
<item>
 <title>Making JDev just that little faster on WLS</title>
 <link>http://chrismuir.sys-con.com/node/1017913</link>
 <description>During the ODTUG conference this year Lucas Jellema and myself discovered a little WebLogic Server feature (thanks to a presentation by Chris Bucchere) known as &quot;fast-swap&quot; that may have significant benefits in making the code-deploy-run cycle much shorter with JDeveloper.  As usual Lucas is the quickest to the blog punch, and has blogged it &lt;a href=&quot;http://technology.amis.nl/blog/5665/fast-swap-in-weblogic-103-and-jdeveloper-11g-redeploy-after-compile-in-running-application&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Take time to check it out.&lt;br /&gt;&lt;br /&gt;If anybody finds any limitations beyond those mentioned in Lucas&#039;s post, in particular those relating to JDev and ADF *please*let*us*know* as it will assist the entire JDev community.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-6287853299477841631?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/oAkgBegdO4A&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1017913&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sun, 28 Jun 2009 18:03:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1017913</guid>
 <comments>http://chrismuir.sys-con.com/node/1017913#feedback</comments>
</item>
<item>
 <title>Stress &amp; Load Testing Web Apps (Even ADF &amp; Apex) Using Apache JMeter</title>
 <link>http://chrismuir.sys-con.com/node/1011417</link>
 <description>A couple of years ago I presented Take a load off! Load testing your Oracle Apex or JDeveloper web applications at OOW and AUSOUG. I can&#039;t recommend enough the importance of stress testing your web applications, it&#039;s saved my bacon a number of times.  Frequently as developers, we develop under a single user (developer) model where concurrency issues are easily avoided. When our programs hit production, with just 1 more user, suddenly our programs grind to a halt or fall over in bizarre places.  Result, pie on developers&#039; faces, users&#039; faith in new technologies destroyed, and general gnashing of teeth all round.  Some simple stress and load tests can head off problems way before they hit production.&lt;br /&gt;&lt;br /&gt;(For the remainder of this post I&#039;ll infer &quot;stress testing&quot; and &quot;load testing&quot; as the same thing, though strictly speaking one tests for your application falling over, and the other how fast it responds under load)&lt;br /&gt;&lt;br /&gt;So how to go about stress testing a web application?&lt;br /&gt;&lt;br /&gt;There are numerous tools available to stress test web applications, paid and free.  This post will look at the setup and use of Apache&#039;s JMeter, my tool of choice, mainly because it is free! ... to undertake a very simple stress test.  Apache JMeter is available &lt;a href=&quot;http://jakarta.apache.org/jmeter/&quot;&gt;here&lt;/a&gt;, version 2.3.3 at time of writing.&lt;br /&gt;&lt;br /&gt;On starting JMeter (&amp;lt;jmeter-home&gt;/bin/jmeter.bat on Windows) you&#039;ll see the following:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SjHFjBUI3CI/AAAAAAAAAvE/EfKsR_eRKuY/s1600-h/pic1.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 263px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SjHFjBUI3CI/AAAAAAAAAvE/EfKsR_eRKuY/s400/pic1.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5346271438104484898&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Creating a Thread Group&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;From here what we want to do is set up a Thread Group that simulates a number of users (concurrent sessions), done by right clicking the Test Plan node -&gt; Thread Group option.  This results in:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/SjHFjH6mOSI/AAAAAAAAAvM/rfPxcyLlNGs/s1600-h/pic2.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 263px;&quot; src=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/SjHFjH6mOSI/AAAAAAAAAvM/rfPxcyLlNGs/s400/pic2.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5346271439876405538&quot; /&gt;&lt;/a&gt;&lt;br /&gt;As you can see the Thread Group allows us to set a number of threads to simulate concurrent users/sessions, loop through tests and more.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Creating HTTP Requests&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;From here we can create a number of HTTP requests (Test Plan node right click -&gt; Add -&gt; Sampler -&gt; HTTP Requests) to simulate each HTTP request operation (Get, Post etc), HTTP headers, payloads and more.  However in a standard user session between server and browser there can be a huge array of these requests and configuring these HTTP requests within JMeter would be a major pain.&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;&lt;br /&gt;Configuring the HTTP Proxy Server&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;However there&#039;s an easier way.  Apache JMeter can work as a proxy between your browser and server and record a user&#039;s HTTP session, namely the individual HTTP requests, that can be re-played in a JMeter Thread Group later.&lt;br /&gt;&lt;br /&gt;To set this up instead right click the Workbench node, Add -&gt; Non-Test Elements -&gt; HTTP Proxy Server:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SjHFjavyVGI/AAAAAAAAAvU/Q_It9sCuUe8/s1600-h/pic3.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 230px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SjHFjavyVGI/AAAAAAAAAvU/Q_It9sCuUe8/s400/pic3.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5346271444931335266&quot; /&gt;&lt;/a&gt;&lt;br /&gt;To configure the HTTP Proxy Server do the following:&lt;br /&gt;&lt;br /&gt;* Port – set to a number that wont clash with an existing HTTP server on your PC (say 8085)&lt;br /&gt;* Target Controller – set to &quot;Test Plan &gt; Thread Group&quot;.  When the proxy server records the HTTP session between your browser and server, this setting implies the HTTP requests will be recorded against the Thread Group you created earlier, so we can reuse them later&lt;br /&gt;* URL Patterns to include – a regular expression based string that tells the proxy server which URLs to record, and those to ignore.  To capture everything set it to .* (dot star).  Be warned that during recording however, if you use your browser for anything else but accessing the server you wish to stress test, JMeter will also capture that traffic.  This includes periodic refreshes by web applications such as Gmail or Google Docs that you don&#039;t even initiate; I&#039;m pretty sure when replaying your stress test, Google would prefer you not to stress test their infrastructure for them; stick to your own for now ;-)&lt;br /&gt;&lt;br /&gt;The end HTTP Proxy Server setting will look something like this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/SjHFjmE8_NI/AAAAAAAAAvc/GzomZai3r-c/s1600-h/pic4.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 230px;&quot; src=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/SjHFjmE8_NI/AAAAAAAAAvc/GzomZai3r-c/s400/pic4.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5346271447972904146&quot; /&gt;&lt;/a&gt;&lt;br /&gt;You&#039;ll note the HTTP Proxy Server has a Start button.  We can&#039;t use this just yet.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Configuring your Browser&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In order for the JMeter HTTP Proxy Server to capture the traffic between your server and browser, you need to make some changes to your browser&#039;s configuration.  I&#039;m assuming you&#039;re using Firefox 3 in the following example, but same approximate steps are needed for Internet Explorer.&lt;br /&gt;&lt;br /&gt;Under Firefox open the Tools -&gt; Options menu, then Advanced icon, Network tab, Settings button which will open the Connection Settings dialog.&lt;br /&gt;&lt;br /&gt;In the Connection Settings dialog set the following:&lt;br /&gt;&lt;br /&gt;* Select the Manual proxy configuration radio button&lt;br /&gt;* HTTP Proxy – localhost&lt;br /&gt;* Port – 8085 as per the JMeter HTTP Proxy Server option we set earlier&lt;br /&gt;* No Proxy for – ensure that localhost and 127.0.0.1 aren&#039;t in the exclusion list&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/SjHFj-9-cmI/AAAAAAAAAvk/A2KqnUDTwUs/s1600-h/pic5.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 387px;&quot; src=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/SjHFj-9-cmI/AAAAAAAAAvk/A2KqnUDTwUs/s400/pic5.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5346271454654526050&quot; /&gt;&lt;/a&gt;&lt;br /&gt;The above setup makes an assumption that the server you want to access is accessibly without a further external proxy required.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Recording your HTTP session&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once the browser&#039;s proxy is setup, to record a session between the browser and server do the following:&lt;br /&gt;&lt;br /&gt;1) In Apache JMeter hit the Start button on the HTTP Proxy Server page&lt;br /&gt;2) In your browser enter the URL of the first page in the application you want to stress test&lt;br /&gt;&lt;br /&gt;Thereafter as you navigate your web application, enter data and so on, JMeter will faithfully record each HTTP request between the browser in server against your Thread Group.  This may not be immediately obvious, but expand the Thread Group and you&#039;ll see each HTTP request made from the browser to server:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/SjHF9zMjEOI/AAAAAAAAAvs/o6g0ZWhG3vk/s1600-h/pic6.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 222px;&quot; src=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/SjHF9zMjEOI/AAAAAAAAAvs/o6g0ZWhG3vk/s400/pic6.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5346271898171019490&quot; /&gt;&lt;/a&gt;&lt;br /&gt;As can be seen, even visiting 1 web page can generate a huge amount of traffic.  Ensure to stop recording the HTTP session by selecting the Stop button in the JMeter HTTP Proxy Server page.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Configuring the Thread Group for replay&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Once you&#039;ve recorded the session in the Thread Group there are a couple of extra things we need to achieve.&lt;br /&gt;&lt;br /&gt;For web application&#039;s that use Cookies and session IDs (JDeveloper&#039;s ADF uses a JSessionID for tracking sessions) to track each unique user session, we cannot replay the exact HTTP request sequence with the server through JMeter, as the session ID is pegged to the recorded session, not the upcoming stress test sessions.&lt;br /&gt;&lt;br /&gt;To solve this in JMeter right click the Thread Group -&gt; Add -&gt; Config Element -&gt; HTTP Cookie Manager.  This will be added as the last element to the Thread Group.  I usually move it to the top of the tree:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SjHF-KZ4yjI/AAAAAAAAAv0/R-hELvaCfIg/s1600-h/pic7.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 222px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SjHF-KZ4yjI/AAAAAAAAAv0/R-hELvaCfIg/s400/pic7.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5346271904400984626&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Next we need to configure the Thread Group to show us the results of the stress test.  There are a number of different ways to do this, from graphing the responses, to showing the raw HTTP responses.  In this post we&#039;ll take the later option.&lt;br /&gt;&lt;br /&gt;Right click the Thread Group -&gt; Add -&gt; Listener -&gt; View Results in Tree, which will add a View Results in Tree node to the end of the Thread Group:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SjHF-VSvE0I/AAAAAAAAAv8/c-5WPM4DSyQ/s1600-h/pic8.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 230px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SjHF-VSvE0I/AAAAAAAAAv8/c-5WPM4DSyQ/s400/pic8.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5346271907323777858&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Finally save the Thread Group by selecting it in the node tree, then File -&gt; Save.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Running the Thread Group&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To commence your first stress test run, it&#039;s best to leave the number of spawned sessions to 1, just to see the overall test will work in it&#039;s most basic form.  The default Thread Group number of threads is set to 1, so there is no need to make a change to do this.&lt;br /&gt;&lt;br /&gt;To run the test, simply select the Run menu -&gt; Start.  On running the Thread Group, you&#039;ll see the top right of JMeter has a little box that tells if it&#039;s still running, and the number of tests to go vs total number of tests:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SjHF-v26n1I/AAAAAAAAAwE/WGCI1VwNoYA/s1600-h/pic9.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 221px; height: 106px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SjHF-v26n1I/AAAAAAAAAwE/WGCI1VwNoYA/s400/pic9.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5346271914454851410&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Once the tests are complete, this indicator will grey out.&lt;br /&gt;&lt;br /&gt;We can now visit the View Results Tree:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/SjHF-sjMZkI/AAAAAAAAAwM/XR1iQKSVkyc/s1600-h/pic10.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 228px;&quot; src=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/SjHF-sjMZkI/AAAAAAAAAwM/XR1iQKSVkyc/s400/pic10.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5346271913566824002&quot; /&gt;&lt;/a&gt;&lt;br /&gt;This shows the HTTP requests that were sent out and on selecting an individual request, you see the raw HTTP request and the actual response.  You&#039;ll note the small green triangles showing a successful HTTP 200 result.  If different HTTP errors occur the triangles show different colours.  Also remember that sometimes application errors don&#039;t perculate up to the HTTP layer in your web application, so you should check your application&#039;s logs too (in the case of a JEE application, this will be your container&#039;s internal logs).&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Running a Stress Test&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The obvious step from here is to change the Thread Group number of threads to a higher number.&lt;br /&gt;&lt;br /&gt;From here take time out to explore the other features in JMeter. It includes a wide range of features that in particular make it useful for regression testing.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Caveats&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Firstly remember when doing this you&#039;re not only stress testing your application, your stress testing a server, potentially stress testing databases, stress testing your networks and so on.  Therefore you can have an affect on anybody sharing those resources.  &quot;Hard core&quot; stress tests should be on separate infrastructure, after hours, aiming for as little impact on those around you!&lt;br /&gt;&lt;br /&gt;Also keep in mind, besides seeing your application fall over at 2 users, 10 users, 100 users, which is an important test, try to be realistic about your stress tests.  Stress testing you&#039;re brand-new-application to a 1 million concurrent users is probably not being realistic.  How many concurrent user requests do you really expect and what response times do you need?  Normally when I ask managers this question they&#039;ll answer with, &quot;oh we have 1000 concurrent users, the application must support that many at any one time&quot;.  However what they really mean is the application has 1000 users, potentially all logged into the application (ie. sessions) at the same time, but not necessarily hitting the server with HTTP requests at any onetime.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;https://blogger.googleusercontent.com/tracker/38586079-8639738272054590761?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/OneSizeDoesntFitAll/~4/cDLj3J5-FRA&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/1011417&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 24 Jun 2009 11:00:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/1011417</guid>
 <comments>http://chrismuir.sys-con.com/node/1011417#feedback</comments>
</item>
<item>
 <title>ADF Faces RC: turning off the browser&#039;s autocomplete functionality</title>
 <link>http://chrismuir.sys-con.com/node/998166</link>
 <description>Modern browsers include an autocomplete function, effectively a poplist that shows the user&#039;s most recent entries for a set field in a list, for the user to choose from.&lt;br /&gt;&lt;br /&gt;There are times when this functionality isn&#039;t desirable, such as credit card numbers, password fields and similar.&lt;br /&gt;&lt;br /&gt;As detailed in the following Mozilla Developer Center &lt;a href=&quot;https://developer.mozilla.org/En/How_to_Turn_Off_Form_Autocompletion&quot;&gt;page&lt;/a&gt;, both IE and FF support an autocomplete=&quot;off&quot; attribute on form and input controls to suppress the browser&#039;s autocomplete functionality.  Unfortunately this feature is not part of the HTML standards, and in turn is not a property of the equivalent tags in ADF Faces RC for JDeveloper 11g build 5188 (ER with Oracle Support pending).&lt;br /&gt;&lt;br /&gt;There is a JavaScript solution that readers may be interested to see, and I thought this a good post because it shows the mechanism for calling JavaScript through the ADF Faces RC tags, something that I seem to be doing more and more.&lt;br /&gt;&lt;br /&gt;The following example shows how to turn the autocomplete off at the form level:&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;br /&gt;&lt;af:document&gt;&lt;br /&gt;  &lt;af:clientListener type=&quot;load&quot; method=&quot;disableAutoComplete&quot;/&gt;&lt;br /&gt;  &lt;trh:script text=&quot;&lt;br /&gt;    function disableAutoComplete(event) {&lt;br /&gt;      myForm = document.getElementById(&#039;myForm&#039;);&lt;br /&gt;      myForm.setAttribute(&#039;autocomplete&#039;, &#039;off&#039;);&lt;br /&gt;    }&quot;/&gt;&lt;br /&gt;  &lt;af:form id=&quot;myForm&quot; clientComponent=&quot;true&quot;&gt;&lt;br /&gt;  ...so on...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Points to note:&lt;br /&gt;&lt;br /&gt;* The use of the &quot;load&quot; clientListener at document level to call the disableAutoComplete.  This is the equivalent of the HTML body tags onLoad attribute.&lt;br /&gt;&lt;br /&gt;* The use of the clientComponent=&quot;true&quot; attribute in the form tag.  This forces ADF Faces RC to generate a HTML form component with the same id in the resulting HTML page to be rendered.  This is essential as the disableAutoComplete method requires the form id in the DOM in order to find the form via it&#039;s call to getElementById and turn off the autocomplete function.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;//blogger.googleusercontent.com/tracker/38586079-7622688565954165754?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/Pv6bWXwULmI&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/998166&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Thu, 11 Jun 2009 00:10:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/998166</guid>
 <comments>http://chrismuir.sys-con.com/node/998166#feedback</comments>
</item>
<item>
 <title>Q&amp;A With Grant Ronald</title>
 <link>http://chrismuir.sys-con.com/node/994372</link>
 <description>(This is a reprint of an article published in the UKOUG&#039;s Select magazine early this year)&lt;br /&gt;&lt;br /&gt;When talking about Oracle Forms and JDeveloper, one Oracle personality stands out among others - long time blogger Grant Ronald from Oracle Corporation UK. Grant has for a long time “pimped” Oracle Forms and its big brother JDeveloper at Oracle events and user groups events around the world. His popularity is shown by his blog receiving on average 2000 hits per day. Lately, to reassure Oracle customers that Oracle intends to keep on supporting Oracle Forms and show that Forms has a future inline with JDeveloper, Grant has been responsible for the Oracle’s Forms Modernization message.&lt;br /&gt;&lt;br /&gt;Chris Muir from SAGE Computing Services Australia conducted the following Q&amp;A session with Grant to get the low down and latest on Forms and JDeveloper, as well as a little about Grant himself.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;CM&lt;/span&gt;: What role do you currently play at Oracle and what does your day job entail?&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;&lt;br /&gt;Grant Ronald&lt;/span&gt;: Well, my title says “Group Product Manager” and the products I cover are Oracle Forms and Oracle JDeveloper. As a Product Manager you are responsible for the success of the products in your area. That encompasses everything from working with developers on features, the marketing department on campaigns or delivering presentations at events like Oracle World. In the morning you can be rolling your sleeves up and getting into code with a developer, and in the afternoon you can be meeting with the CTO. It’s that varied.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;CM&lt;/span&gt;: How did you get into this Oracle gig anyhow? What’s your background at Oracle and computing in general?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Grant Ronald&lt;/span&gt;: Back in the early ’80s, home computing was slowly starting to take off with computers like the Sinclair Spectrum, Vic20 and BBC home computers, and it seemed like a new an innovative field to get involved in when I left school. So I got my degree in Computing Science then joined a small IT outfit in the UK that eventually got consumed by EDS. It was a pretty typical development role for about seven years, mainly focused on military applications, and my last job was designing, developing and leading the team for the development of the user interface for a military email system.&lt;br /&gt;&lt;br /&gt;This took me up to 1996 when I fancied a change, and Oracle was looking for people with development experience on Unix and Motif in their support organization. So I joined Oracle Support where I eventually headed up the group who supported the local EMEA (Europe, Middle East, Africa) teams in Forms, Reports and Discoverer. Given that I was working closely with the Oracle Product Management team in this role, I was eventually persuaded to make the jump into Oracle Development!&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;CM&lt;/span&gt;: Ok, now for some tough questions worthy of any Q&amp;A: You’re currently known via your blog for discussions on Oracle development including Forms and SOA, and presentations in Oracle Developer Days around the world. Previously you were also known for you work on JDeveloper. Why the change? Has Oracle internally panicked about the impression (my emphasis) customers are getting that Oracle has killed Forms, and now the need for Forms advocates?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Grant Ronald&lt;/span&gt;: There has not really been a change. The thing is, we’ve never stopped talking about Forms. I’ve got the air miles and passport stamps to show that we were still presenting Forms at Oracle World, ODTUG (Oracle Development Tools User Group), UKOUG (UK Oracle User Group), DOAG (German Oracle User Group) and dozens of other events covering EMEA, APAC and the Americas.&lt;br /&gt;&lt;br /&gt;The &lt;a href=&quot;http://otn.oracle.com/products/forms&quot;&gt;Forms OTN page&lt;/a&gt; is still a hive of activity: news, events, whitepapers and how-to’s. Maybe people thought we had stopped talking about Forms because we were also talking about other technologies as well. Ten years ago if you developed on an Oracle database then you pretty much used Forms, simple as that. But the world has changed and there are other things to talk about now. Which makes sense, if you think about it; there is more need and more demand to be talking about the “new” stuff, especially when it is evolving at such a rate.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;CM&lt;/span&gt;: On discussing Forms and considering that some Oracle customers are confused on the future of Forms, can you outline Oracle’s commitment to Forms in terms of existing versions and Oracle Support?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Grant Ronald&lt;/span&gt;: I think the strongest statement we have is the fact that we published a statement of direction five years ago and that statement remains true today. We’ve always said that we are committed to Forms and that there have been no plans to desupport it. That line has never changed. Regarding support, we’ve recently just extended the support date for 10.1.2 (the latest release of Oracle Forms) and Forms 11g is in development, having already had positive reviews from our beta testers. So we are lengthening the support dates, we are working on the next release and we are also discussing enhancements and features for post 11g. I think that’s all good news.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;CM&lt;/span&gt;: Could the problem with Oracle Forms just be an image problem? It’s never been known for sexy development (a’la grey screens of boredom), and especially now that the web world, web rich clients, AJAX etc have taken off.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Grant Ronald&lt;/span&gt;: The sweet spot for Oracle Forms has always been the ability to rapidly develop rich, transactional business applications. So you see Oracle Forms applications in your government offices, airlines and bank back-offices etc. The need for visual “bells and whistles” is less at the fore than, for example, an online shopping application where a user makes a snap decision, often based on visual aesthetics, as to whether they will use the site.&lt;br /&gt;&lt;br /&gt;But there is nothing to stop you pushing the boundaries of the visual aspects of Oracle Forms. We have customers who are using some of the features of Oracle Forms, like PJCs and Java beans, to really push the boundaries of the Forms UI. Like this &lt;a href=&quot;http://www.oracle.com/technology/products/forms/pdf/capula.pdf&quot;&gt;story&lt;/a&gt;. So there is nothing to stop you modernizing your Forms application, starting with an update of the user interface.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;CM&lt;/span&gt;: So what plans do Oracle have in addressing Forms customers?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Grant Ronald&lt;/span&gt;: We are continuing to present at all the major events and user groups. In addition, we’ve launched a focus &lt;a href=&quot;http://otn.oracle.com/goto/formsmodernize&quot;&gt;page&lt;/a&gt;. This includes recorded webcasts on Forms strategy, calling web services from Forms and Forms new features. There are also white papers and customer stories as well. This is also being backed up by a roadshow which to date has hit nearly 20 countries.&lt;br /&gt;&lt;br /&gt;For those Forms customers who are taking a step into the Java world, we have a dedicated site on &lt;a href=&quot;http://otn.oracle.com/formsdesignerj2ee&quot;&gt;OTN&lt;/a&gt; as well as dedicated developers guides, books and Oracle University courses.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;CM&lt;/span&gt;: Consider an Oracle shop with a large legacy Oracle Forms application that is running well but in a desupported version of Forms. Should they have any intentions of upgrading their Forms installs and what are the risks if they don’t?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Grant Ronald&lt;/span&gt;: Our roadmap for Forms customers is “upgrade and integrate”. So the first point to consider is upgrade. There are, of course, benefits of upgrading but you also have to consider the risk of not upgrading: running your business applications on desupported software that is neither security nor bug patched, or being certified on newer OS or database versions. Are you managing the risk that some piece of this stack may change and destabilise your applications (e.g. a forced O/S upgrade), or are you just hoping that this software tower will hold up with no means of support. It’s your call.&lt;br /&gt;&lt;br /&gt;Which takes us to the next point: integration. By web deploying your Forms on the application server, you are positioning yourself on a platform on which you can integrate both your legacy applications, and new services and applications.&lt;br /&gt;&lt;br /&gt;By following the “upgrade and integrate” roadmap, you can limit the risk to your business applications while still positioning yourself for your long-term strategic goals.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;CM&lt;/span&gt;: Consider an Oracle shop with a large amount of SQL and PL/SQL programmers who are cognisant in Forms. Which Oracle development technology should they pick for maintenance and extension of the existing system: Forms, Apex or JDeveloper/ADF?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Grant Ronald&lt;/span&gt;: The simplest answer is really to pick the technology/tool that suits you best. If you are extending your existing Forms application it may be that you build new business logic in the database that could be shared between Forms, Java and Apex applications. Or you might decide that you really want to exploit the power of Java and so JDeveloper and ADF would be a natural choice. Many customers are closely aligned with Oracle’s business applications and so the Oracle Fusion technology stack may drive the choice of development tool. I try to discourage customers to think in binary terms when choosing tools. The reality is that you will probably have a mix.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;CM&lt;/span&gt;: You mention that JDeveloper and ADF would be the natural choice for an Oracle developer. Why?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Grant Ronald&lt;/span&gt;: As I mentioned earlier, I look after Oracle Forms and Oracle JDeveloper. One reason for this split in roles is to bring my 4GL Forms experiences into JDeveloper and Oracle ADF. When I first joined the JDeveloper team I was amazed how developers were willing to write lines of code for common actions that I set with the click of a checkbox in Forms. Part of my job is to ensure that the kind of rich features a Forms developer takes for granted are implemented in JDeveloper and Oracle ADF.&lt;br /&gt;&lt;br /&gt;JDeveloper and Oracle ADF is also a natural choice because it’s the route our own Applications Division is taking. Our next generation Fusion applications are being built using JDeveloper and ADF. So, as the technology choice for Oracle’s own Fusion Applications, the technology is built with the Forms/Database and PL/SQL developers in mind. No other tool or framework can make this claim.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;CM&lt;/span&gt;: What skills do you see a Forms developer needing in moving to ADF, and what approach do you suggest to a development team in minimising this learning curve?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Grant Ronald&lt;/span&gt;: There is a learning curve in moving to any new technology but with JDeveloper and ADF we are really smoothing out that learning curve and lowering the barrier at which you can start to become productive.&lt;br /&gt;&lt;br /&gt;Of course, the bottom line is that you will need some Java knowledge, but how much depends on how far you want to get below the covers and customize the behaviour of the framework.&lt;br /&gt;&lt;br /&gt;With an overview of ADF and some basic Java language skills, you can go a long way: building business services, validation, page flow, rich UI interaction, LOVs, graphs – stuff that you couldn’t even consider if you weren’t using ADF.&lt;br /&gt;&lt;br /&gt;But if you have made a strategic choice to develop on the Java platform, I’d expect you to still have some members of your team who have a more advanced knowledge of the platform so they can make architectural decisions and set up best practices. We are also working on giving you the learning aids to get up to speed. We have developed a number of Oracle University courses specifically targeted at the Forms audience moving to Java. There are a number of books already published and more in the pipeline that are aimed at opening up the platform. And of course, we have a dedicated focus page on &lt;a href=&quot;http://otn.oracle.com/formsdesignerj2ee&quot;&gt;OTN&lt;/a&gt; and the essential ADF developer guides for 4GL developers.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;CM&lt;/span&gt;: Recently you’ve been focusing on SOA technology integration with Forms. Why advantages do you see this combination providing? What challenges do Forms programmers face with integration?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Grant Ronald&lt;/span&gt;: The benefits of a service based approach are already well documented: loosely coupled, reusable implementations of business processes gives a more flexible, agile architecture that is better aligned to the business.&lt;br /&gt;&lt;br /&gt;Much of the work we are doing with Oracle Forms now is to allow your existing Forms application to hook into the SOA world. The ability to call out to web services and for those services to call back asynchronously is one example.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;CM&lt;/span&gt;: Grabbing your crystal ball, given your long-term experience in development, where do you see Oracle development in 10 years time?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Grant Ronald&lt;/span&gt;: I think the clearest view of the future can be seen in Oracle’s own business applications. Oracle’s Applications Division have upgraded to the most recent version of Forms, while looking to exploit the benefits of a services oriented architecture and a standards based platform. Using JDeveloper and Oracle ADF, they are taking developers from a background including Forms, PL/SQL and Peopletools, and making them productive on the Java platform.&lt;br /&gt;&lt;br /&gt;I think this gives the clearest indication of where Oracle development is heading and I think there is a great comfort in knowing that the technology choices you are making are the ones Oracle is betting its business applications on as well.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;CM&lt;/span&gt;: Finally, moving out of the Oracle arena, what keeps you kicking out of work? I know you play in a band.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Grant Ronald&lt;/span&gt;: I play a bit of keys in a band, and that mixed with a few weekends out biking helps balance out all the fun I have at Oracle!&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;//blogger.googleusercontent.com/tracker/38586079-1784712213652396225?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/dptTVG0QZRo&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/994372&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 09 Jun 2009 13:45:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/994372</guid>
 <comments>http://chrismuir.sys-con.com/node/994372#feedback</comments>
</item>
<item>
 <title>Book Review: Processing XML Documents with JDeveloper 11g</title>
 <link>http://chrismuir.sys-con.com/node/987328</link>
 <description>The thing about book reviews, like movie reviews, is the interpretation by the reviewer is subjective. The trick is for you the review reader to work out does the reviewer have the same tastes and likes as you. If yes that should mean that the book review will be relevant to you potentially giving a recommendation that suits your needs. If no you might miss a really good book or waste a couple of those hard earned squid.&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/987328&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 03 Jun 2009 07:30:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/987328</guid>
 <comments>http://chrismuir.sys-con.com/node/987328#feedback</comments>
</item>
<item>
 <title>REA Is Where RIA Becomes the Norm</title>
 <link>http://chrismuir.sys-con.com/node/951686</link>
 <description>Do you believe that the day when programmers could focus on one language in their jobs is gone? Thanks to the ever-changing IT landscape and the uncertain financial times, contemporary developers are expected to work with a wide range of platforms, frameworks, languages as essentially “masters of all and specialists in none.”&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/951686&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 02 Jun 2009 22:00:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/951686</guid>
 <comments>http://chrismuir.sys-con.com/node/951686#feedback</comments>
</item>
<item>
 <title>OTN Article - Taking an Oracle ADF Application from Design to Reality</title>
 <link>http://chrismuir.sys-con.com/node/980765</link>
 <description>I&#039;m happy to announce that a 5 part article &lt;a href=&quot;http://www.oracle.com/technology/pub/articles/adf-from-design-to-reality/index.html&quot;&gt;Taking an Oracle ADF Application from Design to Reality&lt;/a&gt; authored by Penny Cookson and myself has been published on Oracle&#039;s Technology Network.&lt;br /&gt;&lt;br /&gt;I&#039;d like to thank Penny for her assistance in writing the article, Steve Muench and John Stegeman for their ideas (supplied directly and indirectly), Grant Ronald for his review and Justin Kestelyn&#039;s OTN team for their hard work.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;//blogger.googleusercontent.com/tracker/38586079-1810101668874045569?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/9SE16KLKx64&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/980765&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Thu, 28 May 2009 09:58:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/980765</guid>
 <comments>http://chrismuir.sys-con.com/node/980765#feedback</comments>
</item>
<item>
 <title>Java Developer Journal - JDeveloper - an IDE that moves with the times</title>
 <link>http://chrismuir.sys-con.com/node/977466</link>
 <description>I&#039;m happy to announce that an article of mine has recently been published in the Java Developer Journal, titled &quot;JDeveloper - an IDE that moves with the times&quot;.  You can pick up the full JDJ magazine &lt;a href=&quot;http://www2.sys-con.com/java/pdfs/JDJ_14-2%20_spread.pdf&quot;&gt;here&lt;/a&gt; or the online article &lt;a href=&quot;http://java.sys-con.com/node/951686&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks to Teri Whitaker and Shay Shmeltzer for their assistance with this article.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;//blogger.googleusercontent.com/tracker/38586079-1486324216978297823?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/e9AeQ4u8Evk&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/977466&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 27 May 2009 00:47:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/977466</guid>
 <comments>http://chrismuir.sys-con.com/node/977466#feedback</comments>
</item>
<item>
 <title>JDeveloper next version - new features sneak preview</title>
 <link>http://chrismuir.sys-con.com/node/976663</link>
 <description>Jakub Pawlowski has &lt;a href=&quot;http://kuba.zilp.pl/?id=801&quot;&gt;spotted&lt;/a&gt; the &lt;a href=&quot;http://otnbeta.oracle.com/fmw11g/582tj30eapvb/index.htm&quot;&gt;beta documentation&lt;/a&gt; for the next release of JDev, great work Jakub.  Best to check it out now, as the URL indicates this is a beta release and the URL may not be there for long.&lt;br /&gt;&lt;br /&gt;As Jakub has pointed out, there&#039;s a great new &lt;a href=&quot;http://otnbeta.oracle.com/fmw11g/582tj30eapvb/web.1111/b31973/af_calendar.htm#BABIDBCE&quot;&gt;calendar&lt;/a&gt; component arriving.  I remember asking for something like this a year or so ago, and the Oracle Gods have delivered.  Great work :-)&lt;br /&gt;&lt;br /&gt;Some other things I spotted from a quick scan:&lt;br /&gt;&lt;br /&gt;1) &lt;a href=&quot;http://otnbeta.oracle.com/fmw11g/582tj30eapvb/web.1111/b31973/af_orgpage.htm#CACJAJGI&quot;&gt;Dashboard component&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2) &lt;a href=&quot;http://otnbeta.oracle.com/fmw11g/582tj30eapvb/web.1111/b31973/dv_intro.htm#sthref1834&quot;&gt;Hierarchy Viewer&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3) ADF BC - &lt;a href=&quot;http://otnbeta.oracle.com/fmw11g/582tj30eapvb/web.1111/b31974/bcextservices.htm#CJAJGIEB&quot;&gt;Integrating Service-Enabled Application Modules&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;4) Whole new manual &lt;a href=&quot;http://otnbeta.oracle.com/fmw11g/582tj30eapvb/web.1111/e10139/toc.htm&quot;&gt;Desktop Integration Developer&#039;s Guide&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;5) Manual for potentially a new product &lt;a href=&quot;http://otnbeta.oracle.com/fmw11g/582tj30eapvb/doc.1111/e14149/toc.htm&quot;&gt;Oracle Help&lt;/a&gt; (at least I hadn&#039;t heard of it before)&lt;br /&gt;&lt;br /&gt;...and so on... it&#039;s worth a stroll through the documentation to check out new features.  I&#039;d appreciate if you find any more, to post them as a comment on this blog post please.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;//blogger.googleusercontent.com/tracker/38586079-7410381686262890355?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/kLicPQ5KSlI&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/976663&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 26 May 2009 03:47:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/976663</guid>
 <comments>http://chrismuir.sys-con.com/node/976663#feedback</comments>
</item>
<item>
 <title>I&#039;m happy to announce...</title>
 <link>http://chrismuir.sys-con.com/node/956198</link>
 <description>I&#039;m happy to announce the arrival of Jessica Muir, a calm and collected little 3.5 kilo girl.  Mum and Jessica are doing just fine, while Dad is running a quick &quot;education&quot; campaign with Jessica&#039;s 2yr old sister about the merits of little sisters. &lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/SgbOVfBQ-rI/AAAAAAAAAuE/RGMfd2UiJ6I/s1600-h/DSC01831.JPG&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 240px;&quot; src=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/SgbOVfBQ-rI/AAAAAAAAAuE/RGMfd2UiJ6I/s400/DSC01831.JPG&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5334177677166312114&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Our new arrival spells a few weeks break from blogging, normal services will resume shortly.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;http://res1.blogblog.com/tracker/38586079-8082649063106611809?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/0tLhA2ZpF5w&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/956198&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sun, 10 May 2009 08:49:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/956198</guid>
 <comments>http://chrismuir.sys-con.com/node/956198#feedback</comments>
</item>
<item>
 <title>JAX-WS: Throwing generic SOAPFaults under WLS 10.3</title>
 <link>http://chrismuir.sys-con.com/node/976662</link>
 <description>(With apologies I accidentally deleted this post. This is a repost).&lt;br /&gt;&lt;br /&gt;Typically thanks to the WSDL operations including a &amp;lt;soap:fault&gt; element, when generating JAX-WS 2.1.x endpoints from the WSDL, the JAX-WS engine will also create @WebFault classes to mirror the &amp;lt;soap:fault&gt;. As such the programmer can throw the @WebFault class to cause a SOAP fault to be returned to the caller.&lt;br /&gt;&lt;br /&gt;However what if the WSDL operation doesn&#039;t include an explicitly defined fault for the operation? How does the programmer throw a fault without a @WebFault class? The simple answer is add it to the WSDL and regenerate, but some of us don&#039;t have that luxury, the WSDLs are given to us.&lt;br /&gt;&lt;br /&gt;If you&#039;re using SOAP 1.1 the following code will allow you throw a generic SOAP fault from your JAX-WS endpoint:&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;&lt;br /&gt;SOAPFactory fac = SOAPFactory.newInstance();&lt;br /&gt;SOAPFault sf = fac.createFault(&quot;Your error message&quot;, new QName(&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;, &quot;Client&quot;));&lt;br /&gt;throw new SOAPFaultException(sf); &lt;br /&gt;&lt;/pre&gt;Note the QName uses the SOAP 1.1 namespace and &quot;Client&quot; fault code.&lt;br /&gt;&lt;br /&gt;The SOAP 1.2 equivalent code:&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt; &lt;br /&gt;SOAPFactory fac = SOAPFactory.newInstance();&lt;br /&gt;SOAPFault sf = fac.createFault(&quot;Your error message&quot;, new QName(&quot;http://www.w3.org/2003/05/soap-envelope&quot;, &quot; Receiver&quot;));&lt;br /&gt;throw new SOAPFaultException(sf);&lt;/pre&gt;&lt;br /&gt;In this example the QName uses the SOAP 1.2 namespace and &quot;Receiver&quot; fault code.&lt;br /&gt;&lt;br /&gt;(Later edit – for the record both these mechanisms can also be used in a custom JAX-WS protocol (SOAP handler) or logical handler).&lt;br /&gt;&lt;br /&gt;In the SOAP 1.2 case you&#039;ll see something like the following SOAP fault returned from the web service call:&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt; &lt;br /&gt;&lt;s:envelope xmlns:s=&quot;http://www.w3.org/2003/05/soap-envelope&quot;&gt;  &lt;br /&gt;   &lt;s:body&gt;  &lt;br /&gt;      &lt;s:fault xmlns:ns4=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;  &lt;br /&gt;         &lt;s:code&gt;  &lt;br /&gt;            &lt;s:value&gt;S:Receiver&lt;/s:value&gt;  &lt;br /&gt;         &lt;/s:code&gt;  &lt;br /&gt;         &lt;s:reason&gt;  &lt;br /&gt;            &lt;s:text xml:lang=&quot;en&quot;&gt;Your error message&lt;/s:text&gt;  &lt;br /&gt;         &lt;/s:reason&gt;  &lt;br /&gt;         &lt;s:detail&gt;  &lt;br /&gt;            &lt;ns2:exception class=&quot;java.lang.RuntimeException&quot; note=&quot;To disable this feature, set com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace system property to false&quot; xmlns:ns2=&quot;http://jax-ws.dev.java.net/&quot;&gt;  &lt;br /&gt;               &lt;message&gt;javax.xml.ws.soap.SOAPFaultException: Your error message &lt;/message&gt;  &lt;br /&gt;               &lt;ns2:stacktrace&gt;  &lt;br /&gt;                 &lt;!-- stack trace snipped --&gt;  &lt;br /&gt;               &lt;/ns2:stacktrace&gt;  &lt;br /&gt;            &lt;/ns2:exception&gt;  &lt;br /&gt;         &lt;/s:detail&gt;  &lt;br /&gt;      &lt;/s:fault&gt;  &lt;br /&gt;   &lt;/s:body&gt;  &lt;br /&gt;&lt;/s:envelope&gt; &lt;br /&gt;&lt;/pre&gt;Specifically for Oracle&#039;s WebLogic Server (WLS) v10.3, we need to make a slight change to the SOAP 1.2 code by supplying the specific SOAP protocol to the SOAPFactory.newInstance call:&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;&lt;br /&gt;SOAPFactory fac = SOAPFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);&lt;br /&gt;SOAPFault sf = fac.createFault(&quot;Your error message&quot;, new QName(&quot;http://www.w3.org/2003/05/soap-envelope&quot;, &quot; Receiver&quot;));&lt;br /&gt;throw new SOAPFaultException(sf);&lt;br /&gt;&lt;/pre&gt;If you don&#039;t do this the web service will return an empty HTTP body (though the HTTP header will include a &quot;500 internal server error&quot;), and you&#039;ll see the following Java Stack Trace:&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;&lt;br /&gt;java.lang.RuntimeException: javax.xml.ws.soap.SOAPFaultException: Your error message&lt;br /&gt;&lt;br /&gt;6/05/2009 10:18:23 com.sun.xml.internal.messaging.saaj.soap.ver1_1.Fault1_1Impl getFaultSubcodes&lt;br /&gt;SEVERE: SAAJ0303: Operation getFaultSubcodes not supported by SOAP 1.1 &lt;br /&gt;6/05/2009 10:18:23 com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit handle&lt;br /&gt;SEVERE: Not supported in SOAP 1.1&lt;br /&gt;java.lang.UnsupportedOperationException: Not supported in SOAP 1.1&lt;br /&gt; at com.sun.xml.internal.messaging.saaj.soap.ver1_1.Fault1_1Impl.getFaultSubcodes(Fault1_1Impl.java:220)&lt;br /&gt; at com.sun.xml.ws.fault.SOAPFaultBuilder.createSOAP12Fault(SOAPFaultBuilder.java:404)&lt;br /&gt; at com.sun.xml.ws.fault.SOAPFaultBuilder.createSOAPFaultMessage(SOAPFaultBuilder.java:172)&lt;br /&gt; at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:249)&lt;br /&gt; at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)&lt;br /&gt; at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)&lt;br /&gt; at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:134)&lt;br /&gt; at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:272)&lt;br /&gt; at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:185)&lt;br /&gt; at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:180)&lt;br /&gt; at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)&lt;br /&gt; at weblogic.wsee.jaxws.JAXWSServlet.service(JAXWSServlet.java:64)&lt;br /&gt; at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)&lt;br /&gt; at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)&lt;br /&gt; at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)&lt;br /&gt; at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)&lt;br /&gt; at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)&lt;br /&gt; at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)&lt;br /&gt; at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)&lt;br /&gt; at weblogic.security.service.SecurityManager.runAs(Unknown Source)&lt;br /&gt; at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)&lt;br /&gt; at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)&lt;br /&gt; at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)&lt;br /&gt; at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)&lt;br /&gt; at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)&lt;br /&gt;&lt;/pre&gt;(I don&#039;t usually include the complete stack trace in a blog post, but in this case the error is so obscure, it&#039;ll help others with Google searches)&lt;br /&gt;&lt;br /&gt;I&#039;m currently unclear on why this occurs under WLS. Having tested the original code on Netbeans 6.5 &amp; Glassfish 2, it doesn&#039;t have the same issue. I note WLS 10.3 uses JAX-WS 2.1.3 and Glassfish 2 uses JAX-WS 2.1.4, so it may be a simple fix in the later JAX-WS release.&lt;br /&gt;&lt;br /&gt;Thanks very much to &lt;a href=&quot;http://kingsfleet.blogspot.com/&quot;&gt;Gerard Davison&lt;/a&gt; from Oracle UK for his assistance on resolving this one.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;//blogger.googleusercontent.com/tracker/38586079-8325947815970948056?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/kUqza4I7UH0&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/976662&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 06 May 2009 08:59:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/976662</guid>
 <comments>http://chrismuir.sys-con.com/node/976662#feedback</comments>
</item>
<item>
 <title>JAX-WS: Throwing generic SOAPFaults under WLS 10.3</title>
 <link>http://chrismuir.sys-con.com/node/952430</link>
 <description>Typically thanks to the WSDL operations including a &amp;lt;soap:fault&gt; element, when generating JAX-WS 2.1.x endpoints from the WSDL, the JAX-WS engine will also create @WebFault classes to mirror the &amp;lt;soap:fault&gt;.  As such the programmer can throw the @WebFault class to cause a SOAP fault to be returned to the caller.&lt;br /&gt;&lt;br /&gt;However what if the WSDL operation doesn&#039;t include an explicitly defined fault for the operation?  How does the programmer throw a fault without a @WebFault class?  The simple answer is add it to the WSDL and regenerate, but some of us don&#039;t have that luxury, the WSDLs are given to us.&lt;br /&gt;&lt;br /&gt;If you&#039;re using SOAP 1.1 the following code will allow you throw a generic SOAP fault from your JAX-WS endpoint:&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;&lt;br /&gt;SOAPFactory fac = SOAPFactory.newInstance();&lt;br /&gt;SOAPFault sf = fac.createFault(&quot;Your error message&quot;, new QName(&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;, &quot;Client&quot;));&lt;br /&gt;throw new SOAPFaultException(sf);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Note the QName uses the SOAP 1.1 namespace and &quot;Client&quot; fault code.&lt;br /&gt;&lt;br /&gt;The SOAP 1.2 equivalent code:&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;&lt;br /&gt;SOAPFactory fac = SOAPFactory.newInstance();&lt;br /&gt;SOAPFault sf = fac.createFault(&quot;Your error message&quot;, new QName(&quot;http://www.w3.org/2003/05/soap-envelope&quot;, &quot; Receiver&quot;));&lt;br /&gt;throw new SOAPFaultException(sf);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In this example the QName uses the SOAP 1.2 namespace and &quot;Receiver&quot; fault code.&lt;br /&gt;&lt;br /&gt;(Later edit – for the record both these mechanisms can also be used in a custom JAX-WS protocol (SOAP handler) or logical handler).&lt;br /&gt;&lt;br /&gt;In the SOAP 1.2 case you&#039;ll see something like the following SOAP fault returned from the web service call:&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;br /&gt;&lt;S:Envelope xmlns:S=&quot;http://www.w3.org/2003/05/soap-envelope&quot;&gt;&lt;br /&gt;   &lt;S:Body&gt;&lt;br /&gt;      &lt;S:Fault xmlns:ns4=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;&lt;br /&gt;         &lt;S:Code&gt;&lt;br /&gt;            &lt;S:Value&gt;S:Receiver&lt;/S:Value&gt;&lt;br /&gt;         &lt;/S:Code&gt;&lt;br /&gt;         &lt;S:Reason&gt;&lt;br /&gt;            &lt;S:Text xml:lang=&quot;en&quot;&gt;Your error message&lt;/S:Text&gt;&lt;br /&gt;         &lt;/S:Reason&gt;&lt;br /&gt;         &lt;S:Detail&gt;&lt;br /&gt;            &lt;ns2:exception class=&quot;java.lang.RuntimeException&quot; note=&quot;To disable this feature, set com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace system property to false&quot; xmlns:ns2=&quot;http://jax-ws.dev.java.net/&quot;&gt;&lt;br /&gt;               &lt;message&gt;javax.xml.ws.soap.SOAPFaultException: Your error message &lt;/message&gt;&lt;br /&gt;               &lt;ns2:stackTrace&gt;&lt;br /&gt;                 &lt;!-- stack trace snipped --&gt;&lt;br /&gt;               &lt;/ns2:stackTrace&gt;&lt;br /&gt;            &lt;/ns2:exception&gt;&lt;br /&gt;         &lt;/S:Detail&gt;&lt;br /&gt;      &lt;/S:Fault&gt;&lt;br /&gt;   &lt;/S:Body&gt;&lt;br /&gt;&lt;/S:Envelope&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Specifically for Oracle&#039;s WebLogic Server (WLS) v10.3, we need to make a slight change to the SOAP 1.2 code by supplying the specific SOAP protocol to the SOAPFactory.newInstance call:&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;java&quot;&gt;&lt;br /&gt;SOAPFactory fac = SOAPFactory.newInstance(SOAPConstants.SOAP_1_2_PROTOCOL);&lt;br /&gt;SOAPFault sf = fac.createFault(&quot;Your error message&quot;, new QName(&quot;http://www.w3.org/2003/05/soap-envelope&quot;, &quot; Receiver&quot;));&lt;br /&gt;throw new SOAPFaultException(sf);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If you don&#039;t do this the web service will return an empty HTTP body (though the HTTP header will include a &quot;500 internal server error&quot;), and you&#039;ll see the following Java Stack Trace:&lt;br /&gt;&lt;pre name=&quot;code&quot; class=&quot;xml&quot;&gt;&lt;br /&gt;java.lang.RuntimeException: javax.xml.ws.soap.SOAPFaultException: Your error message&lt;br /&gt;&lt;!-- java stack trace snipped --&gt;&lt;br /&gt;6/05/2009 10:18:23 com.sun.xml.internal.messaging.saaj.soap.ver1_1.Fault1_1Impl getFaultSubcodes&lt;br /&gt;SEVERE: SAAJ0303: Operation getFaultSubcodes not supported by SOAP 1.1 &lt;br /&gt;6/05/2009 10:18:23 com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit handle&lt;br /&gt;SEVERE: Not supported in SOAP 1.1&lt;br /&gt;java.lang.UnsupportedOperationException: Not supported in SOAP 1.1&lt;br /&gt; at com.sun.xml.internal.messaging.saaj.soap.ver1_1.Fault1_1Impl.getFaultSubcodes(Fault1_1Impl.java:220)&lt;br /&gt; at com.sun.xml.ws.fault.SOAPFaultBuilder.createSOAP12Fault(SOAPFaultBuilder.java:404)&lt;br /&gt; at com.sun.xml.ws.fault.SOAPFaultBuilder.createSOAPFaultMessage(SOAPFaultBuilder.java:172)&lt;br /&gt; at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:249)&lt;br /&gt; at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)&lt;br /&gt; at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)&lt;br /&gt; at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:134)&lt;br /&gt; at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:272)&lt;br /&gt; at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:185)&lt;br /&gt; at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:180)&lt;br /&gt; at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)&lt;br /&gt; at weblogic.wsee.jaxws.JAXWSServlet.service(JAXWSServlet.java:64)&lt;br /&gt; at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)&lt;br /&gt; at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)&lt;br /&gt; at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)&lt;br /&gt; at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)&lt;br /&gt; at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)&lt;br /&gt; at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)&lt;br /&gt; at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)&lt;br /&gt; at weblogic.security.service.SecurityManager.runAs(Unknown Source)&lt;br /&gt; at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)&lt;br /&gt; at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)&lt;br /&gt; at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)&lt;br /&gt; at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)&lt;br /&gt; at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;(I don&#039;t usually include the complete stack trace in a blog post, but in this case the error is so obscure, it&#039;ll help others with Google searches)&lt;br /&gt;&lt;br /&gt;I&#039;m currently unclear on why this occurs under WLS.  Having tested the original code on Netbeans 6.5 &amp;amp; Glassfish 2, it doesn&#039;t have the same issue.  I note WLS 10.3 uses JAX-WS 2.1.3 and Glassfish 2 uses JAX-WS 2.1.4, so it may be a simple fix in the later JAX-WS release.&lt;br /&gt;&lt;br /&gt;Thanks very much to &lt;a href=&quot;http://kingsfleet.blogspot.com/&quot;&gt;Gerard Davison&lt;/a&gt; from Oracle UK for his assistance on resolving this one.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;http://res1.blogblog.com/tracker/38586079-5971390444945648863?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/l4QgJaipoL8&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/952430&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 05 May 2009 22:25:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/952430</guid>
 <comments>http://chrismuir.sys-con.com/node/952430#feedback</comments>
</item>
<item>
 <title>JAX-WS: A @SchemaValidation Custom Handler to Alter Framework SOAP Faults</title>
 <link>http://chrismuir.sys-con.com/node/952429</link>
 <description>A few days ago I blogged about suppressing the SOAP fault detail Java stack trace on WebLogic Server when using the JAX-WS @SchemaValidation annotation for your web services. One of the problems with the @SchemaValidation annotation is dependent on the error in your incoming SOAP payload, you may get all sorts of potential errors returned in a SOAP fault.&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/952429&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Mon, 04 May 2009 20:56:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/952429</guid>
 <comments>http://chrismuir.sys-con.com/node/952429#feedback</comments>
</item>
<item>
 <title>Standalone WLS ADF deployment – Be careful which URL you use</title>
 <link>http://chrismuir.sys-con.com/node/952428</link>
 <description>We hit a problem with JDeveloper 11g ADF applications deployed to WebLogic Server 10.3 that&#039;s worth sharing.&lt;br /&gt;&lt;br /&gt;Under JDev 10.1.3 we could access our remotely deployed ADF applications on OAS through a URL similar to:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://host:port/context-root/faces/page.jspx&quot; title=&quot;http://host:port/context-root/faces/page.jspx&quot;&gt;http://host:port/context-root/faces/page.jspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;...this is in fact how JDev 10.1.3 ran apps on the integrated OAS/OC4J container.&lt;br /&gt;&lt;br /&gt;However on attempting to run a new ADF 11g application on a standalone WebLogic Server, if we used a similar URL as above, then attempted to navigate to any other page via a JSF navigation rule and command control, the original page would show, no navigation would occur, no errors in the logs would be reported.&lt;br /&gt;&lt;br /&gt;It&#039;s very hard to debug without an error at least somewhere.  This left us scratching our heads, and a SR to Oracle Support followed.&lt;br /&gt;&lt;br /&gt;Turns out under JDev 11g you cannot include the page file extension in the URL any longer when accessing an ADF application (regardless if it&#039;s on an integrated or standalone WLS).  You must use:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://host:port/context-root/faces/page&quot; title=&quot;http://host:port/context-root/faces/page&quot;&gt;http://host:port/context-root/faces/page&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If I&#039;d carefully looked at how JDev 11g deploys and runs the ADF applications on the integrated WLS I would have realised this because that&#039;s what appears in the log window, but I hadn&#039;t noticed the subtle change in the URL.  It&#039;s possibly something that wouldn&#039;t catch somebody new to JDev/ADF, but more likely to catch us old hands out with prior 10.1.3 knowledge.  You&#039;re more likely to hit this problem on a standalone WLS as when running applications within JDev it forms the URL for you for the integrated WLS, but on the standalone WLS you need to work it out for yourself.&lt;br /&gt;&lt;br /&gt;Note that the JDev 11g Fusion Guide under &lt;a href=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/deployment_topics.htm#CIHFEFID&quot;&gt;section 32.9&lt;/a&gt; notes the URL syntax as:&lt;br /&gt;&lt;br /&gt;&quot;http://&amp;lt;host&gt;:port/&amp;lt;context root&gt;/faces/&amp;lt;page&gt;&quot;&lt;br /&gt;&lt;br /&gt;....but what it doesn&#039;t bother to note is &amp;lt;page&gt; should be the page name without the file extension.&lt;br /&gt;&lt;br /&gt;Thanks to the Oracle Support staff and the Oracle JDev development team behind the scenes who discovered my error.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;http://res1.blogblog.com/tracker/38586079-7231084464368667317?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/BgHQ_CoCIA8&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/952428&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Mon, 27 Apr 2009 22:24:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/952428</guid>
 <comments>http://chrismuir.sys-con.com/node/952428#feedback</comments>
</item>
<item>
 <title>JAX-WS @SchemaValidation: suppressing the SOAP fault detail Java stack trace on WLS</title>
 <link>http://chrismuir.sys-con.com/node/952427</link>
 <description>This post gives a solution that has been given in numerous other locations and the solution is even fairly obvious, but I needed a location to record it, so here it is.&lt;br /&gt;&lt;br /&gt;Recently &lt;a href=&quot;http://kingsfleet.blogspot.com/2009/01/schema-validation-for-jax-ws.html&quot;&gt;Gerard Davison&lt;/a&gt; at Oracle UK detailed the JAX-WS @SchemaValidation tag.&lt;br /&gt;&lt;br /&gt;The default behaviour of Oracle&#039;s WebLogic Server 10.3 on receiving a SOAP payload that doesn&#039;t conform to the WSDL/XSDs in a JAX-WS endpoint method with the @SchemaValidation annotation is to throw a SOAP fault.&lt;br /&gt;&lt;br /&gt;Under &lt;a href=&quot; http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383507&quot;&gt;SOAP 1.1&lt;/a&gt; the SOAP fault payload returned to the client includes a faultcode, faultstring, faultactor (optional) and detail (optional) component.&lt;br /&gt;&lt;br /&gt;Under &lt;a href=&quot;http://www.w3.org/TR/2007/REC-soap12-part1-20070427/#soapfault&quot;&gt;SOAP 1.2&lt;/a&gt; the SOAP fault includes a Code, Reason, Node (optional), Role (optional) and Detail (optional) component.&lt;br /&gt;&lt;br /&gt;Assuming SOAP v1.2, given the @SchemaValidation annotation and invalid SOAP payload, we may see the following SOAP result from our JAX-WS web service:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/Se_clXcTusI/AAAAAAAAAsI/xPqJQH82Jws/s1600-h/pic1.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 133px;&quot; src=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/Se_clXcTusI/AAAAAAAAAsI/xPqJQH82Jws/s400/pic1.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5327719418708605634&quot; /&gt;&lt;/a&gt;&lt;br /&gt;(Click the picture to expand it)&lt;br /&gt;&lt;br /&gt;As you can see the SOAP 1.2 fault includes the Code, Reason and Detail components.  As can also been seen the Detail component includes the full Java stack trace(I&#039;ve snipped the stack trace for brevity).&lt;br /&gt;&lt;br /&gt;It may be undesirable to return the complete Java stack trace in the SOAP fault and you may wish to turn this off.  If you look closely at the error message the answer in how to do this is revealed.  Effectively we need to configure the WLS server to include the following option on startup:&lt;br /&gt;&lt;br /&gt;-Dcom.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace=false&lt;br /&gt;&lt;br /&gt;For WLS 10.3 this entry should be included in your startWebLogic.cmd file.&lt;br /&gt;&lt;br /&gt;For a standalone WLS this file is found under:&lt;br /&gt;&lt;br /&gt;&amp;lt;WLS_HOME&gt;/user_projects/domains/&amp;lt;YOUR_DOMAIN&gt;/bin&lt;br /&gt;&lt;br /&gt;For the integrated WLS within JDeveloper 11g it&#039;s found under:&lt;br /&gt;&lt;br /&gt;&amp;lt;JDEV_HOME&gt;\system\system11.1.1.0.31.51.88\DefaultDomain\bin&lt;br /&gt;&lt;br /&gt;Locate the following entry in the startWebLogic.cmd file:&lt;br /&gt;&lt;br /&gt;set JAVA_OPTIONS=%SAVE_JAVA_OPTIONS%&lt;br /&gt;&lt;br /&gt;..and change it to:&lt;br /&gt;&lt;br /&gt;set JAVA_OPTIONS=-Dcom.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace=false %SAVE_JAVA_OPTIONS%&lt;br /&gt;&lt;br /&gt;On restarting the WLS server, and reinvoking the web service with an invalid SOAP payload, the SOAP fault will now look like:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Se_clUeAb_I/AAAAAAAAAsQ/SOEwcj61Wvo/s1600-h/pic2.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 77px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/Se_clUeAb_I/AAAAAAAAAsQ/SOEwcj61Wvo/s400/pic2.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5327719417910423538&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;http://res1.blogblog.com/tracker/38586079-4725335296102895631?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/VX8MBASFmZc&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/952427&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 22 Apr 2009 23:10:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/952427</guid>
 <comments>http://chrismuir.sys-con.com/node/952427#feedback</comments>
</item>
<item>
 <title>ADF Faces RC – displaying user help</title>
 <link>http://chrismuir.sys-con.com/node/952426</link>
 <description>ADF Faces RC under JDeveloper 11g supports different mechanisms for displaying runtime help to users linked with an on-screen component.  I had a chance to play with this today and (once again) thought I&#039;d document my findings here as I found the Oracle documentation somewhat confusing (or maybe it&#039;s just me).&lt;br /&gt;&lt;br /&gt;The Oracle documentation that describes how to get this working can be found in section &lt;a href=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/b31973/af_message.htm#CHDHIGIA&quot;&gt;16.5 Displaying Help for Components&lt;/a&gt; of the Oracle &lt;a href=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/b31973/toc.htm&quot;&gt;JDev 11g Fusion Web Developer&#039;s Guide&lt;/a&gt;.  It&#039;s worth noting you should read the entire section &lt;a href=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/b31973/af_message.htm#CACCFEFA&quot;&gt;16 Displaying Tips, Messages, and Help&lt;/a&gt; as there are a few assumptions in section 16.5 that you&#039;ve read the earlier parts.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;Help types&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A subset of the ADF Faces RC components include support for displaying help, through the inclusion of the helpTopicId attribute on the component&#039;s tag.&lt;br /&gt;&lt;br /&gt;ADF Faces RC provides for 3 different help types for the components that support help:&lt;br /&gt;&lt;br /&gt;· Definition – places a question mark icon near the component which when the user hovers the mouse over the component, help text is displayed.  The exact location of the question mark icon relative to the component depends on the type of component.  Section 16.5 of the Oracle documentation dictates this.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SeVqawv4S_I/AAAAAAAAAq4/Zags2a8dZGQ/s1600-h/pic1.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 393px; height: 79px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SeVqawv4S_I/AAAAAAAAAq4/Zags2a8dZGQ/s400/pic1.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5324779142430346226&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;· Instructions – typically displays a note window (that looks like a speech bubble) over the component when the user clicks in the field, where the note window shows the help text.  For panel headers and query object components the help text appears inline with the component rather than as a note window.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SeVr86SwvnI/AAAAAAAAArA/z80ZJmYXK80/s1600-h/pic2.png&quot;&gt;&lt;img style=&quot;margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 60px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SeVr86SwvnI/AAAAAAAAArA/z80ZJmYXK80/s400/pic2.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5324780828619751026&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;· External URL – displays a similar question mark icon to the &quot;Definition&quot; help type above, except when the user clicks on the icon (rather than hovers over the icon with the mouse pointer), launches a separate browser window opening an external URL.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/SeVwBmP_eeI/AAAAAAAAArI/iI1b3Nwo92g/s1600-h/pic3.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 246px;&quot; src=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/SeVwBmP_eeI/AAAAAAAAArI/iI1b3Nwo92g/s400/pic3.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5324785307185281506&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Providing Definition or Instructions based help&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The setup for providing either Definition or Instructions based help is as follows:&lt;br /&gt;&lt;br /&gt;1. Within your ViewController project create a Java class that extends oracle.adf.view.rich.help.ResourceBundleHelpProvider.  In the following example I&#039;ve created the class MyHelpProvider under the package view.help&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/SeVw1ndvVWI/AAAAAAAAArQ/VLrNJjFEYxw/s1600-h/pic4.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 127px;&quot; src=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/SeVw1ndvVWI/AAAAAAAAArQ/VLrNJjFEYxw/s400/pic4.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5324786200864576866&quot; /&gt;&lt;/a&gt;&lt;br /&gt;2. We next need to create the file adf-settings.xml to configure the custom ResoureBundleHelpProvider.  This file is meant to go under the ADF META-INF node in the Application Resources options within the Application Navigator:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/SeVxtiXcZUI/AAAAAAAAArY/bTWCDgYY6F0/s1600-h/pic5.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 333px; height: 385px;&quot; src=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/SeVxtiXcZUI/AAAAAAAAArY/bTWCDgYY6F0/s400/pic5.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5324787161568666946&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Unfortunately I can&#039;t find an easy way to create this file under this node.  The easiest way seems to be to locate the &amp;lt;app_dir&gt;\.adf\META-INF directory under Windows explorer or similar, and manually create the XML file in there.  Once done return to JDeveloper and restart it.  On JDeveloper reopening you should see the file added as per above.&lt;br /&gt;&lt;br /&gt;(The Oracle documentation is incorrect in instructing you to create the adf-settings.xml file under the ViewController&#039;s META-INF directory.  It should be the &amp;lt;app_dir&gt;\.adf\META-INF directory as specified above).&lt;br /&gt;&lt;br /&gt;The contents of the adf-settings.xml file are as follows:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SeVygRgvfZI/AAAAAAAAArg/ZNhrUbiU4g8/s1600-h/pic6.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 187px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SeVygRgvfZI/AAAAAAAAArg/ZNhrUbiU4g8/s400/pic6.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5324788033217592722&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Note the help-provider-class mapping that points to the package.name of our Java class, namely view.help.MyHelpProvider.&lt;br /&gt;&lt;br /&gt;The &amp;lt;property&gt;&#039;s tags define the resource properties file that contain our help text to display for each help-enabled component.  In this example I&#039;ve created a file helpFile.properties (the extension is dropped in the adf-settings.xml file) in the view.resources package.  We&#039;ll look at this next.  The property-name as far as I can tell can be anything you want and has no effect elsewher. I&#039;m not entirely sure why it&#039;s included; presumably it&#039;s possible to have multiple resource files?&lt;br /&gt;&lt;br /&gt;3. The contents of helpFile.properties file are as follows:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SeVysrD5BRI/AAAAAAAAAro/kIbof8XHTzQ/s1600-h/pic7.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 91px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SeVysrD5BRI/AAAAAAAAAro/kIbof8XHTzQ/s400/pic7.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5324788246234334482&quot; /&gt;&lt;/a&gt;&lt;br /&gt;As you can see in the properties file we have key-value pairs, specifically the help ID and the associated text.  Of special note, see that each key is either completed with the word DEFINITION or INSTRUCTIONS.  It is this that determines the help type for the component.  (Somewhat confusingly INSTRUCTIONS is a plural, and DEFINTION is singular)&lt;br /&gt;&lt;br /&gt;4. Finally we need to bind the help key from the properties file to the actual ADF Faces RC component on a web page:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SeV07dI_v8I/AAAAAAAAArw/vtPxDQm6t6c/s1600-h/pic8.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 206px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/SeV07dI_v8I/AAAAAAAAArw/vtPxDQm6t6c/s400/pic8.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5324790699218943938&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Note for the 2 input text controls above the helpTopicId parameter.  Note how these map back to what I had in the properties file minus the DEFINITION or INSTRUCTIONS suffix.  Those suffixes are only included in the properties file.  As such the properties file determines the behaviour of the help and components in this case.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Providing External URL based help&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To configure the external URL help type we return to our custom MyHelpProvider class and override the super getExternalUrl method as follows:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SeV1OaGyPgI/AAAAAAAAAr4/KGJDHKcNCrU/s1600-h/pic9.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 272px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SeV1OaGyPgI/AAAAAAAAAr4/KGJDHKcNCrU/s400/pic9.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5324791024821878274&quot; /&gt;&lt;/a&gt;&lt;br /&gt;In the 2nd if statement we&#039;ve added the ability to capture the helpTopicId and return an alternative URL which will be used for the new browser window.  As you add more components that require help, you simply add more if statements with associated URLs.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Further functionality&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you wish to configure multiple helper classes the adf-settings.xml file allows you to include a filter via the prefix attribute on the help-provider tag as follows:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/SeV31fYRg5I/AAAAAAAAAsA/pw4Y0kKdt_8/s1600-h/pic10.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 179px;&quot; src=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/SeV31fYRg5I/AAAAAAAAAsA/pw4Y0kKdt_8/s400/pic10.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5324793895275561874&quot; /&gt;&lt;/a&gt;&lt;br /&gt;In this case only helpTopicIds with the prefix MYHELP_ will be passed to the MyHelpProvider class.&lt;br /&gt;&lt;br /&gt;In addition the Oracle documentation specifies how to use a managed bean help file, which is relatively simple, or XLIFF based help files.  I don&#039;t have any experience with XLIFF files so I&#039;ll leave readers to read the Oracle documentation.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Credit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Thanks to user518058 and Frank Nimphius on the &lt;a href=&quot;http://forums.oracle.com/forums/thread.jspa?threadID=870363&amp;amp;tstart=0&quot;&gt;JDev OTN Forums&lt;/a&gt; for posting about a couple of the implementation issues with the user-help.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;http://res1.blogblog.com/tracker/38586079-2977537488922760869?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/DgrqAWMMhJk&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/952426&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 15 Apr 2009 00:57:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/952426</guid>
 <comments>http://chrismuir.sys-con.com/node/952426#feedback</comments>
</item>
<item>
 <title>JNDI failure for WLS deployed ADF applications</title>
 <link>http://chrismuir.sys-con.com/node/952425</link>
 <description>One runtime error I&#039;ve hit a few times now when setting up an ADF application to use a JNDI Data Source via WebLogic Server (WLS) is the following:&lt;br /&gt;&lt;br /&gt;(I&#039;ll document this issue here to save myself grief later on and hopefully help a few other people out)&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SdHZDtR1rNI/AAAAAAAAAqQ/mhL4xz-w8N8/s1600-h/pic0.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 279px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SdHZDtR1rNI/AAAAAAAAAqQ/mhL4xz-w8N8/s400/pic0.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5319271292618517714&quot; /&gt;&lt;/a&gt;&lt;br /&gt;The specific error text:&lt;br /&gt;&lt;br /&gt;JNDI failure. Unable to lookup Data Source at context jdbc/appDS&lt;br /&gt;Unable to resolve &#039;jdbc.appDS&#039;. Resolved &#039;jdbc&#039;.&lt;br /&gt;&lt;br /&gt;Note that the text &quot;jdbc/appDS&quot; or &quot;jdbc.appDS&quot; may differ in your specific case dependent on what you did in the following steps.&lt;br /&gt;&lt;br /&gt;The error comes about as I&#039;ve:&lt;br /&gt;&lt;br /&gt;1) Modified my ADF BC Application Module AppModuleLocal configuration to use a JDBC DataSource connection type, specifying a datasource name of jdbc/appDS.&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SdHZI0PMg-I/AAAAAAAAAqY/tVIFEOcNnhk/s1600-h/pic1.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 391px; height: 400px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SdHZI0PMg-I/AAAAAAAAAqY/tVIFEOcNnhk/s400/pic1.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5319271380385825762&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Accessed via Model project -&gt; Application Module right click -&gt; Configurations -&gt; select AppModuleLocal then Edit button -&gt; Application Module tab.&lt;br /&gt;&lt;br /&gt;2) On the WebLogic Server I&#039;ve created a data source as following:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/SdHZtWKx2kI/AAAAAAAAAqg/gQt-iyuNUiw/s1600-h/pic2.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 344px;&quot; src=&quot;http://2.bp.blogspot.com/_5hhNK2aXwp8/SdHZtWKx2kI/AAAAAAAAAqg/gQt-iyuNUiw/s400/pic2.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5319272007969397314&quot; /&gt;&lt;/a&gt;&lt;br /&gt;This is accessed via opening your WLS console + logging in -&gt; Domain Structure -&gt; Services -&gt; JDBC -&gt; Data Sources.&lt;br /&gt;&lt;br /&gt;First note the AppDataSource that I&#039;ve created, then the JNDI Name that maps back to that specified in the previous step.&lt;br /&gt;&lt;br /&gt;Then note that the Targets entry is empty for my configured data source.  Effectively I&#039;ve created the data source in WLS but forgotten to assign it to any WLS server and in this case is what&#039;s causing my problem.&lt;br /&gt;&lt;br /&gt;To rectify this I click on the data source name -&gt; Targets tab then assign the data source to each server I&#039;m interested in (in this case just the JDev 11g integrated WLS DefaultServer):&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/SdHas4uCLiI/AAAAAAAAAqo/aGD37x5537Q/s1600-h/pic3.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 344px;&quot; src=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/SdHas4uCLiI/AAAAAAAAAqo/aGD37x5537Q/s400/pic3.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5319273099575832098&quot; /&gt;&lt;/a&gt;&lt;br /&gt;On saving the changes and returning to the Data Sources page you should see:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/SdHa0aQ4A4I/AAAAAAAAAqw/m25CrdElslg/s1600-h/pic4.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 344px;&quot; src=&quot;http://1.bp.blogspot.com/_5hhNK2aXwp8/SdHa0aQ4A4I/AAAAAAAAAqw/m25CrdElslg/s400/pic4.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5319273228839420802&quot; /&gt;&lt;/a&gt;&lt;br /&gt;And the problem should now be resolved.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;http://res1.blogblog.com/tracker/38586079-7544247251736677829?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/xQWeC2x4rUw&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/952425&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 31 Mar 2009 04:34:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/952425</guid>
 <comments>http://chrismuir.sys-con.com/node/952425#feedback</comments>
</item>
<item>
 <title>ADF BC: Using Groovy to fetch sequence numbers Part II</title>
 <link>http://chrismuir.sys-con.com/node/952424</link>
 <description>I recently posted &lt;a href=&quot;http://one-size-doesnt-fit-all.blogspot.com/2009/03/adf-bc-using-groovy-to-fetch-sequence.html&quot;&gt;ADF BC: Using Groovy to fetch sequence numbers for EO/VO attribute default values&lt;/a&gt;.  This post showed the power of what you can get away with in the new Groovy expressions of ADF Business Components in JDeveloper 11g.&lt;br /&gt;&lt;br /&gt;Though power is good (muhahaha!, um, cough), simple is better. &lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://radio.weblogs.com/0118231/&quot;&gt;Steve Muench&lt;/a&gt; suggested the following to make retrieving sequence numbers a breeze via the Groovy expression facilities.&lt;br /&gt;&lt;br /&gt;Readers will be familiar with the common recommendation for ADF Business Components to create a layer of framework extensions, as per &lt;a href=&quot;http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcadvgen.htm#insertedID2&quot;&gt;Section 33.2&lt;/a&gt; of the JDeveloper 11g Fusion Guide.&lt;br /&gt;&lt;br /&gt;With this in mind we can create the following helper method seqNextVal() to fetch the next value for a named sequence in our custom EntityImpl:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/ScL8C8UHqtI/AAAAAAAAAqA/iaPkISwSwcI/s1600-h/seqNextValCode.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 321px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/ScL8C8UHqtI/AAAAAAAAAqA/iaPkISwSwcI/s400/seqNextValCode.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5315087637731060434&quot; /&gt;&lt;/a&gt;&lt;br /&gt;...which we can then make use of in our Groovy expression in the Entity Object attribute&#039;s default value field:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/ScL8DeCmPNI/AAAAAAAAAqI/4z7tfyHC550/s1600-h/attrDialog.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;&quot; src=&quot;http://4.bp.blogspot.com/_5hhNK2aXwp8/ScL8DeCmPNI/AAAAAAAAAqI/4z7tfyHC550/s400/attrDialog.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5315087646784371922&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Remember to set the Value Type = Expression.&lt;br /&gt;&lt;br /&gt;Thanks to Steve for his suggestion.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;http://res1.blogblog.com/tracker/38586079-2081682130257423621?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/uRC08k_f2gE&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/952424&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Thu, 19 Mar 2009 22:11:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/952424</guid>
 <comments>http://chrismuir.sys-con.com/node/952424#feedback</comments>
</item>
<item>
 <title>Advert: AUSOUG-Western Australia: Why You can No Longer Avoid JDeveloper</title>
 <link>http://chrismuir.sys-con.com/node/952423</link>
 <description>&lt;div xmlns=&#039;http://www.w3.org/1999/xhtml&#039;&gt;&lt;span class=&#039;newsItem&#039;&gt;&lt;div style=&#039;margin: 0cm 0cm 10pt; line-height: normal;&#039;&gt;&lt;span class=&#039;newsItem&#039;&gt;&lt;span class=&#039;newsItem&#039;&gt;&lt;span style=&#039;font-size: 10pt;&#039;&gt;Oracle are building their Fusion Application suite using JDeveloper and the ADF framework. If we think about how long Oracle Forms has been a core development product for Oracle it seems obvious that this new platform will have similar relevance.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;span style=&#039;font-size: 10pt;&#039;&gt;&lt;br/&gt;A confirmed JDeveloper cynic, Penny Cookson has finally been bitten by the JDeveloper bug, and like any Oracle geek can be found playing with the new features in her office in the small hours of the morning (CM - really, it&#039;s true ;-)&lt;br/&gt;&lt;/span&gt;&lt;/div&gt; &lt;div style=&#039;margin: 0cm 0cm 10pt; line-height: normal;&#039;&gt;&lt;span style=&#039;font-size: 10pt;&#039;&gt;If you&#039;re interested in learning why Penny, a long time Apex advocate is now preaching about JDeveloper, and you&#039;re located in Perth Western Australia, join us on April 2nd to hear Penny&#039;s &lt;a href=&#039;http://www.ausoug.org.au/wa&#039;&gt;AUSOUG-WA&lt;/a&gt; presentation about JDeveloper 11g.  Penny will discuss&lt;/span&gt;&lt;span class=&#039;newsItem&#039;&gt;&lt;span class=&#039;newsItem&#039;&gt;&lt;span style=&#039;font-size: 10pt;&#039;&gt; why you should look at JDeveloper and demonstrate some of the smart and cute new features in JDeveloper 11g.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;span style=&#039;font-size: 10pt;&#039;&gt;&lt;br/&gt;More details about the event can be found &lt;a href=&#039;http://www.ausoug.org.au/pls/portal30/docs/FOLDER/WACONTENTAREA/EBULLETINS/EBULLETINMAR2009.HTML&#039;&gt;here&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;AUSOUG-Western Australia is also looking for more presenters at their monthly meetings.  If you&#039;re interested in presenting please drop me an email.  Email me at chrisSTOPmuirATsagecomputingSTOPcomSTOPau.&lt;br/&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;http://res1.blogblog.com/tracker/38586079-5462197727755145210?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/5pgqzB7l_kg&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/952423&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 17 Mar 2009 06:58:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/952423</guid>
 <comments>http://chrismuir.sys-con.com/node/952423#feedback</comments>
</item>
<item>
 <title>ADF BC: Using Groovy to fetch sequence numbers for EO/VO attribute default values</title>
 <link>http://chrismuir.sys-con.com/node/952422</link>
 <description>&lt;div xmlns=&#039;http://www.w3.org/1999/xhtml&#039;&gt;I&#039;ve recently been fooling around with the new ADF Business Component support for Groovy expressions in JDeveloper 11g, and thought I&#039;d share the following discovery.&lt;br/&gt;&lt;br/&gt;(Usual caveat this hasn&#039;t yet been tested in a production system, so your mileage may vary)&lt;br/&gt;&lt;br/&gt;JDeveloper&#039;s ADF BC supports a number of different mechanisms to fetch database sequence numbers for Entity Object &amp;amp; View Object primary key attributes when a new record is created.&lt;br/&gt;&lt;br/&gt;One such method is to override the create(AttributeList) method in the Entity Object and include the following Java code:&lt;br/&gt;&lt;br/&gt;&lt;font face=&#039;Courier New&#039;&gt;@Override&lt;br/&gt;public void create(AttributeList attributeList) {&lt;br/&gt;  super.create(attributeList);&lt;br/&gt;   SequenceImpl seq = new SequenceImpl(&quot;LOG_SEQ&quot;, getDBTransaction());&lt;br/&gt;   Number seqNextval = seq.getSequenceNumber();&lt;br/&gt;   setId(seqNextval);&lt;br/&gt;}&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;This example retrieves the next value from the database&#039;s LOG_SEQ sequence and writes it to the local Entity Object&#039;s ID attribute via a call to setId().&lt;br/&gt;&lt;br/&gt;This minor piece of code can now be replaced with a Groovy expression in JDeveloper 11g&#039;s ADF Business Components.&lt;br/&gt;&lt;br/&gt;If we open the Entity Object editor, then double click the primary key attribute we&#039;re interested in populating with the sequence number, we can now enter the following Groovy expression for the Value field with the Expression radio button selected:&lt;br/&gt;&lt;br/&gt;&lt;font face=&#039;Courier New&#039;&gt;(new oracle.jbo.server.SequenceImpl(&quot;LOG_SEQ&quot;, (cont)&lt;br/&gt;object.getDBTransaction())). (cont)&lt;br/&gt;getSequenceNumber()&lt;/font&gt;&lt;br/&gt;&lt;div class=&#039;ii gt&#039; id=&#039;:12&#039;&gt; &lt;br/&gt;The following picture shows the entry in context of the Edit Attribute dialog:&lt;br/&gt;&lt;br/&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SbXoPyVMn1I/AAAAAAAAAp4/GyA7OTnSbYs/s1600-h/groovy.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 240px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SbXoPyVMn1I/AAAAAAAAAp4/GyA7OTnSbYs/s400/groovy.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5311406693459730258&quot; /&gt;&lt;/a&gt;Note in the expression how we must explicitely name the package + Java class for the SequenceImpl as we don&#039;t have a mechanism for importing classes in the simple Groovy expression.  In addition for the getDBTransaction() call we need to make reference to the Groovy &quot;object&quot; expression (or is that class? Whatever).  &quot;object&quot; passes a copy of the Entity Object class to the Groovy expression evaluator allowing it to call methods of the Entity Object, in this example getDBTransaction().  More information on Groovy expressions can be found in Steve Muench&#039;s following blog &lt;a href=&#039;http://radio.weblogs.com/0118231/2007/05/22.html&#039;&gt;post&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;The advantage of this Groovy approach is one less reason to code in Java in JDeveloper if you feel the desire (though the Java code example from above isn&#039;t exactly difficult).  The disadvantage of this approach, I can imagine it would be difficult to debug if something went wrong.&lt;br/&gt;&lt;br/&gt;In conclusion we can see the power of the new Groovy expressions supported through JDeveloper 11g and ADF Business Components.&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;http://res1.blogblog.com/tracker/38586079-8186387614874068546?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/Rv88bHypKkg&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/952422&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 10 Mar 2009 00:07:00 EDT</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/952422</guid>
 <comments>http://chrismuir.sys-con.com/node/952422#feedback</comments>
</item>
<item>
 <title>Join 180 members of the ADF Enterprise Methodology Group (+ minor name change)</title>
 <link>http://chrismuir.sys-con.com/node/952421</link>
 <description>Just a small note for the millions of my readers (hi Mum!) who care about such, that the ADF Methodology group (that&#039;s group with a lower g) has been renamed the ADF Enterprise Methodology Group (that&#039;s group with an upper G) to better reflect, um, well if you&#039;re really interested it&#039;s documented &lt;a href=&quot;http://groups.google.com/group/adf-methodology/msg/07f96f3886912362?hl=en&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;(It would be appreciated if Oracle employee&#039;s in charge of websites and similar that link to the original group could update any link names please)&lt;br /&gt;&lt;br /&gt;For those who&#039;d like to know more about the group, following is a little marketing spin to drag you in:&lt;br /&gt;&lt;br /&gt;You can easily tell when a tool has matured to being a productive environment. Software developers move from playing and learning features, to supporting production systems and discussing best practices and development methodologies to ensure the success of their next project.&lt;br /&gt;&lt;br /&gt;The ADF Enterprise Methodology Group is such a place for community discussions based around JDeveloper best practices and methodologies for ADF Enterprise development. On a day by day bases ADF &quot;experts&quot; (that&#039;s anyone that knows what ADF stands for ;-) chat about high level ADF concepts, beyond the how-do-I-get-it-to-work posts on the OTN JDeveloper Forums.&lt;br /&gt;&lt;br /&gt;If you&#039;d like to discuss best practices, steps and processes for a successful ADF project, please join us at:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://groups.google.com/group/adf-methodology&quot;&gt;http://groups.google.com/group/adf-methodology&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We look forward to talking to you on the group soon.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;http://res1.blogblog.com/tracker/38586079-1179628986452152645?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/pdjXZmWCYJo&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/952421&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Thu, 05 Mar 2009 02:05:00 EST</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/952421</guid>
 <comments>http://chrismuir.sys-con.com/node/952421#feedback</comments>
</item>
<item>
 <title>JDev IDE: defaulting to the source code editor for web pages</title>
 <link>http://chrismuir.sys-con.com/node/952420</link>
 <description>Recently &lt;a href=&quot;http://adfjsf.blogspot.com/&quot;&gt;Vivek Kumar&lt;/a&gt; posted about &lt;a href=&quot;http://adfjsf.blogspot.com/2009/02/improving-performance-in-jdeveloper-11g.html&quot;&gt;Improving Performance in JDeveloper 11g&lt;/a&gt;.  Among other suggestions his second one caught my eye: &quot;Configure JDeveloper to open jsp/jsff&#039;s in source view&quot;.  This particular suggestion applies not only to JDev 11g, but also JDev 10g (and possibly earlier versions too, none of which I have installed to check).  Unfortunately Vivek didn&#039;t give details of how to configure this so I thought I&#039;d do it here.&lt;br /&gt;&lt;br /&gt;On opening a web page in the IDE, there is a noticable delay while JDev initializes the WYSIWYG design editor.  This becomes painful if you want to only make a small code change in the web page&#039;s source code.  It becomes doubly painful as there is an infrequent bug in JDev 11g build 5188 where the design editor refuses to show the page&#039;s contents unless you flick between the source code and design editor views.&lt;br /&gt;&lt;br /&gt;As such Vivek&#039;s suggestion took my eye and reminded me we can easily change the default behaviour of JDev to open web pages in the source code editor instead, to avoid these minor annoyances.&lt;br /&gt;&lt;br /&gt;The option to do this is under the Preferences dialog invoked via the Tools menu, then selecting the File Types node:&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SayKuTs7EiI/AAAAAAAAApw/bka8-iq0evA/s1600-h/picFileTypes.png&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 286px;&quot; src=&quot;http://3.bp.blogspot.com/_5hhNK2aXwp8/SayKuTs7EiI/AAAAAAAAApw/bka8-iq0evA/s400/picFileTypes.png&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5308770588930282018&quot; /&gt;&lt;/a&gt;&lt;br /&gt;As can be seen from the above picture, selecting the Default Editors tab displays all the different file types JDeveloper works with.  For standard JSF pages with an extension of .jsp or .jspx, we can select the JSP Source option and switch its Default Editor option from Design to Source as I&#039;ve done in this example.  &lt;br /&gt;&lt;br /&gt;One minor caveat to note is JDeveloper does remember for each file what editor type you were last using, so this change only applies to new files.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;http://res1.blogblog.com/tracker/38586079-3617841523056090549?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/3DHLOXeSseo&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/952420&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Mon, 02 Mar 2009 20:35:00 EST</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/952420</guid>
 <comments>http://chrismuir.sys-con.com/node/952420#feedback</comments>
</item>
<item>
 <title>Advert: JDeveloper 11g training course</title>
 <link>http://chrismuir.sys-con.com/node/952419</link>
 <description>I&#039;m very happy to announce the arrival of our 5 day JDeveloper 11g training course in Australia.&lt;br /&gt;&lt;br /&gt;At &lt;a href=&quot;http://www.sagecomputing.com.au/&quot;&gt;SAGE Computing Services&lt;/a&gt; we&#039;ve updated our JDeveloper 10.1.3 course to include the latest ADF Business Component and ADF Faces Rich Client technologies bundled with JDeveloper 11g, the core technology set behind Oracle&#039;s upcoming Fusion Applications.&lt;br /&gt;&lt;br /&gt;This training course has been updated in conjunction with Netherland&#039;s Fusion Middleware and Oracle specialists &lt;a href=&quot;http://www.amis-uk.com/&quot;&gt;AMIS&lt;/a&gt;, drawing upon Fusion expertise from both sides of the globe.  We&#039;re very excited by this relationship, formed by Oracle ACE Directors Lucas Jellema and myself Chris Muir, and much hard work behind the scenes by both AMIS and SAGE staff (my extensive thanks to all involved).&lt;br /&gt;&lt;br /&gt;If my Google searches prove correct, we may be the first organisations in the world to provide comprehensive ADF BC/ADF Faces RC JDeveloper 11g training besides Oracle itself, a great achievement in my honest opinion.&lt;br /&gt;&lt;br /&gt;Interested in checking out our course?&lt;br /&gt;&lt;br /&gt;View the complete course agenda in our &lt;a href=&quot;http://www.sagecomputing.com.au/courses/COURSES.pdf&quot;&gt;course catalogue&lt;/a&gt; or visit our &lt;a href=&quot;http://www.sagecomputing.com.au/oracle_training_australia.html&quot;&gt;training&lt;/a&gt; web page for more information.&lt;br /&gt;&lt;br /&gt;Also check out SAGE&#039;s other latest Oracle 11g training courses in Australia including:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;11g New Features for Developers (1 day)&lt;/li&gt;&lt;li&gt;SQL 11g (4 days)&lt;/li&gt;&lt;li&gt;    PL/SQL 11g (3 days)&lt;/li&gt;&lt;li&gt;Application Tuning 11g (3 days)&lt;/li&gt;&lt;li&gt;Database Administration 11g (5 days)&lt;/li&gt;&lt;/ul&gt;... plus all your favourite previous versions and other Oracle products, we have most of them, even Oracle Browser would you believe?!&lt;br /&gt;&lt;br /&gt;For further enquiries hit our web site and follow the &lt;a href=&quot;http://www.sagecomputing.com.au/contact_sage_computing_services.html&quot;&gt;contact us&lt;/a&gt; details.  We look forward to hearing from you soon.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;http://res1.blogblog.com/tracker/38586079-7666960468510147711?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/d2ZFC0FyK2s&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/952419&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 18 Feb 2009 01:54:00 EST</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/952419</guid>
 <comments>http://chrismuir.sys-con.com/node/952419#feedback</comments>
</item>
<item>
 <title>Enabling SSL and disabling non-SSL under WLS 10.3</title>
 <link>http://chrismuir.sys-con.com/node/952418</link>
 <description>&lt;div xmlns=&#039;http://www.w3.org/1999/xhtml&#039;&gt;After spending a morning reading reams of WebLogic Server 10.3 documentation, I was delighted to discover that configuring your WebLogic Server 10.3 to serve an application via HTTPS/SSL is just a few mouse clicks.  Nice :-)&lt;br/&gt;&lt;br/&gt;As such this is a short(ish) post to document my own findings, which may be useful to other readers.  Usual disclaimer, your mileage may vary.  I&#039;ve yet to test this in a production environment, though I can confirm I&#039;ve used a packet sniffer to ensure the relayed data is encrypted (well, at least not readable by me, so I assume it&#039;s encrypted ;-)&lt;br/&gt;&lt;br/&gt;The following describes the steps to get this going.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Assumptions&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;For this post the assumed environment is as follows: an internal Window server &quot;&lt;font face=&#039;Courier New&#039;&gt;oberon.sagecomputing.com.au&lt;/font&gt;&quot; running a WLS installation in production mode configured with 2 WLS domain servers:&lt;br/&gt;&lt;ul&gt;&lt;li&gt;AdminServer port 7001 (default)&lt;/li&gt;&lt;li&gt;AdfServer port 7002&lt;/li&gt;&lt;/ul&gt;On the AdfServer I&#039;ve deployed our favourite JDeveloper 11g application BookTraining, served at the following URL:&lt;br/&gt;&lt;br/&gt;&lt;font face=&#039;Courier New&#039;&gt;http://oberon.sagecomputing.com.au:7002/BookTraining&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;Note the 7002 port number of the AdfServer and default HTTP protocol (not HTTPS).&lt;br/&gt;&lt;br/&gt;I&#039;m also using the WLS demo identity keystore and demo trust keystore for development/testing purposes.  For production neither of these keystores are appropriate, and you will need to learn how to obtain and configure new digital certificates/keystores.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Enabling SSL under WLS 10.3&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Steps to configure WLS for SSL:&lt;br/&gt;&lt;br/&gt;1) Open the WLS console&lt;br/&gt;&lt;br/&gt;2) Select from the Domain Structure -&amp;gt; (your domain) -&amp;gt; Environment -&amp;gt; Servers&lt;br/&gt;&lt;br/&gt;3) Select the server from the Summary of Servers page you wish to configure for SSL.&lt;br/&gt;&lt;br/&gt;4) Under the Settings for (server name) page, select the Configuration tab, then General tab (the defaults).&lt;br/&gt;&lt;br/&gt;5) If WLS is running in production mode, select the Lock &amp;amp; Edit button.&lt;br/&gt;&lt;br/&gt;6) Select the SSL Listen Port Enabled checkbox, and enter your preferred port in the SSL Listen Port.&lt;br/&gt;&lt;br/&gt;7) Press the Save button.&lt;br/&gt;&lt;br/&gt;8) If WLS is running in production mode, select the Release Configuration button.&lt;br/&gt;&lt;br/&gt;Now to access my running app using SSL (say configured port 7005), I&#039;d use the following URL:&lt;br/&gt;&lt;br/&gt;&lt;font face=&#039;Courier New&#039;&gt;https://oberon.sagecomputing.com.au:7005/BookTraining&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;Note the HTTPS protocol and the SSL port 7005, as separate to the original HTTP protocol on port 7002.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Browsers are our enemy&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;As I&#039;m running with the WLS demo keystores, any browser access to this URL will raise a security error.  For example in Internet Explorer 7 you&#039;ll see something like the following:&lt;br/&gt;&lt;br/&gt;&lt;img height=&#039;60%&#039; width=&#039;60%&#039; src=&#039;http://lh3.ggpht.com/_5hhNK2aXwp8/SZpAvff7zfI/AAAAAAAAAps/76jqsMJzPjk/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039; title=&#039;&#039; alt=&#039;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;For development and testing purposes you can pretty much ignore this issue and just accept &quot;Continue to this website&quot;.  However for production purposes as indicated earlier you should not use the WLS demo keystores.&lt;br/&gt;&lt;br/&gt;Once you click &quot;Continue to this website&quot;, your application&#039;s pages should be served via HTTPS/SSL.  Under your browser you should see some sort of notification that the traffic is encrypted with SSL (under Firefox this is the little lock symbol bottom right of your browser).&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Disabling non-SSL under WLS 10.3&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Once you have SSL up and running, you may decide you no longer want to serve unsecure content from your WLS server.  To disable non-SSL traffic follow these steps:&lt;br/&gt;&lt;br/&gt;1) Open the WLS console&lt;br/&gt;&lt;br/&gt;2) Select from the Domain Structure -&amp;gt; (your domain) -&amp;gt; Environment -&amp;gt; Servers&lt;br/&gt;&lt;br/&gt;3) Select the server from the Summary of Servers page you wish to configure for SSL.&lt;br/&gt;&lt;br/&gt;4) Under the Settings for (server name) page, select the Configuration tab, then General tab (the defaults).&lt;br/&gt;&lt;br/&gt;5) If WLS is running in production mode, select the Lock &amp;amp; Edit button.&lt;br/&gt;&lt;br/&gt;6) Unselect the Listen Port Enabled checkbox (not the SSL Listen Port Enabled checkbox).&lt;br/&gt;&lt;br/&gt;7) Press the Save button.&lt;br/&gt;&lt;br/&gt;8) If WLS is running in production mode, select the Release Configuration button.&lt;br/&gt;&lt;br/&gt;Access to the original URL via port 7002 &lt;font face=&#039;Courier New&#039;&gt;http://oberon.sagecomputing.com.au:7002/BookTraining &lt;/font&gt;now raises a forbidden access error.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Application architecture versus WLS SSL configuration&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;As readers will know, within a WLS installation it has the concept of a server.  Each WLS domain can have 1 or more servers as per my example above where I had the default AdminServer and a separate AdfServer (let&#039;s refer to these as a WLS domain server, as separate to a host server in order not to get confused).  Given the understanding above of turning SSL on/off for a WLS domain server, this implies if you want both protected and non protected content in your application, you will need to configure one domain server with SSL turned off, and another domain server with SSL turned on, followed by deploying your separate unsecure and secure content to the respective domain server.&lt;br/&gt;&lt;br/&gt;This does present an issue for JDeveloper JSF derived applications, because it dictates a JSF application with both secure and unsecure content will need to be split across domain servers.  As a split JSF application cannot easily share state (though the new remote task flows and bookmarkable URLs supported by JDeveloper 11g&#039;s JSF-ADF Controller provide solutions to this problem), this constraint should be considered when architecting your JSF application.  However this is probably a non-issue for most applications as typically all content is secured or unsecured, not a combination of both.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Troubleshooting&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Initially under Firefox 3 if I didn&#039;t use the full URL of the server such as:&lt;br/&gt;&lt;br/&gt;&lt;font face=&#039;Courier New&#039;&gt;https://oberon:7005/BookTraining &lt;/font&gt;&lt;br/&gt;&lt;br/&gt;rather than:&lt;br/&gt;&lt;br/&gt;&lt;font face=&#039;Courier New&#039;&gt;https://oberon.sagecomputing.com.au:7005/BookTraining &lt;/font&gt;&lt;br/&gt;&lt;br/&gt;.... I would receive the following 502 HTTP proxy error raised by the local MS ISA Proxy Server:&lt;br/&gt;&lt;br/&gt;&quot;HTTP 502 Proxy Error - The specified Secure Sockets Layer (SSL) port is not allowed. ISA Server is not configured to allow SSL requests from this port. Most Web browsers use port 443 for SSL requests. (12204) Internet Security and Acceleration Server&quot;&lt;br/&gt;&lt;br/&gt;Yet the error didn&#039;t happen under IE7.  Why was Firefox hitting our proxy server (which only allows SSL via port 443), yet IE7 wasn&#039;t?&lt;br/&gt;&lt;br/&gt;It turns out that IE7 has some magical mechanism to work out local servers and exclude the proxy when talking to them (ie. a mechanism which I didn&#039;t care to investigate ;-), while Firefox 3 only had a proxy exclusion for servers ending with &lt;font face=&#039;Courier New&#039;&gt;sagecomputing.com.au&lt;/font&gt;.  As such &lt;font face=&#039;Courier New&#039;&gt;https://oberon&lt;/font&gt; always hits the ISA proxy.  This is simply solved by either addition of the &lt;font face=&#039;Courier New&#039;&gt;oberon &lt;/font&gt;server name to the Firefox proxy exclusion list, or specifying the full URL in the browser.&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;http://res1.blogblog.com/tracker/38586079-2116740590015581358?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/eVA7Z2rKUA4&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/952418&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 17 Feb 2009 00:00:00 EST</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/952418</guid>
 <comments>http://chrismuir.sys-con.com/node/952418#feedback</comments>
</item>
<item>
 <title>JAX-WS with WS-Security under JDeveloper 11g and WLS 10.3</title>
 <link>http://chrismuir.sys-con.com/node/952417</link>
 <description>&lt;div xmlns=&#039;http://www.w3.org/1999/xhtml&#039;&gt;I&#039;ve been a little quiet on the blogging front recently while working on a number of JAX-WS WS-Security solutions via JDeveloper 11g and WebLogic Server 10.3, an area I&#039;m no expert, but rapidly gaining an appreciation of the complexities.  &lt;a href=&#039;http://kingsfleet.blogspot.com/&#039;&gt;Gerard Davison&lt;/a&gt; from Oracle UK has been incredibly helpful in finding solutions to my numerous questions about how to get all this working, his blog is well worth checking out if you&#039;re interested in JEE web services.&lt;br/&gt;&lt;br/&gt;As I&#039;ve received a number of emails from others on how to get WS-Security working with the new JAX-WS offerings in JDeveloper 11g and WLS 10.3, can I recommend readers check out this &lt;a href=&#039;http://kingsfleet.blogspot.com/2009/01/security-policy-worked-example.html&#039;&gt;post&lt;/a&gt; from Gerard that shows the essential steps in configuring both the server and client side working with the numerous required digital certificates.  Once you have that up an running it&#039;s fairly easy to extend Gerard&#039;s example to include the SOAP body WLS encryption policy (Wssp1.2-2007-EncryptBody.xml) - though make sure you read Gerard&#039;s Feb 11th update in the same post as it has an essential fix.&lt;br/&gt;&lt;br/&gt;Happy web servicering.&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;http://res1.blogblog.com/tracker/38586079-6699848249689331637?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/ISLuv2T_9CQ&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/952417&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sun, 15 Feb 2009 20:36:00 EST</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/952417</guid>
 <comments>http://chrismuir.sys-con.com/node/952417#feedback</comments>
</item>
<item>
 <title>Configuring separate dev-test-prod URLs for your ADF Faces RC application</title>
 <link>http://chrismuir.sys-con.com/node/952416</link>
 <description>&lt;div xmlns=&#039;http://www.w3.org/1999/xhtml&#039;&gt;I was asked the other day how to go about having different context-root URL paths for different deployments of a single JDeveloper 11g ADF Faces RC application, such that we have:&lt;br/&gt;&lt;br/&gt;&lt;a href=&quot;http://www.sagecomputing.com.au/bookingsDev&quot; title=&quot;http://www.sagecomputing.com.au/bookingsDev&quot;&gt;http://www.sagecomputing.com.au/bookingsDev&lt;/a&gt;&lt;br/&gt;&lt;a href=&quot;http://www.sagecomputing.com.au/bookingsTest&quot; title=&quot;http://www.sagecomputing.com.au/bookingsTest&quot;&gt;http://www.sagecomputing.com.au/bookingsTest&lt;/a&gt;&lt;br/&gt;&lt;a href=&quot;http://www.sagecomputing.com.au/bookings&quot; title=&quot;http://www.sagecomputing.com.au/bookings&quot;&gt;http://www.sagecomputing.com.au/bookings&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;While it would be fairly unusual to have all 3 environments on the same box (well, at least not recommended), in the case of a development and test environment it&#039;s quite common to have them on the same box separate from production.  As such when developers and testers logon to the combo dev-test box, it&#039;s helpful to have different URLs to assist the developers and testers understand which environment they&#039;re working on.&lt;br/&gt;&lt;br/&gt;As readers will be aware you configure the context-root URL for your application via the default WAR deployment profile for your ViewController project.  The profile can be accessed by selecting your ViewController project in the Application Navigator, from the right mouse menu selecting Project Properties, then the Deployment tab:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh6.ggpht.com/_5hhNK2aXwp8/SYvent9I5kI/AAAAAAAAAo8/aEUTTjDDqR8/%5BUNSET%5D.jpg?imgmax=800&#039; style=&#039;max-width: 600px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;Selecting the Edit button reveals:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh6.ggpht.com/_5hhNK2aXwp8/SYve1hGUbwI/AAAAAAAAApA/Ioile6C4Y2E/%5BUNSET%5D.jpg?imgmax=800&#039; style=&#039;max-width: 600px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;From here you can select the &quot;Specify Java EE Web Context Root&quot; and enter a custom root of your choosing such as:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh6.ggpht.com/_5hhNK2aXwp8/SYvfIyUr0gI/AAAAAAAAApM/KD0CMBnMgpU/%5BUNSET%5D.jpg?imgmax=800&#039; style=&#039;max-width: 600px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;Note how we&#039;ve also chaned the Enterprise Application Name.  This is necessary to uniquely identify the 3 different deployment profiles if all are deployed to the same application server.&lt;br/&gt;&lt;br/&gt;In order to provide 3 separate context roots, simply return to the Project Properties screen and create 2 additional WAR deployment profiles by selecting the New button.  This will present the Create Deployment Profile dialog where you can configure another WAR with a unique name:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh5.ggpht.com/_5hhNK2aXwp8/SYvfOGqhc_I/AAAAAAAAApQ/FiuwA1whUCk/%5BUNSET%5D.jpg?imgmax=800&#039; style=&#039;max-width: 600px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;From there you modify each WAR deployment profile such that you have unique context roots for each, and you&#039;ll end up with something like this under the deployment profile in the Project Properties:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh4.ggpht.com/_5hhNK2aXwp8/SYvfSmiSqLI/AAAAAAAAApU/H4ZuFQyzPb4/%5BUNSET%5D.jpg?imgmax=800&#039; style=&#039;max-width: 600px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;(Okay, I admit it, my deployment profile names are uninspired, but it&#039;s been a loooooooong week)&lt;br/&gt;&lt;br/&gt;From here the preferred way to deploy Fusion Apps in JDev 11g is to select the default EAR deploy option from the Application Navigator&#039;s Application Menu:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh4.ggpht.com/_5hhNK2aXwp8/SYvfXRP7fFI/AAAAAAAAApY/NVk8TWD-PbM/%5BUNSET%5D.jpg?imgmax=800&#039; style=&#039;max-width: 600px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;However this is configured to use the original ViewConroller WAR deployment profile.  What we really want is 3 EAR deployment profiles at the Application level.&lt;br/&gt;&lt;br/&gt;To view the EAR deployment profiles we select the Application Properties option from the Application Menu above, then the Deployments node:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh6.ggpht.com/_5hhNK2aXwp8/SYvffP1SE9I/AAAAAAAAApc/6O47SIftxC0/%5BUNSET%5D.jpg?imgmax=800&#039; style=&#039;max-width: 600px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;As you can see we have a default EAR deployment profile.  If we select the Edit button and select the Application Assembly node we can see that the EAR deployment profile is configured to use the original WAR deployment profile:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh5.ggpht.com/_5hhNK2aXwp8/SYvfiwNaRuI/AAAAAAAAApg/Dn16IRNaWL0/%5BUNSET%5D.jpg?imgmax=800&#039; style=&#039;max-width: 600px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;As you can guess all we need to do now is create 2 additional separate EAR deployment profiles that use the different ViewController WAR deployment profiles.&lt;br/&gt;&lt;br/&gt;Once we&#039;ve done this and then select the Application Menu&#039;s deploy option we&#039;ll see all three EAR deployment profiles available to deploy to our application server:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh6.ggpht.com/_5hhNK2aXwp8/SYvfm0d7BVI/AAAAAAAAApk/KtIYI9VRdUg/%5BUNSET%5D.jpg?imgmax=800&#039; style=&#039;max-width: 600px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;And once deployed to your application server each separate EAR deployment will use a different URL to access the dev, test and prod applications.&lt;br/&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;http://res1.blogblog.com/tracker/38586079-2986981525980954563?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/VGuV94Bc7T0&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/952416&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Fri, 06 Feb 2009 01:58:00 EST</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/952416</guid>
 <comments>http://chrismuir.sys-con.com/node/952416#feedback</comments>
</item>
<item>
 <title>Configuring a JDev 11g ADF Security app on standalone WLS against MS Active Directory</title>
 <link>http://chrismuir.sys-con.com/node/952415</link>
 <description>&lt;div xmlns=&#039;http://www.w3.org/1999/xhtml&#039;&gt;These notes describe my research and (finally successful) efforts to:&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Build a standalone WebLogic Server (WLS) 10.3 server&lt;/li&gt;&lt;li&gt;Build an ADF Fusion Application using ADF Security&lt;/li&gt;&lt;li&gt;Deploy to a standalone WebLogic Server (WLS) 10.3 server&lt;/li&gt;&lt;li&gt;Configure WLS 10.3 to use MS-Active Directory (MS-AD) for user authentication&lt;/li&gt;&lt;/ul&gt;The following describes the numerous steps to get to this point, mainly for my documentation purposes, but possible useful to readers.  Usual caveat: your mileage may vary.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Build a standalone WebLogic Server (WLS) 10.13 server&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Follow my instructions via my previous post: &lt;a href=&#039;http://one-size-doesnt-fit-all.blogspot.com/2009/01/configuring-weblogic-server.html&#039;&gt;Configuring WebLogic Server Domain/Machine/Server instances with the JDeveloper 11g ADF installer&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;That post was inspired by:Duncan Mill&#039;s &lt;a href=&#039;http://groundside.com/blog/DuncanMills.php?title=a_rough_guide_to&#039;&gt;A Rough Guide To Installing and Setting up WebLogic 10.3 Production for Running ADF Applications&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Configuring JDeveloper&#039;s connection to the WLS server&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;I&#039;ll assume it&#039;s fairly easy for readers to setup a connection in JDeveloper to your standalone WLS server.  Note that the WLS domain option must match the domain you created in the previous section (ie. ADFDomain), and the port number that of the AdminServer (ie. 7001).&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Build an ADF Fusion Application&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;I wont bother to describe creating a basic ADF Fusion Application using ADF BC and ADF Faces RC.  The following screenshot of the Application Navigator shows the basic project files for my sample.  Note the 2 web pages: ViewClients.jspx and ViewClientNames.jspx. &lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh5.ggpht.com/_5hhNK2aXwp8/SW7AIMwygfI/AAAAAAAAAoI/9-E44i9BeoQ/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Configuring your Fusion Application to run with ADF Security&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;A useful link for understanding this section: Frank Nimphius&#039;s &lt;a href=&#039;http://www.oracle.com/technology/products/jdev/tips/fnimphius/adfsec_camt2/ADF%20Security%20Authentication%20and%20Setup.htm&#039;&gt;ADF Security Part 2: Setup and Authentication&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Via the Tools -&amp;gt; Configure ADF Security option invokes the ADF Security wizard.  The following screen shots show the configuration for my application.&lt;br/&gt;&lt;br/&gt;Step 1 of 6 – Enable ADF Security page&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh6.ggpht.com/_5hhNK2aXwp8/SW7A1FGvtII/AAAAAAAAAoM/t1uGqLd3-Hw/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;Step 2 of 6 – Select authentication type page&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh6.ggpht.com/_5hhNK2aXwp8/SW7A6K6DvMI/AAAAAAAAAoQ/JxEuLXEQ1yQ/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;Step 3 of 6 – Select identify store page&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh4.ggpht.com/_5hhNK2aXwp8/SW7A-dVYfFI/AAAAAAAAAoU/QsGTfNoO0no/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;Step 4 of 6 – Enable automatic policy grants page&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh4.ggpht.com/_5hhNK2aXwp8/SW7BCT2Ua1I/AAAAAAAAAoY/J2plhPl93iw/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;Step 5 of 6 – Specify authenticated welcome page&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh5.ggpht.com/_5hhNK2aXwp8/SW7BIIeCJhI/AAAAAAAAAoc/Ismyb6_kOrE/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;Step 6 of 6 – Summary page&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh4.ggpht.com/_5hhNK2aXwp8/SW7BMhdrMoI/AAAAAAAAAog/dHj7IREZC04/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Mapping MS-Active Directory roles against Application Roles&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;A useful link for understanding this section: Andrejus&#039;s Baranovskis&#039;s &lt;a href=&#039;http://andrejusb.blogspot.com/2009/01/practical-adf-security-deployment-on.html&#039;&gt;Practical ADF Security Deployment on WebLogic Server&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Before completing this section you need to:&lt;br/&gt;&lt;br/&gt;1) Think about the roles of your application – say, admin, hr, sales etc&lt;br/&gt;2) Thing about how these will map to your MS-Active Directory (MS-AD) roles&lt;br/&gt;&lt;br/&gt;We&#039;ll refer to #1 as Application Roles, and #2 as Enterprise Roles.&lt;br/&gt;&lt;br/&gt;These could have the same names with a 1 to 1 mapping, or different names, or even a 1 to many mapping.&lt;br/&gt;&lt;br/&gt;For purposes of this post we&#039;ll assume there is a single MS-AD enterprise role Corporate Services that we want to map against our single application role AppCorporateServices.&lt;br/&gt;&lt;br/&gt;As per Andrejus&#039;s post above we configure Enterprise Roles to Application Role mappings in our application&#039;s jazn-data.xml file.  It is accessible via the jazn-data.xml file created by the ADF Security wizard, located in Application Navigator -&amp;gt; Application Resources -&amp;gt; Descriptors -&amp;gt; META-INF -&amp;gt; jazn-data.xml.&lt;br/&gt;&lt;br/&gt;On opening the jazn-data.xml file, select the Overview tab at the bottom of the editor window, then the Manage Users and Roles button top right of the editor.  This invokes the Edit JPS Identity &amp;amp; Policy Store dialog.&lt;br/&gt;&lt;br/&gt;We define our Enterprise Roles under the Identify Store -&amp;gt; jazn.com -&amp;gt; Roles section as follows:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh5.ggpht.com/_5hhNK2aXwp8/SW7Bm9Q3vbI/AAAAAAAAAok/XlxF-W2HNzs/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;We define our Application Roles under the Application Policy Store option.  You&#039;ll first need to create the store, then you define the individual Application Roles as follows:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh5.ggpht.com/_5hhNK2aXwp8/SW7BqgO0-lI/AAAAAAAAAoo/qWhrr7YrTtE/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;Note that under the Member Roles tab we map the Enterprise Role against the Application Role:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh4.ggpht.com/_5hhNK2aXwp8/SW7BvRIcZfI/AAAAAAAAAos/4wTUqvC9rZ4/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Restricting access to web pages through the Application Roles&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;A useful link for understanding this section: Andrejus&#039;s Baranovskis&#039;s &lt;a href=&#039;http://andrejusb.blogspot.com/2009/01/practical-adf-security-deployment-on.html&#039;&gt;Practical ADF Security Deployment on WebLogic Server&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Returning to the jazn-data.xml file&#039;s Overview tab, and selecting the Web Pages option, add the Application Role with View privileges against the ViewClientNames page:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh6.ggpht.com/_5hhNK2aXwp8/SW7B6JZ_FmI/AAAAAAAAAow/B9JVJVMQ4lE/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;Note that Andrejus&#039;s post goes on to tell you about configuring the weblogic.xml file.  This should have been done by default via the ADF Security wizard.&lt;br/&gt;&lt;b&gt;&lt;br/&gt;Deploying the app to a standalone WebLogic Server&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Assuming you&#039;ve created a connection to your standalone WLS server in JDeveloper and the WLS server is up and running, select the Application Navigator -&amp;gt; Application Menu (top right drop down) -&amp;gt; Deploy -&amp;gt; To -&amp;gt; (your connection name).&lt;br/&gt;&lt;br/&gt;During the deployment you&#039;ll see the following dialog offering you which server to deploy to, I&#039;ll assume you&#039;ve setup 2 servers, so deploy to ADFServer:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh6.ggpht.com/_5hhNK2aXwp8/SW7CA8T83iI/AAAAAAAAAo0/cgKJU13UOR8/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;Wait for a successful deployment.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Post deployment steps&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Useful links in understanding this section:&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Steve Muench&#039;s &lt;a href=&#039;http://www.oracle.com/technology/products/jdev/tips/muench/credmig111100/index.html&#039;&gt;Simplified ADF 11g Application Credential and Policy Migration to Standalone WebLogic Servers&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Andrejus&#039;s Baranovskis&#039;s &lt;a href=&#039;http://andrejusb.blogspot.com/2009/01/practical-adf-security-deployment-on.html&#039;&gt;Practical ADF Security Deployment on WebLogic Server&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;As per Steve&#039;s article, as of JDev 11g build 5188 the JDeveloper deployment tools doesn&#039;t migrate your application&#039;s security completely to WLS.  As such you need to follow these further steps:&lt;br/&gt;&lt;br/&gt;Follow Steve&#039;s steps 1, 2 and 3 on the WLS server.&lt;br/&gt;&lt;br/&gt;Copy your application code to a directory accessible via the standalone WLS server.&lt;br/&gt;&lt;br/&gt;Assuming you&#039;ve configured the app with a database connection and jazn-data.xml entries, follow his step 3.4.  Note that:&lt;br/&gt;&lt;ul&gt;&lt;li&gt;The APPWORKSPACEDIR is where you copied the application code to in the previous step&lt;/li&gt;&lt;li&gt;The APPNAME is configured in JDeveloper as your Application name (ie. TestStandaloneWLSSecurity)&lt;/li&gt;&lt;li&gt;The DEPLOYAPPNAME is configured in JDev under Application Properties -&amp;gt; Deployment -&amp;gt; Edit -&amp;gt; General -&amp;gt; Application Name, and will be the enterprise application when the application is deployed to WLS (ie. TestStandaloneWLSSecurity_application1)&lt;/li&gt;&lt;/ul&gt;On your WLS server locate the file system-jazn-data.xml.  It&#039;s typically located under (WLS_HOME)\user_projects\domains\(your domain name)\config\oracle.&lt;br/&gt;&lt;br/&gt;Follow Steve&#039;s step 3.5.  For the record I usually only have an instance of JpsXmlEnterpriseRoleImpl to replace, not JpsXmlUserImpl.&lt;br/&gt;&lt;br/&gt;Restart the WLS server&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Testing before configuring for MS-Active Directory&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;At this stage before configuring WLS to use MS-Active Directory for authentication, it&#039;s worth checking that your deployed application is correctly deployed and configured to use security.  As such we&#039;ll create a temporary role and user account to test access to our webpages.&lt;br/&gt;&lt;br/&gt;Login to the WLS console.&lt;br/&gt;&lt;br/&gt;Navigate to Security Realms -&amp;gt; myrealm -&amp;gt; User and Groups tab -&amp;gt; Groups, and create a group called Corporate Services.&lt;br/&gt;&lt;br/&gt;&lt;img height=&#039;512&#039; width=&#039;676&#039; src=&#039;http://lh4.ggpht.com/_5hhNK2aXwp8/SW7CqgnDmQI/AAAAAAAAAo4/-9Ih8mw5jw4/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039; title=&#039;&#039; alt=&#039;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;Create 2 users test1 and test2.  Allocate user test1 to the new Corporate Services group.&lt;br/&gt;&lt;br/&gt;As such, because test1 has the Corporate Services enterprise role, mapped to the AppCorporateServices application role, that grants access to the ViewClientNames page, only user test1 should be able to access that page.&lt;br/&gt;&lt;br/&gt;On attempting to access the ViewClientNames page as test2 you should get a 403 forbidden if you logged in successfully.&lt;br/&gt;&lt;br/&gt;On attempting to access the same page as test1, it should correctly show.&lt;br/&gt;&lt;br/&gt;On attempting to access the ViewClients page, as either authenticated user, neither have access so you should get a 403 forbidden response.&lt;br/&gt;&lt;br/&gt;Remove the test users and test group.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Configuring MS-Active Directory on your standalone WLS&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Follow my instructions via my previous post: &lt;a href=&#039;http://one-size-doesnt-fit-all.blogspot.com/2008/12/configuring-wls-with-ms-active.html&#039;&gt;Configuring WLS With MS Active Directory&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Other useful posts to aid understanding of configuring WLS authentication providers:&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Frank Nimphius&#039;s &lt;a href=&#039;http://www.oracle.com/technology/products/jdev/tips/fnimphius/oidconfig/index.html&#039;&gt;How-to configure OID for authentication in WebLogic Server&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Edwin Biemond&#039;s &lt;a href=&#039;http://biemond.blogspot.com/2008/10/using-openldap-as-security-provider-in.html&#039;&gt;Using OpenLDAP as security provider in WebLogic&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Note as per the following &lt;a href=&#039;http://forums.oracle.com/forums/thread.jspa?threadID=846813&amp;amp;tstart=0&#039;&gt;OTN post&lt;/a&gt; it is important to reorder the authenticators such that the AD authenticator comes first in the list, and it&#039;s control flag is set = SUFFICIENT.&lt;br/&gt;&lt;br/&gt;At this point you should have everything in place.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Post note&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;Thanks to all parties above, in particular Andrejus, Frank, Steve and Edwin, who either posted blog entries or forums posts as well as talking to me offline, your assistance in getting this together is appreciated.&lt;br/&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;http://res1.blogblog.com/tracker/38586079-1451986938319686075?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/7SO4BQefAPo&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/952415&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Thu, 15 Jan 2009 00:05:00 EST</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/952415</guid>
 <comments>http://chrismuir.sys-con.com/node/952415#feedback</comments>
</item>
<item>
 <title>Q&amp;A with Grant Ronald - UKOUG Oracle Scene mag Winter 2008</title>
 <link>http://chrismuir.sys-con.com/node/952414</link>
 <description>&lt;div xmlns=&#039;http://www.w3.org/1999/xhtml&#039;&gt;For those readers who are members of the &lt;a href=&#039;http://www.ukoug.org/&#039;&gt;UKOUG&lt;/a&gt;, check out in your Winter 2008 (Issue 36) edition of the UKOUG &lt;a href=&#039;http://www.ukoug.org/publications/index.jsp?parent=0&amp;amp;id=1&#039;&gt;Oracle Scene&lt;/a&gt; mag the article &quot;Q&amp;amp;A with Grant Ronald&quot;.  Grant was kind enough to have a chat to me about all things Forms &amp;amp; JDeveloper related.&lt;br/&gt;&lt;br/&gt;The article blurb:&lt;br/&gt;&lt;br/&gt;When talking about Oracle Forms and JDeveloper, one Oracle personality stands out among others - long time blogger Grant Ronald from Oracle Corporation UK.  Grant has for a long time &quot;pimped&quot; Oracle Forms and its big brother JDeveloper at Oracle events and user group events around the world.  His popularity is shown by his blog receiving on average 2000 hits per day.  Lately, to reassure Oracle customers that Oracle intends to keep on supporting Oracle Forms and show that Forms has a future inline with JDeveloper, Grant has been responsible for the Oracle&#039;s Forms Modernization message.&lt;br/&gt;&lt;br/&gt;... hopefully you&#039;re a member of the UKOUG and can check this article out.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;http://res1.blogblog.com/tracker/38586079-8843550673850897708?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/xhfw4pC_Nfs&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/952414&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Wed, 14 Jan 2009 19:06:00 EST</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/952414</guid>
 <comments>http://chrismuir.sys-con.com/node/952414#feedback</comments>
</item>
<item>
 <title>JAX-WS Provider API based endpoints in JDev 11g</title>
 <link>http://chrismuir.sys-con.com/node/952413</link>
 <description>&lt;div xmlns=&#039;http://www.w3.org/1999/xhtml&#039;&gt;This post constitutes my notes on implementing JAX-WS Provider APIs for web service endpoints in JDeveloper 11g.  Usual caveat: your mileage may vary.  In particular I may have screwed up the terminology, so please do your own reading to back up my findings.&lt;br/&gt;&lt;br/&gt;My understanding is JDeveloper 11g has no inherit GUI facilities that support the JAX-WS Provider API, the JDev productivity features focus on the Service Endpoint Interface (SEI) JAX-WS approach, which is probably fine for 99% of the JAX-WS implementations.&lt;br/&gt;&lt;br/&gt;As readers know the standard JAX-WS solution inheritly uses the JAXB XML binding style.  My understanding is JAXB binding is ideal in most uses of JAX-WS, particularly for small well defined XML payloads.  However for an upcoming project we&#039;re not sure of the size of our incoming payloads (we may have to use XBRL) so I wanted to explore other options over JAXB.  If you have a large and variable XML payload structure JAXB may be less than ideal thanks to the Java object structures JAXB creates, which at design time can be (dependent on your web service XML payload) large and complex to maintain, and at runtime possibly a large memory footprint.  The JAX-WS Provider API instead allows alternative binding styles such as DOM, SAX or StAX that have different advantages and disadvantages in parsing XML documents and retrieving results, which may be more suitable depending on your defined web services XML payload structures.&lt;br/&gt;&lt;br/&gt;The following example demonstrates creating a Provider endpoint through JAX-WS in JDeveloper 11g.  The steps assume a JDeveloper 11g application &quot;JaxWsProviderExample&quot; based on the Generic Application template, and a single project &quot;ProviderProject&quot; with no project technologies initially.&lt;br/&gt;&lt;br/&gt;1. Via the ProviderProject project properties, select Libraries and Classpath, and add the JAX-WS RI Web Services library:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh6.ggpht.com/_5hhNK2aXwp8/SWv3Xm9QUAI/AAAAAAAAAmw/oX5zdthCpeY/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;2. For your web service define the XML schema with the incoming and outgoing payloads.  Create the XML schema in the project subdirectory &lt;font face=&#039;Courier New&#039;&gt;/public_html/WEB-INF/wsdl&lt;/font&gt;.  In this example the XML schema is named &lt;font face=&#039;Courier New&#039;&gt;sage.xsd&lt;/font&gt;:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh6.ggpht.com/_5hhNK2aXwp8/SWv4tHNaELI/AAAAAAAAAm4/Q4VHJIr_RzU/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;The demonstrated XML schema in this example is nothing spectacular, just an incoming payload called Event demonstrating an embedded complexType BookingType, and a simple outgoing string payload named Response.&lt;br/&gt;&lt;br/&gt;3. Create a WSDL for the web service and place it in the same &lt;font face=&#039;Courier New&#039;&gt;/public_html/WEB-INF/wsdl&lt;/font&gt; subdirectory.&lt;br/&gt;&lt;br/&gt;Refer to this previous &lt;a href=&#039;http://one-size-doesnt-fit-all.blogspot.com/2008/11/creating-jax-ws-web-services-via-wsdl.html&#039;&gt;blog&lt;/a&gt; entry for creating a WSDL step by step with JDeveloper 11g&#039;s GUI WSDL builder.  In addition check out the following &lt;a href=&#039;http://www.oracle.com/technology/products/jdev/viewlets/viewlet.html&#039;&gt;viewlet&lt;/a&gt; from Oracle that not only shows you creating the WSDL via the JDev 11g builder, but uses drag n drop, and generates a JAX-WS SEI implementation with little hassle.&lt;br/&gt;&lt;br/&gt;In this example the WSDL is named &lt;font face=&#039;Courier New&#039;&gt;sageWsdl.wsdl&lt;/font&gt;:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh3.ggpht.com/_5hhNK2aXwp8/SWwBSY0t1xI/AAAAAAAAAm8/fUvU0jIak0M/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;Note from this WSDL example we&#039;re using SOAP v1.2.  Please, no laughing at my sophisticated service/port/porttype/message names! ;-)&lt;br/&gt;&lt;br/&gt;4. Create our Java implementation of the Provider API.  In the following example I&#039;ve created a class &lt;font face=&#039;Courier New&#039;&gt;au.com.sagecomputing.ProviderImpl&lt;/font&gt;:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh4.ggpht.com/_5hhNK2aXwp8/SWwD-t7N6PI/AAAAAAAAAnI/mTWtvPaoh18/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;Note:&lt;br/&gt;&lt;ul&gt;&lt;li&gt;The &lt;font face=&#039;Courier New&#039;&gt;getXMLFromSource&lt;/font&gt; method is not pivotal to this example (credit to Rahul Biswas for the source)&lt;br/&gt;&lt;/li&gt;&lt;li&gt;The &lt;font face=&#039;Courier New&#039;&gt;@WebServiceProvider&lt;/font&gt; annotation maps back to port/service/namespace names in WSDL.&lt;/li&gt;&lt;li&gt;The &lt;font face=&#039;Courier New&#039;&gt;@BindingType&lt;/font&gt; annotation is only necessary as we&#039;re using SOAP v1.2.  If you forget this line and you&#039;ve specified SOAP v1.2 in your WSDL you&#039;ll receive a runtime exception about the wrong content-type header as follows (solution documented &lt;a href=&#039;https://metro.dev.java.net/1.4/docs/soap12.html&#039;&gt;here&lt;/a&gt;):&lt;/li&gt;&lt;/ul&gt;&lt;font face=&#039;Courier New&#039;&gt;SEVERE: Unsupported Content-Type: application/soap+xml; charset=UTF-8 Supported ones are: [text/xml]&lt;br/&gt;com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: application/soap+xml; charset=UTF-8 Supported ones are: [text/xml]&lt;/font&gt;&lt;br/&gt;&lt;ul&gt;&lt;li&gt;Regardless of the number of operations defined in the WSDL, all will be passed to the chokepoint &lt;font face=&#039;Courier New&#039;&gt;invoke&lt;/font&gt; method.  This means you need to interpret the incoming request using whichever binding style you&#039;ve chosen (in this example &lt;font face=&#039;Courier New&#039;&gt;javax.xml.transform.Source&lt;/font&gt;) and determine which operation the XML payload represents.&lt;/li&gt;&lt;/ul&gt;5. You&#039;ll note on creating the above class the &lt;font face=&#039;Courier New&#039;&gt;@WebServiceProvider&lt;/font&gt; line will have a lightbulb code-insight hint in the JDeveloper Java editor.  Select the lightbulb and then select the single option to configure the &lt;font face=&#039;Courier New&#039;&gt;web.xml&lt;/font&gt; file for your project.  This will result in a &lt;font face=&#039;Courier New&#039;&gt;web.xml&lt;/font&gt; file as follows:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh6.ggpht.com/_5hhNK2aXwp8/SWwFqy0CecI/AAAAAAAAAnQ/TJWm1W2-n9s/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;  &lt;br/&gt;&lt;br/&gt;6. The JAX-WS RI implementation requires the file &lt;font face=&#039;Courier New&#039;&gt;sun-jaxws.xml&lt;/font&gt; in your &lt;font face=&#039;Courier New&#039;&gt;/public_html&lt;/font&gt; directory.  Create this file; example content based on the implementation shown in this post is as follows:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh5.ggpht.com/_5hhNK2aXwp8/SWwEh5DVn8I/AAAAAAAAAnM/YQfgt6ebFnE/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;A handy reference for the &lt;font face=&#039;Courier New&#039;&gt;sun-jaxws.xml&lt;/font&gt; file can be found &lt;a href=&#039;http://java.sun.com/webservices/docs/2.0/jaxws/jaxws-war.html&#039;&gt;here&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;By careful to ensure the port &lt;font face=&#039;Courier New&#039;&gt;name&lt;/font&gt; and &lt;font face=&#039;Courier New&#039;&gt;url-pattern&lt;/font&gt; attributes match those specified in your WSDL and &lt;font face=&#039;Courier New&#039;&gt;web.xml&lt;/font&gt; files respectively.&lt;br/&gt;&lt;br/&gt;7. At the end of the above 6 steps you&#039;re application should look as follows:&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh6.ggpht.com/_5hhNK2aXwp8/SWwKA9sydQI/AAAAAAAAAnU/JDCmZ_yFTnY/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;8. Running the &lt;font face=&#039;Courier New&#039;&gt;ProviderImpl&lt;/font&gt; via the JDeveloper web service tester tool (right click the &lt;font face=&#039;Courier New&#039;&gt;ProviderImpl.java&lt;/font&gt;, select Test Web Service) shows the following results:&lt;br/&gt;&lt;br/&gt;(Yes Gerard, I&#039;m back to using HTTP Analyzer, not SoapUI! ;-)&lt;br/&gt;&lt;br/&gt;&lt;img src=&#039;http://lh4.ggpht.com/_5hhNK2aXwp8/SWwORkIxMhI/AAAAAAAAAnc/s3e9JusCm_I/%5BUNSET%5D.png?imgmax=800&#039; style=&#039;max-width: 800px;&#039;/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&#039;1&#039; height=&#039;1&#039; src=&#039;http://res1.blogblog.com/tracker/38586079-3830742212264169060?l=one-size-doesnt-fit-all.blogspot.com&#039;/&gt;&lt;/div&gt;&lt;img src=&quot;http://feeds2.feedburner.com/~r/OneSizeDoesntFitAll/~4/tkAwAKkvhKk&quot; height=&quot;1&quot; width=&quot;1&quot;/&gt;&lt;p&gt;&lt;a href=&quot;http://chrismuir.sys-con.com/node/952413&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Mon, 12 Jan 2009 22:45:00 EST</pubDate>
 <guid isPermaLink="true">http://chrismuir.sys-con.com/node/952413</guid>
 <comments>http://chrismuir.sys-con.com/node/952413#feedback</comments>
</item>
</channel>
</rss>
