<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;C0YHSXk7cCp7ImA9WhRUFUQ.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047</id><updated>2012-01-26T16:18:58.708+01:00</updated><category term="Adobe Flex LifeCycle" /><category term="Oracle Service Bus" /><category term="Adobe Flex" /><category term="AS" /><category term="jsf" /><category term="MySQL" /><category term="java" /><category term="jdeveloper 11gR2" /><category term="jdeveloper 11g soa suite" /><category term="SCA" /><category term="AIA" /><category term="jdeveloper 11g webcenter" /><category term="Tuscany" /><category term="hudson" /><category term="Coherence" /><category term="web services" /><category term="SOA" /><category term="WebLogic" /><category term="SAML" /><category term="Metro (WSIT)" /><category term="adf" /><category term="Exadel Fiji" /><category term="RubyAMF" /><category term="OWSM" /><category term="jdeveloper 10.1.3" /><category term="XQuery" /><category term="android" /><category term="jheadstart" /><category term="OEPE" /><category term="Skinning" /><category term="ldap" /><category term="Axis" /><category term="Siebel" /><category term="Maven" /><category term="EclipseLink" /><category term="adf bc (bc4j)" /><category term="WLST" /><category term="Adobe Flex Blazeds" /><category term="adf excel gui" /><category term="adf security" /><category term="Ruby on Rails" /><category term="jms" /><category term="EDN" /><category term="MDS" /><category term="adf taskflow" /><category term="jdeveloper 11g" /><title>Java / Oracle SOA blog</title><subtitle type="html">About Java, Adobe Flex, Oracle JDeveloper, JHeadstart and Oracle SOA suite</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://biemond.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>277</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/Java/OracleSoaBlog" /><feedburner:info uri="java/oraclesoablog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>52.259167</geo:lat><geo:long>5.606944</geo:long><feedburner:emailServiceId>Java/OracleSoaBlog</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;DUMMSX4-fip7ImA9WhRWFEg.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-3992149864510069053</id><published>2012-01-01T18:18:00.000+01:00</published><updated>2012-01-01T23:38:08.056+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-01T23:38:08.056+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WebLogic" /><category scheme="http://www.blogger.com/atom/ns#" term="OEPE" /><category scheme="http://www.blogger.com/atom/ns#" term="jsf" /><title>JSF 2.0 Managed Bean Annotations and CDI on WebLogic 12c</title><content type="html">WebLogic 12c now supports Java 6 so we can now try out the JSF 2.0 Managed Bean annotations together with CDI JSR-299.&amp;nbsp;In this blogpost&amp;nbsp;I will use OEPE 12c as my IDE and deploy everything on WebLogic 12c. Off course I will tell you my experiences to get all this working in Eclipse and WebLogic 12c.&lt;br /&gt;
&lt;br /&gt;
First let's start with the JSF 2.0 Managed Bean Annotations.&lt;br /&gt;
&lt;br /&gt;
We need to remove the managed bean&amp;nbsp;definitions&amp;nbsp;from the faces-config.xml file. Then make sure that you don't use the  metadata-complete attribute ( metadata-complete="true" ) on the faces-config element, this will disable the search for JSF Managed Beans.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-Yo7S2-Wh01k/TwCP7jPRwFI/AAAAAAAAEq8/E-v5BMVpVmw/s1600/cdi_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="291" src="http://3.bp.blogspot.com/-Yo7S2-Wh01k/TwCP7jPRwFI/AAAAAAAAEq8/E-v5BMVpVmw/s640/cdi_1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Then we can add the JSF Managed Bean annotations to the java class. We can use @ManagedBean ( javax.faces.bean ) together with the right scope annotation like RequestScoped, SessionScoped or ViewScoped ( CDI does not have this View Scope ). You will see this bean in the Faces Configuration View.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-ApB14E_GgVc/TwCP8PPz1KI/AAAAAAAAErE/1X2k4jySNRY/s1600/cdi_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="315" src="http://2.bp.blogspot.com/-ApB14E_GgVc/TwCP8PPz1KI/AAAAAAAAErE/1X2k4jySNRY/s400/cdi_2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Next part of this blog is about CDI, this will be more tricky, it is possible but does not work so well in OEPE and WebLogic. I didn't have these problems with the same OEPE, Code and using Glassfish 3.11.&lt;br /&gt;
&lt;br /&gt;
So to enable CDI we need to add a beans.xml file to the WEB-INF folder. Like this with a empty beans element, this will trigger CDI.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-MaIBKn6I8QE/TwDUgtkyWYI/AAAAAAAAErQ/otTgXVBFmEY/s1600/cdi_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="90" src="http://3.bp.blogspot.com/-MaIBKn6I8QE/TwDUgtkyWYI/AAAAAAAAErQ/otTgXVBFmEY/s640/cdi_3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
When we try to run the JSF application again then you probably will hit this NPE in the jboss Weld framework.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;javax.enterprise.resource.webcontainer.jsf.renderkit&amp;gt; &amp;lt;BEA-000000&amp;gt; &amp;lt;javax.faces.FacesException&lt;br /&gt;
javax.faces.FacesException&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;at com.sun.faces.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:142)&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;at org.apache.myfaces.extensions.validator.core.startup.ExtValLifecycleWrapper.render(ExtValLifecycleWrapper.java:79)&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Truncated. see log file for complete stacktrace&lt;br /&gt;
Caused By:&lt;span style="color: #cc0000;"&gt; java.lang.NullPointerException&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;at org.jboss.weld.el.ELCreationalContextStack.getCreationalContextStore(ELCreationalContextStack.java:33)&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;at &lt;span style="color: #cc0000;"&gt;org.jboss.weld.el.WeldValueExpression.getValue&lt;/span&gt;(WeldValueExpression.java:47)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The solution is to remove the JSP entries and rename your files from jspx to xhtml.&lt;/div&gt;
&lt;div&gt;
From this.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;lt;?xml version="1.0" encoding="iso-8859-1"?&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xmlns:f="http://java.sun.com/jsf/core"&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xmlns:h="http://java.sun.com/jsf/html"&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xmlns:trh="http://myfaces.apache.org/trinidad/html"&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xmlns:tr="http://myfaces.apache.org/trinidad"&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;jsp:directive.page contentType="text/html;charset=utf-8"/&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;f:view&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;tr:document title="Bean and ExtVal validation"&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;tr:form&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To this, where we define the used jsf namespaces on the html element.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-9FBL8QUliFo/TwDW6YIxWAI/AAAAAAAAErc/T_sgH_W1gY8/s1600/cdi_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="324" src="http://4.bp.blogspot.com/-9FBL8QUliFo/TwDW6YIxWAI/AAAAAAAAErc/T_sgH_W1gY8/s640/cdi_4.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Next we can try to create a new managed bean where we will use the Named annotation together with the SessionScoped annotation of javax.enterprise.context&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-ySfPeGEtH5k/TwDW7ARluHI/AAAAAAAAErg/hu6WHsFuIeA/s1600/cdi_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="571" src="http://4.bp.blogspot.com/-ySfPeGEtH5k/TwDW7ARluHI/AAAAAAAAErg/hu6WHsFuIeA/s640/cdi_5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We can also inject an EJB or a Managed Bean with the Inject annotation.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-8p18XNMGVK4/TwDYVY3U3ZI/AAAAAAAAErw/H1chVG25Iss/s1600/cdi_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="516" src="http://3.bp.blogspot.com/-8p18XNMGVK4/TwDYVY3U3ZI/AAAAAAAAErw/H1chVG25Iss/s640/cdi_6.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I can also replace @EJB with @Inject but then I should move my EJBs to my Dynamic Web Project else I will get an Weld error. &amp;nbsp;Probably with OEPE you have an different JPA project and this ejb.jar will be deployed together with the WAR in an EAR.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
I didn't test this but you need to enable CDI on this ejb project or EAR.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
That's not all you also need to change the WebLogic Publishing mode of OEPE. This should be &lt;b&gt;Publish as an exploded archive&lt;/b&gt; else Inject won't work. ( Thanks to Steve Button for the tip. ).&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-EAp_8J6F-Oo/TwDaVxdoi6I/AAAAAAAAEr8/88vErYS1gVI/s1600/cdi_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="370" src="http://4.bp.blogspot.com/-EAp_8J6F-Oo/TwDaVxdoi6I/AAAAAAAAEr8/88vErYS1gVI/s640/cdi_7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This is the error I got&amp;nbsp;WELD-001408 Unsatisfied dependencies for type [DataBeanCDI] with qualifiers [@Default] at injection point [[field] @Inject private nl.amis.web.beans.DataBean.dataBeanCDI]&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
And now the most annoying bug, the CDI managed beans will work only once on WebLogic 12c. When you deploy or run your application the second time then the CDI Managed bean can't be found. The solution is you need to restart the WebLogic Server. This makes development with CDI almost impossible.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In Glassfish 3.11 I didn't have all these problems so I hope Oracle will update OEPE &amp;amp; WebLogic 12c very soon.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here you can find my example code.&lt;/div&gt;
&lt;div&gt;
&lt;a href="https://github.com/biemond/OEPE_examples/tree/master/cdi_jsf2_managedbeans"&gt;https://github.com/biemond/OEPE_examples/tree/master/cdi_jsf2_managedbeans&lt;/a&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-3992149864510069053?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/3992149864510069053/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=3992149864510069053" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/3992149864510069053?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/3992149864510069053?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/YVrOrgW0HZ8/jsf-20-managed-bean-annotations-and-cdi.html" title="JSF 2.0 Managed Bean Annotations and CDI on WebLogic 12c" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-Yo7S2-Wh01k/TwCP7jPRwFI/AAAAAAAAEq8/E-v5BMVpVmw/s72-c/cdi_1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://biemond.blogspot.com/2012/01/jsf-20-managed-bean-annotations-and-cdi.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUMGR3g7fip7ImA9WhRWEEw.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-3182062491965087296</id><published>2011-12-27T21:23:00.003+01:00</published><updated>2011-12-27T21:23:46.606+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-27T21:23:46.606+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WebLogic" /><category scheme="http://www.blogger.com/atom/ns#" term="EclipseLink" /><category scheme="http://www.blogger.com/atom/ns#" term="jsf" /><title>Using Bean Validation together with ExtVal in JPA and JSF</title><content type="html">With the release of WebLogic 12c we can finally try out the native support for Bean Validation ( JSR-303) in JPA &amp;amp; JSF. With JSR-303 we can use this validation framework on the back-end side ( EJB Session Bean ) and on the managed bean of the JSF Web applications, so one framework which can do it all. It will save us a lot of time in making business rules and no need for validators on our JSF UI Components.&lt;br /&gt;
To make this even better I will combine this with &lt;a href="http://myfaces.apache.org/extensions/validator/"&gt;Apache MyFaces Extensions Validator&lt;/a&gt;. This framework can be used with JSF ( there is a generic library and a special one for Trinidad ) and its supports the Bean Validation. ExtVal also has some &lt;a href="https://cwiki.apache.org/confluence/display/EXTVAL/Index"&gt;extra features&lt;/a&gt;.&lt;br /&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Type-safe group validation&lt;/li&gt;
&lt;li&gt;Model validation&lt;/li&gt;
&lt;li&gt;Severity aware validation&lt;/li&gt;
&lt;li&gt;Client-side validation&lt;/li&gt;
&lt;li&gt;Sorted violation messages&lt;/li&gt;
&lt;li&gt;Dependency injection support for constraint validators&lt;/li&gt;
&lt;li&gt;Mapped constraint source (e.g. for using DTO's with BV)&lt;/li&gt;
&lt;li&gt;Support of @Valid&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
In this blog I won't give you all the possible validations options you can have in the Bean Validation or in ExtVal framework but I will try to give you a jumpstart, how to setup this up and get everything working.&lt;br /&gt;
&lt;br /&gt;
Before I start I got this working with WebLogic 12c and use OEPE 12c as my IDE. For the JSF part I use &lt;a href="http://myfaces.apache.org/trinidad/"&gt;Apache MyFaces Trinidad 2.0.0&lt;/a&gt; which support JSF 2.0.&lt;br /&gt;
&lt;br /&gt;
Let's start with the JPA part.&lt;br /&gt;
&lt;br /&gt;
Here I have created a department entity which is based on the department table of the HR demo schema in the Oracle database.&lt;br /&gt;
&lt;br /&gt;
On the departmentName attribute I added some validation annotations like NotNull , Size and Pattern.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-J0kH1zS1Fl4/TvoTRYBUcTI/AAAAAAAAEoM/ExAzvoye_uM/s1600/beanval_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="442" src="http://3.bp.blogspot.com/-J0kH1zS1Fl4/TvoTRYBUcTI/AAAAAAAAEoM/ExAzvoye_uM/s640/beanval_1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
On the Pattern annotation I added a custom resource bundle message ( use {} ), I only do it for pattern annotation because Size or NotNull will have it's own default message in JSF.&lt;br /&gt;
&lt;br /&gt;
Bean validation is the default now so we would see the Eclipselink error anymore. So when we try to persist an entity which violates these annotations we get an error like this.&lt;br /&gt;
&lt;br /&gt;
With a javax.validation.ConstraintViolationException on a prePersist callback event. This error won't give you a lot of information about the error.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-rgYpJszt7hQ/TvoWpiiR0nI/AAAAAAAAEoY/E59sgjYvRdk/s1600/beanval_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="92" src="http://4.bp.blogspot.com/-rgYpJszt7hQ/TvoWpiiR0nI/AAAAAAAAEoY/E59sgjYvRdk/s640/beanval_2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
You got the option to disable the Bean Validation in Eclipselink by setting the validation-mode to NONE. This way you will get the constraint error.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-lda4vwxLwzI/TvoWqw2dSjI/AAAAAAAAEok/zW2uIioBA_4/s1600/beanval_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="254" src="http://1.bp.blogspot.com/-lda4vwxLwzI/TvoWqw2dSjI/AAAAAAAAEok/zW2uIioBA_4/s640/beanval_4.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Like this.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-jq3AsTt0eDM/TvoWqWyd8EI/AAAAAAAAEog/DsaSXN75JbY/s1600/beanval_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="68" src="http://2.bp.blogspot.com/-jq3AsTt0eDM/TvoWqWyd8EI/AAAAAAAAEog/DsaSXN75JbY/s640/beanval_3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
So how we can retrieve these&amp;nbsp;validations&amp;nbsp;errors. For example I can do this on the client side before I invoke the EJB Session bean or do it inside the Session Facade methods.&lt;br /&gt;
&lt;br /&gt;
We need to use the resource annotation to retrieve the Validator.&lt;br /&gt;
(@Resource Validator validator; )&lt;br /&gt;
In the department persist we can pass on the department entity to the validatior.&lt;br /&gt;
Set&amp;lt;ConstraintViolation&amp;lt;Department&amp;gt;&amp;gt; violations = validator.validate(department);&lt;br /&gt;
And loop through the violations with this as result.&lt;br /&gt;
&lt;br /&gt;
error size: 2&lt;br /&gt;
invalid value for: 'departmentName': Name must between 2 and 30 characters&lt;br /&gt;
invalid value for: 'departmentName': {departmentNameValidation}&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1524853.js?file=HrSessionBean.java"&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we can go the JSF part.&lt;br /&gt;
Here I do the same but then from a managed bean which is called from a commandButton.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1524868.js?file=validation.java"&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
I changed the violations to Faces Messages and skip the persist part.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-O8tUc0-92A4/TvodCzCPTBI/AAAAAAAAEo0/XimZyzX9-oY/s1600/beanval_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="224" src="http://1.bp.blogspot.com/-O8tUc0-92A4/TvodCzCPTBI/AAAAAAAAEo0/XimZyzX9-oY/s640/beanval_5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
This is all standard Bean Validation stuff so let's check out the ExtVal part.&lt;br /&gt;
&lt;br /&gt;
I added the following libraries to the lib folder of the WEB-INF&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-rgaN1oAOoV8/TvoeUM9vTdI/AAAAAAAAEpA/jqjXhhfnSHY/s1600/beanval_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-rgaN1oAOoV8/TvoeUM9vTdI/AAAAAAAAEpA/jqjXhhfnSHY/s320/beanval_6.png" width="268" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The jsr303-tck and the validation-api jars are from &lt;a href="http://www.hibernate.org/subprojects/validator.html"&gt;Hibernate Validator&lt;/a&gt; and the rest is from &lt;a href="http://myfaces.apache.org/extensions/validator/"&gt;MyFaces ExtVal&lt;/a&gt;. Where I remove the myfaces-extval-generic-support-2.0.5.jar because I could use the trinidad one.&lt;br /&gt;
&lt;br /&gt;
To test the validation I made a simple JSF Trinidad page where you can see there are no validator or convertors defined.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1524939.js?file=main.jsp"&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
In the Trinidad table I show all the departments and change for example the department Name to 1 char which violates the Size annotation.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-BllZCIFNDHQ/TvoiEacjwNI/AAAAAAAAEpM/dWV8wFHlhXY/s1600/beanval_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="356" src="http://3.bp.blogspot.com/-BllZCIFNDHQ/TvoiEacjwNI/AAAAAAAAEpM/dWV8wFHlhXY/s640/beanval_7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
When I use invalid characters for the department Name then I get the resource bundle message.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-FsSIOA4rI2w/TvoiE5QfUSI/AAAAAAAAEpU/bwOp7tiK3vM/s1600/beanval_8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-FsSIOA4rI2w/TvoiE5QfUSI/AAAAAAAAEpU/bwOp7tiK3vM/s640/beanval_8.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
To make this resourcebundle work I need to set a context parameter in the web.xml which points to our own resourcebundle.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;context-param&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;param-name&amp;gt;org.apache.myfaces.extensions.validator.CUSTOM_MESSAGE_BUNDLE&amp;lt;/param-name&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;param-value&amp;gt;resources.application&amp;lt;/param-value&amp;gt;&lt;br /&gt;
&amp;lt;/context-param&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last part is to show you the ExtVal part. I used this managed bean which are used in the JSF page.&lt;br /&gt;
&lt;script src="https://gist.github.com/1524982.js?file=DataBean.java"&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
departmentName use the Bean Validation framework and&amp;nbsp;departmentLocation use the ExtVal framework.&lt;br /&gt;
With this as result.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-gqsddrjaXEU/TvomMjTazPI/AAAAAAAAEpg/veSJk5-Fc3k/s1600/beanval_9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="190" src="http://3.bp.blogspot.com/-gqsddrjaXEU/TvomMjTazPI/AAAAAAAAEpg/veSJk5-Fc3k/s640/beanval_9.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
When you want to know more about ExtVal or Bean Validation you definitely should read &lt;a href="https://www.packtpub.com/sites/default/files/sample_chapters/3254_Apache%20MyFaces_SampleChapter.pdf"&gt;this example chapter of Bart Kummel's Book&lt;/a&gt; about MyFaces Development.&lt;br /&gt;
&lt;br /&gt;
Here is the example project on github.&amp;nbsp;&lt;a href="https://github.com/biemond/OEPE_examples/tree/master/beanValidation"&gt;https://github.com/biemond/OEPE_examples/tree/master/beanValidation&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-3182062491965087296?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/3182062491965087296/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=3182062491965087296" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/3182062491965087296?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/3182062491965087296?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/Y7fyc3ian4k/using-bean-validation-together-with.html" title="Using Bean Validation together with ExtVal in JPA and JSF" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-J0kH1zS1Fl4/TvoTRYBUcTI/AAAAAAAAEoM/ExAzvoye_uM/s72-c/beanval_1.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/12/using-bean-validation-together-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEGQXg4eip7ImA9WhRXEk8.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-478602244687140791</id><published>2011-12-18T16:36:00.001+01:00</published><updated>2011-12-18T16:37:00.632+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-18T16:37:00.632+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WebLogic" /><category scheme="http://www.blogger.com/atom/ns#" term="SOA" /><category scheme="http://www.blogger.com/atom/ns#" term="SCA" /><category scheme="http://www.blogger.com/atom/ns#" term="OEPE" /><title>WebLogic SCA with WebLogic 12c and OEPE 12.1</title><content type="html">Fusion Middleware Software like OSB or SOA Suite is not yet available on WebLogic 12c but this does not mean you can't develop SCA Applications. With the help of the Oracle Enterprise for Eclipse 12.1.1 ( OEPE ) we can build WebLogic SCA application and deploy it on WebLogic 12c. This allows you to&amp;nbsp;write Java applications using POJOs and, through different protocols, expose components as SCA services and access other components via references. You do this using SCA semantics configured in a Spring application context. In SCA terms, a WebLogic Spring SCA application is a collection of POJOs plus a Spring SCA context file that wires the classes together with SCA services and references.&lt;br /&gt;
&lt;br /&gt;
In this blogpost I will show you all the steps so you can try it yourself.&lt;br /&gt;
&lt;br /&gt;
Before we start, we need to install WebLogic 12c, configure a new domain and startup the AdminServer.&lt;br /&gt;
The first step is to install the WebLogic SCA shared library and target it to the AdminServer.&lt;br /&gt;
&lt;br /&gt;
Log in to the WebLogic Console and go to deployments windows.&lt;br /&gt;
Install this war &amp;nbsp;located at &lt;b&gt;wlserver_12. 1\common\deployable-libraries\weblogic-sca-1.1.war&lt;/b&gt; as a shared library and target it to the AdminServer.&lt;br /&gt;
&lt;br /&gt;
Next step is to download OEPE 12.1.1, extract it and create a new workspace.&lt;br /&gt;
&lt;br /&gt;
In this workspace we need to create a new &lt;b&gt;Dynamic Web Project&lt;/b&gt;.&lt;br /&gt;
Use wls 12 as Target runtime and also create an Ear project which will include the war.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/--DlyJM0Gy6o/Tu336N7_UiI/AAAAAAAAEmI/xQiJHPqlBcY/s1600/sca_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="608" src="http://2.bp.blogspot.com/--DlyJM0Gy6o/Tu336N7_UiI/AAAAAAAAEmI/xQiJHPqlBcY/s640/sca_1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Open the project options of your Dynamic Web Project and go to Project Facets.&lt;br /&gt;
Here we need to enable &lt;b&gt;Oracle WebLogic SCA&lt;/b&gt; and &lt;b&gt;Spring&lt;/b&gt;.&lt;br /&gt;
Click on &lt;b&gt;Further configuration required&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-EdT0i8BMB5I/Tu3362vXGuI/AAAAAAAAEmQ/vGnRQoT8ZvQ/s1600/sca_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="508" src="http://4.bp.blogspot.com/-EdT0i8BMB5I/Tu3362vXGuI/AAAAAAAAEmQ/vGnRQoT8ZvQ/s640/sca_2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Next step is to download the Spring library. Click on the download button and select Spring Framework 2.5.6 of Oracle.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-wdTJG4jHaNI/Tu338Asob8I/AAAAAAAAEmY/wrD7MxOfueg/s1600/sca_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="506" src="http://2.bp.blogspot.com/-wdTJG4jHaNI/Tu338Asob8I/AAAAAAAAEmY/wrD7MxOfueg/s640/sca_3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Click on Next.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-8E9QydfzbWs/Tu3386rfaLI/AAAAAAAAEmg/c_jO5eOuK7g/s1600/sca_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="306" src="http://2.bp.blogspot.com/-8E9QydfzbWs/Tu3386rfaLI/AAAAAAAAEmg/c_jO5eOuK7g/s400/sca_4.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
We need to add the WebLogic SCA Shared Library, this will be added to the weblogic.xml deployment descriptor of your Web Project.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-WmDCKq46g5s/Tu339ZtxBGI/AAAAAAAAEmk/TuET2pM4Vb8/s1600/sca_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="307" src="http://3.bp.blogspot.com/-WmDCKq46g5s/Tu339ZtxBGI/AAAAAAAAEmk/TuET2pM4Vb8/s400/sca_5.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
You can open the weblogic.xml file of your Web project and in the Shared Libraries you should see the reference.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-6vkQd2sWXtQ/Tu33-G_yadI/AAAAAAAAEms/lsfKJPuLTkI/s1600/sca_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="272" src="http://2.bp.blogspot.com/-6vkQd2sWXtQ/Tu33-G_yadI/AAAAAAAAEms/lsfKJPuLTkI/s400/sca_6.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
When you are in the Web Perspective then you can open the spring-context.xml in the beans section of the Spring Elements.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-HCunFGQ6LBQ/Tu37sECM0bI/AAAAAAAAEnQ/lKU4xyFMT4g/s1600/sca_10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://3.bp.blogspot.com/-HCunFGQ6LBQ/Tu37sECM0bI/AAAAAAAAEnQ/lKU4xyFMT4g/s640/sca_10.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Or in the java perspective this is located in the jsca folder of the META-INF folder.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-ftutDyd5okM/Tu37soHt0wI/AAAAAAAAEnU/VNIicqtwzoE/s1600/sca_11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="245" src="http://1.bp.blogspot.com/-ftutDyd5okM/Tu37soHt0wI/AAAAAAAAEnU/VNIicqtwzoE/s400/sca_11.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
In the Spring-context.xml we will add some spring beans which have an EJB &amp;amp; Web Service SCA service and we also add some SCA references. &lt;br /&gt;
&lt;br /&gt;
In this demo I will start with a SCA service with has a ws binding , this service has a target to a spring bean. This spring has a property to a SCA reference which an EJB binding.&lt;br /&gt;
The SCA reference calls a SCA Service which off course also has an EJB binding. The service target the next spring bean which the calls the last spring bean.&lt;br /&gt;
&lt;br /&gt;
We start with the last spring bean and end with the first SCA service.&lt;br /&gt;
This the LoggerOutput class which just do a system out.
&lt;script src="https://gist.github.com/1493637.js?file=LoggerOutput.java"&gt;
&lt;/script&gt;
&lt;br /&gt;
Because we want to expose the next spring bean as a SCA service we need to have an interface which we can use in the SCA service.
&lt;script src="https://gist.github.com/1493642.js?file=ILoggerComponent.java"&gt;
&lt;/script&gt;
&lt;br /&gt;
And now the implementation which calls the last spring bean LoggerOutput
&lt;script src="https://gist.github.com/1493645.js?file=LoggerComponentImpl.java"&gt;
&lt;/script&gt;
&lt;br /&gt;
Now we have everything to make our first SCA application. This is how the spring-context will look like.
&lt;script src="https://gist.github.com/1493650.js?file=spring-context.xml"&gt;
&lt;/script&gt;
&lt;br /&gt;
This SCA service will be invoked in the second part of this blogpost where we will call this EJB from a web service.
We can use the same ILoggerComponent interface for the SCA Service ( this time a web service ) and the SCA reference will call the already created EJB SCA service.
We only need a new spring bean which pass on the message to the EJB. For this I use this LoggerPassThrough class.  
&lt;script src="https://gist.github.com/1493664.js?file=LoggerPassThrough.java"&gt;
&lt;/script&gt;
&lt;br /&gt;
Here is the total spring-context.xml
&lt;script src="https://gist.github.com/1493666.js?file=spring-context.xml"&gt;
&lt;/script&gt;
&lt;br /&gt;
We are ready to deploy it and do a test run. Select your EAR project, right click and do run on Server.&lt;br /&gt;
Provide the details of your WebLogic 12c domain.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-DXQp8KoeQFw/Tu33-yHGsCI/AAAAAAAAEm4/k3Qck9bsGHU/s1600/sca_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="446" src="http://4.bp.blogspot.com/-DXQp8KoeQFw/Tu33-yHGsCI/AAAAAAAAEm4/k3Qck9bsGHU/s640/sca_7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
You can use soapUI to invoke the SCA Web Service&amp;nbsp;&lt;a href="http://localhost:7001/WebLogicSCA/LoggerService_Uri?WSDL"&gt;http://localhost:7001/WebLogicSCA/LoggerService_Uri?WSDL&lt;/a&gt;&lt;br /&gt;
or invoke the SCA EJB Service&lt;br /&gt;
ILoggerComponent logEJB = (ILoggerComponent)context.lookup("LoggerService_EJB30_JNDI");&lt;br /&gt;
&lt;br /&gt;
WebLogic also has an extension for WebLogic SCA , in the Console , go to the Preferences , Extensions and enable weblogic-sca-console. &amp;nbsp;You need to restart your WebLogic Server.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-9FmCWxzvDFg/Tu33_-sgnQI/AAAAAAAAEm8/xZ1XCe5tEBw/s1600/sca_8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="595" src="http://1.bp.blogspot.com/-9FmCWxzvDFg/Tu33_-sgnQI/AAAAAAAAEm8/xZ1XCe5tEBw/s640/sca_8.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
After this you can click on your SCA deployment and see your SCA Services and references.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-Okj5UXNsrNU/Tu34Ae66WqI/AAAAAAAAEnI/DHR8PAcBxlE/s1600/sca_9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="337" src="http://4.bp.blogspot.com/-Okj5UXNsrNU/Tu34Ae66WqI/AAAAAAAAEnI/DHR8PAcBxlE/s400/sca_9.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Download the code at github&lt;br /&gt;
&lt;a href="https://github.com/biemond/OEPE_examples/tree/master/wls12cSCA"&gt;https://github.com/biemond/OEPE_examples/tree/master/wls12cSCA&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-478602244687140791?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/478602244687140791/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=478602244687140791" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/478602244687140791?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/478602244687140791?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/k5Fqnt0wJ98/weblogic-sca-with-weblogic-12c-and-oepe.html" title="WebLogic SCA with WebLogic 12c and OEPE 12.1" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/--DlyJM0Gy6o/Tu336N7_UiI/AAAAAAAAEmI/xQiJHPqlBcY/s72-c/sca_1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/12/weblogic-sca-with-weblogic-12c-and-oepe.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0QBQ3oyfip7ImA9WhRSGUw.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-7892932616018005386</id><published>2011-11-21T21:43:00.001+01:00</published><updated>2011-11-21T23:42:32.496+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-21T23:42:32.496+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g soa suite" /><category scheme="http://www.blogger.com/atom/ns#" term="web services" /><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Service Bus" /><title>Solving __OAUX_GENXSD_.TOP.XSD with BPEL</title><content type="html">When you use an external web service in combination with a BPEL service component in an Oracle SOA Suite 11g composite and you follow this &lt;a href="http://blogs.oracle.com/aia/entry/aia_11g_best_practices_for_dec"&gt;great AIA blog&lt;/a&gt; about&amp;nbsp;&lt;i&gt;Best Practices for Decoupling Services and Avoiding Invalid Composites at Server Startup&lt;/i&gt; then you can get this&amp;nbsp;&lt;b&gt;__OAUX_GENXSD_.TOP.XSD&lt;/b&gt; error in&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;JDeveloper, when you build the composite.&lt;/li&gt;
&lt;li&gt;On the SOA Suite when the service is invoked for the second time, probably on your test or acceptance environment.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Before we start with the possible fixes, first why do you get this error.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You can only get this error when you use BPEL in your composite. With the mediator service component I don't get this error.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In my test composite I have a simple OSB proxy and use this as a reference. So I provide the WSDL url to the WS adapter and enabled the option to download the WSDL to your project. &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-eQuvrRAYiP4/Tsq7Vp3qLpI/AAAAAAAAEhg/55GwVZxAMXM/s1600/Screen+Shot+2011-11-21+at+9.57.14+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="244" src="http://4.bp.blogspot.com/-eQuvrRAYiP4/Tsq7Vp3qLpI/AAAAAAAAEhg/55GwVZxAMXM/s640/Screen+Shot+2011-11-21+at+9.57.14+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Because I don't want any deployment problems ( invalid composites at deployment time or at a soa server reboot when the OSB proxy is down ). I downloaded the XSDs of the WSDL, fixed the WSDL imports. Now we can put the WSDL and the XSDs in our project folder or add them to a central place like the MDS.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
When we take a look at the reference part in the composite.xml you will see the following.&lt;/div&gt;
The endpoint is loaded from the Customer.wsdl ( location attribute of the binding.ws element ) and uses the port attribute to find the endpoint in the Customer.wsdl. &lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-YPtqlB4zcZ0/Tsq_sUIomdI/AAAAAAAAEhw/_Q14gQA_lJo/s1600/Screen+Shot+2011-11-21+at+10.13.39+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="134" src="http://3.bp.blogspot.com/-YPtqlB4zcZ0/Tsq_sUIomdI/AAAAAAAAEhw/_Q14gQA_lJo/s640/Screen+Shot+2011-11-21+at+10.13.39+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here is the wsdl with the endpoint.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-RhZeOF8TRFo/Tsq_r2oe5LI/AAAAAAAAEhs/peUUlUzuOKE/s1600/Screen+Shot+2011-11-21+at+10.16.00+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="288" src="http://4.bp.blogspot.com/-RhZeOF8TRFo/Tsq_r2oe5LI/AAAAAAAAEhs/peUUlUzuOKE/s640/Screen+Shot+2011-11-21+at+10.16.00+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This works great in development ( cause you don't need to change anything) &amp;nbsp;but when you have to deploy to test or acceptance you will generate a config plan where you override the location attribute of the binding.ws (reference) with the Test OSB Proxy WSDL url, so it will use that endpoint for test or acceptance.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
On the SOA Suite you can invoke this service once and after that you can get this __OAUX_GENXSD_.TOP.XSD error. Somehow the second time the SOA Suite will retrieve the test OSB Proxy WSDL and it's XSDs from the cache and it compares it with the local XSDs of your project or MDS. When there is a difference in one of the XSDs you will get this error ( can be something minor like an element annotation ).&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
This can also happen in the JDeveloper SOA Composite builder when you load the same XSDs local and remote.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-lQKiavj4guo/Tsq7VLt5wUI/AAAAAAAAEhc/BLiIRxsWoPI/s1600/Screen+Shot+2011-11-21+at+9.57.24+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="152" src="http://1.bp.blogspot.com/-lQKiavj4guo/Tsq7VLt5wUI/AAAAAAAAEhc/BLiIRxsWoPI/s640/Screen+Shot+2011-11-21+at+9.57.24+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So the solution is to keep the XML schemas in sync ( remote and local ) but this is almost impossible or you need to build everything with Maven or ANT and always replace the XSDs in every project. This also requires a lot of unit testing.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Even then you probably don't have much influence on remote services.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So the best solution is to avoid the loading of remote WSDL. You only need to update the endpoint for the Test or acceptance environment, not to load the whole WSDL. So don't try to replace the location attribute of the binding.ws element in the composite.xml but try to update the endpoint in the WSDL located in your project or in the MDS. &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
And if you use contract first Java (EJB) Web Services in Oracle Suite then you should always use the WSDL and the XSDs in your Java Web Services else you will get different schema imports then the original WSDL &amp;amp; XSDs.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I tested this with the Patch Set 3 version of SOA Suite 11g.&amp;nbsp;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-7892932616018005386?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/7892932616018005386/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=7892932616018005386" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/7892932616018005386?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/7892932616018005386?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/AGMeVMB-OdE/solving-oauxgenxsdtopxsd-with-bpel.html" title="Solving __OAUX_GENXSD_.TOP.XSD with BPEL" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-eQuvrRAYiP4/Tsq7Vp3qLpI/AAAAAAAAEhg/55GwVZxAMXM/s72-c/Screen+Shot+2011-11-21+at+9.57.14+PM.png" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/11/solving-oauxgenxsdtopxsd-with-bpel.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0ECRXg-eCp7ImA9WhRTF0o.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-7224949869856167334</id><published>2011-11-08T20:14:00.000+01:00</published><updated>2011-11-08T20:14:24.650+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-08T20:14:24.650+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g webcenter" /><title>Changing a navigation model on a page in WebCenter</title><content type="html">WebCenter has a default navigation model (menu) which is located in the navigations folder and is defined as portal preference in the adf-config.xml file. But this menu is used in every page of the portal. I want to change this, so when you are not authenticated you will see the normal website links. But when you go to the internal page the menu will be switched to the application navigation model.&lt;br /&gt;
Special thanks for Maiko Rocha of the WebCenter A-Team for helping me solving this requirement.&lt;br /&gt;
&lt;br /&gt;
First I create a new jspx page based on the global template called Internal.jspx and add a navigation reference to this page in the default-navigation-model.xml.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-2jm-k7wOisQ/Trl26ikrILI/AAAAAAAAEfQ/taWr3KkDNM8/s1600/Screen+Shot+2011-11-08+at+7.36.58+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="360" src="http://2.bp.blogspot.com/-2jm-k7wOisQ/Trl26ikrILI/AAAAAAAAEfQ/taWr3KkDNM8/s640/Screen+Shot+2011-11-08+at+7.36.58+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now we can create a navigation model which will be used in the internal page. This menu has a link to the home page so the user can go back to the default menu.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-ejTo9eRX1OQ/Trl3_OshYJI/AAAAAAAAEfg/9pOpJucxk-g/s1600/Screen+Shot+2011-11-08+at+7.40.06+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="352" src="http://1.bp.blogspot.com/-ejTo9eRX1OQ/Trl3_OshYJI/AAAAAAAAEfg/9pOpJucxk-g/s640/Screen+Shot+2011-11-08+at+7.40.06+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Open the global template called pageTemplate_globe.jspx and go the menu part. &amp;nbsp;Here we will change the default navigation model.&lt;br /&gt;
&lt;br /&gt;
from&lt;br /&gt;
#{navigationContext.defaultNavigationModel.listModel['startNode=/, includeStartNode=false']}&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
#{navigationContext.navigationModel[ &lt;b&gt;menuSwitcher.menu&lt;/b&gt; ]&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.listModel['startNode=/, includeStartNode=false']}&lt;br /&gt;
&lt;br /&gt;
Where menuSwitcher is a request bean.&lt;br /&gt;
&lt;br /&gt;
To determine what navigation model I need to use I will check the current page and return the right navigation reference.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-EYYHPHFo6sg/Trl40pk7PWI/AAAAAAAAEfo/aXyZUeKWV0Y/s1600/Screen+Shot+2011-11-08+at+7.44.22+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="210" src="http://2.bp.blogspot.com/-EYYHPHFo6sg/Trl40pk7PWI/AAAAAAAAEfo/aXyZUeKWV0Y/s640/Screen+Shot+2011-11-08+at+7.44.22+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The request bean&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1348719.js?file=MenuSwitcher.java"&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also use EL instead of a request bean.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;div&gt;
&lt;div&gt;
&amp;lt;af:forEach var="node" varStatus="vs"&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;items="#{navigationContext.&lt;wbr&gt;&lt;/wbr&gt;navigationModel[&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; controllerContext.&lt;wbr&gt;&lt;/wbr&gt;currentViewPort.viewId eq '/oracle/webcenter/portalapp/&lt;wbr&gt;&lt;/wbr&gt;pages/Internal.jspx' &lt;b&gt;?&lt;/b&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'/oracle/webcenter/portalapp/&lt;wbr&gt;&lt;/wbr&gt;navigations/&lt;wbr&gt;&lt;/wbr&gt;navigationModelInternal.xml' &lt;b&gt;&amp;nbsp;:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'/oracle/webcenter/portalapp/&lt;wbr&gt;&lt;/wbr&gt;navigations/default-&lt;wbr&gt;&lt;/wbr&gt;navigation-model.xml'&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="background-color: rgba(255, 255, 255, 0.917969); color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;
&amp;nbsp; &amp;nbsp;].listModel['startNode=/, includeStartNode=false']}"&amp;gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Here some pictures of the home page&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-rk3VrjTfvL0/Trl27WdYryI/AAAAAAAAEfU/kNGSXKpM8FQ/s1600/Screen+Shot+2011-11-08+at+7.33.24+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="197" src="http://2.bp.blogspot.com/-rk3VrjTfvL0/Trl27WdYryI/AAAAAAAAEfU/kNGSXKpM8FQ/s400/Screen+Shot+2011-11-08+at+7.33.24+PM.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
After being authenticated, some extra menu links appears&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-dVwmMXmq67s/Trl-aublFWI/AAAAAAAAEf0/OS-42y8r7qo/s1600/Screen+Shot+2011-11-08+at+8.08.21+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="222" src="http://1.bp.blogspot.com/-dVwmMXmq67s/Trl-aublFWI/AAAAAAAAEf0/OS-42y8r7qo/s400/Screen+Shot+2011-11-08+at+8.08.21+PM.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
And at last, the internal page with the new navigation model.
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-W_xVgUg2JTo/Trl-aFCU6SI/AAAAAAAAEfw/SfQOZqMfvCc/s1600/Screen+Shot+2011-11-08+at+8.08.36+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="177" src="http://1.bp.blogspot.com/-W_xVgUg2JTo/Trl-aFCU6SI/AAAAAAAAEfw/SfQOZqMfvCc/s400/Screen+Shot+2011-11-08+at+8.08.36+PM.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-7224949869856167334?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/7224949869856167334/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=7224949869856167334" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/7224949869856167334?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/7224949869856167334?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/L8SkcKwkFFA/changing-navigation-model-on-page-in.html" title="Changing a navigation model on a page in WebCenter" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-2jm-k7wOisQ/Trl26ikrILI/AAAAAAAAEfQ/taWr3KkDNM8/s72-c/Screen+Shot+2011-11-08+at+7.36.58+PM.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/11/changing-navigation-model-on-page-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcESX8-fSp7ImA9WhdaF0g.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-1994227067555483928</id><published>2011-10-28T00:22:00.000+02:00</published><updated>2011-10-28T00:53:28.155+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-28T00:53:28.155+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="adf" /><category scheme="http://www.blogger.com/atom/ns#" term="EclipseLink" /><category scheme="http://www.blogger.com/atom/ns#" term="OEPE" /><category scheme="http://www.blogger.com/atom/ns#" term="adf taskflow" /><title>Playing with ADF Task Flows in OEPE 11.1.1.8</title><content type="html">&lt;br /&gt;
Oracle released the&amp;nbsp;&lt;a href="http://www.oracle.com/technetwork/developer-tools/eclipse/downloads/index.html"&gt;Oracle Enterprise Pack for Eclipse 11g R1&lt;/a&gt; (11.1.1.8, New October 2011 ) which supports ADF Rich Faces with ADF Task Flow development. To see all the new features you can &lt;a href="http://www.oracle.com/technetwork/developer-tools/eclipse/overview/whatsnew-089747.html"&gt;go this page&lt;/a&gt;&amp;nbsp;for all the ADF or Oracle Cloud feature list.&lt;br /&gt;
&lt;br /&gt;
In this blogpost I will show you some steps how to make your own ADF Web application in OEPE.&lt;br /&gt;
&lt;br /&gt;
Before you can start you should know that the ADF application in OEPE uses JPA as model ( eclipselink), ADF BC can be used but only on runtime and you should already have WebLogic PS3 or higher installed ( together the ADF runtime option).&lt;br /&gt;
&lt;br /&gt;
This OEPE release does not have ADF wizard for ADF BC or for ADF Datacontrols but the support for ADF Task Flows is a big step forward.&lt;br /&gt;
&lt;br /&gt;
Let's start.&lt;br /&gt;
Start with a new Oracle ADF Application&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-YBpUN2IeOOk/Tqm-sgD6cgI/AAAAAAAAEaM/TjmgBwQ8ZD4/s1600/oepe_0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="368" src="http://4.bp.blogspot.com/-YBpUN2IeOOk/Tqm-sgD6cgI/AAAAAAAAEaM/TjmgBwQ8ZD4/s400/oepe_0.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Add a new WebLogic runtime, define your WebLogic home and run the domain wizard to create a new ADF enabled domain. Make sure you add the JRF option to the domain.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/--aj56G_XzDE/Tqm-D-1l31I/AAAAAAAAEY0/1TaHuaeKRx0/s1600/oepe_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="360" src="http://2.bp.blogspot.com/--aj56G_XzDE/Tqm-D-1l31I/AAAAAAAAEY0/1TaHuaeKRx0/s400/oepe_2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
You should use JPA as a model project with Oracle ADF 11g JPA Project as the configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-yyu7HOjlPTg/Tqm-DfDGwkI/AAAAAAAAEYs/v3aO_9w-tIc/s1600/oepe_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-yyu7HOjlPTg/Tqm-DfDGwkI/AAAAAAAAEYs/v3aO_9w-tIc/s400/oepe_1.png" width="301" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
This will create 2 projects, Model and AdfGuiWeb and 1 ear deployment called AdfGui.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-mMbkf_xLzfI/TqnAO8DHgeI/AAAAAAAAEaU/6mkMhW8EvPM/s1600/oepe_0_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-mMbkf_xLzfI/TqnAO8DHgeI/AAAAAAAAEaU/6mkMhW8EvPM/s1600/oepe_0_2.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Create a JSP File which will be our start page.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-5D0N9EVUM74/Tqm-E95rdXI/AAAAAAAAEY4/2PhP3EIU0Mc/s1600/oepe_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="347" src="http://1.bp.blogspot.com/-5D0N9EVUM74/Tqm-E95rdXI/AAAAAAAAEY4/2PhP3EIU0Mc/s400/oepe_4.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Select the location for the JSPX page&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-qkTykmNmWUY/Tqm-FfnAcBI/AAAAAAAAEZA/H1dKXJMK-Aw/s1600/oepe_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="277" src="http://4.bp.blogspot.com/-qkTykmNmWUY/Tqm-FfnAcBI/AAAAAAAAEZA/H1dKXJMK-Aw/s320/oepe_5.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Choose for ADF Rich Faces Page , Basic xhtml&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-zfYM8JJ5_ug/Tqm-GPMoT6I/AAAAAAAAEZM/OCCeCOriLsU/s1600/oepe_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="536" src="http://4.bp.blogspot.com/-zfYM8JJ5_ug/Tqm-GPMoT6I/AAAAAAAAEZM/OCCeCOriLsU/s640/oepe_6.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Open the adfc-config.xml and drag the jspx page to the diagram, this will create a new view.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-gU1Hl7Owiv0/Tqm-HGR79nI/AAAAAAAAEZQ/B7eY6BrKpQM/s1600/oepe_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="345" src="http://4.bp.blogspot.com/-gU1Hl7Owiv0/Tqm-HGR79nI/AAAAAAAAEZQ/B7eY6BrKpQM/s640/oepe_7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Create a new ADF Fragment Task Flow which will hold the department fragments&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-NtDv80p4ygM/Tqm-HpwOEPI/AAAAAAAAEZc/HeOADAxSE98/s1600/oepe_8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-NtDv80p4ygM/Tqm-HpwOEPI/AAAAAAAAEZc/HeOADAxSE98/s400/oepe_8.png" width="331" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Select the location.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-qGyhRLrYc2s/Tqm-I4VPBjI/AAAAAAAAEZg/XPhsFKUokHU/s1600/oepe_9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-qGyhRLrYc2s/Tqm-I4VPBjI/AAAAAAAAEZg/XPhsFKUokHU/s320/oepe_9.png" width="266" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The fragment option should be enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-PXLxqQznz0I/Tqm-JcC3wyI/AAAAAAAAEZo/iVEG2dNeJjA/s1600/oepe_10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-PXLxqQznz0I/Tqm-JcC3wyI/AAAAAAAAEZo/iVEG2dNeJjA/s320/oepe_10.png" width="264" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Create a new JSP page which will be our fragment page, called department.jsff&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-RFK4iCTj0es/Tqm-JwnDBWI/AAAAAAAAEZ0/lXTL7aG-q8s/s1600/oepe_11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="303" src="http://4.bp.blogspot.com/-RFK4iCTj0es/Tqm-JwnDBWI/AAAAAAAAEZ0/lXTL7aG-q8s/s320/oepe_11.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now choose ADF Rich Faces Page Fragment&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-SnQE79DDIKE/Tqm-K2w8pMI/AAAAAAAAEZ8/heOZcqE4nPA/s1600/oepe_12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="490" src="http://2.bp.blogspot.com/-SnQE79DDIKE/Tqm-K2w8pMI/AAAAAAAAEZ8/heOZcqE4nPA/s640/oepe_12.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Open the departments TF and drag this fragment to this Bounded Task Flow.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-nWYsuxa6b5o/Tqm-MA0pNsI/AAAAAAAAEaE/uZ8HfDpZjzQ/s1600/oepe_13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="237" src="http://4.bp.blogspot.com/-nWYsuxa6b5o/Tqm-MA0pNsI/AAAAAAAAEaE/uZ8HfDpZjzQ/s400/oepe_13.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we can go the model project and delete the model project. OEPE does not support ADF Datacontrol generation, so we will skip this for the demo.&lt;br /&gt;
&lt;br /&gt;
Now you are able to run the JSPX page. Select the startView.jspx and right click Run As -&amp;gt; Run on server.&lt;br /&gt;
&lt;br /&gt;
After a&amp;nbsp;successful run we can add an outputtext to the page and the fragment&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-qEpFxUvtSSY/TqnStUo0UkI/AAAAAAAAEa0/WBjnPd07pjM/s1600/oepe_17.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="352" src="http://3.bp.blogspot.com/-qEpFxUvtSSY/TqnStUo0UkI/AAAAAAAAEa0/WBjnPd07pjM/s640/oepe_17.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now drag the department Task Flow to the jspx start page and select Region. This will create the ADF binding pagedef file.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-LHV2GzNnkeM/TqnSuXtUbYI/AAAAAAAAEa8/FgaZpWuuBGA/s1600/oepe_18.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="366" src="http://3.bp.blogspot.com/-LHV2GzNnkeM/TqnSuXtUbYI/AAAAAAAAEa8/FgaZpWuuBGA/s640/oepe_18.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
We can open the pagedef file and add your own bindings.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-IRaNLjPKuTI/TqnSvNEXKtI/AAAAAAAAEbA/JoFiIxz94BU/s1600/oepe_19.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="540" src="http://2.bp.blogspot.com/-IRaNLjPKuTI/TqnSvNEXKtI/AAAAAAAAEbA/JoFiIxz94BU/s640/oepe_19.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Or open the Data Palette window which shows you the available bindings&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-jClaoZY6FiA/TqnURI7yGkI/AAAAAAAAEbM/8rPQwpjmKSE/s1600/oepe_20.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-jClaoZY6FiA/TqnURI7yGkI/AAAAAAAAEbM/8rPQwpjmKSE/s400/oepe_20.png" width="350" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
At last open the project options to enable the adf.oracle.domain.webapp shared libraries&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-hBgPKbGO_BQ/TqnUs1ZoqUI/AAAAAAAAEbU/7KQJw8ObLls/s1600/oepe_21.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="356" src="http://2.bp.blogspot.com/-hBgPKbGO_BQ/TqnUs1ZoqUI/AAAAAAAAEbU/7KQJw8ObLls/s640/oepe_21.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now you can run the start page with the Bounded Task Flow fragment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an extra you can also add some data to the page by fixing the Model project.&lt;br /&gt;
First add a database connection to the model project&lt;br /&gt;
Add JPA entitities from tables&lt;br /&gt;
Add a connection to the persistence.xml&lt;br /&gt;
&lt;br /&gt;
Add Data Model Components to the Model project. This will create a managed bean for the JSF page and an EJB Session bean for the entities&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-ZuQQK6JYDag/Tqne35CQlfI/AAAAAAAAEbc/RsC7Z6w-Hn4/s1600/jpa_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="215" src="http://1.bp.blogspot.com/-ZuQQK6JYDag/Tqne35CQlfI/AAAAAAAAEbc/RsC7Z6w-Hn4/s400/jpa_1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
EJB Session Bean&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-Yp-RgEvybOk/Tqne5Ncsi8I/AAAAAAAAEbg/hXGLidUHJhs/s1600/jpa_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="282" src="http://2.bp.blogspot.com/-Yp-RgEvybOk/Tqne5Ncsi8I/AAAAAAAAEbg/hXGLidUHJhs/s400/jpa_2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
JSF bean&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-b5r-sbHkhwQ/Tqne5isuuUI/AAAAAAAAEbo/XsboWIvUMVg/s1600/jpa_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="286" src="http://1.bp.blogspot.com/-b5r-sbHkhwQ/Tqne5isuuUI/AAAAAAAAEbo/XsboWIvUMVg/s400/jpa_3.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
the managed bean code&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-MmNIrTtH2OY/TqnfW4zRePI/AAAAAAAAEb0/2M8dTmlMTWg/s1600/jpa_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="345" src="http://3.bp.blogspot.com/-MmNIrTtH2OY/TqnfW4zRePI/AAAAAAAAEb0/2M8dTmlMTWg/s400/jpa_4.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The Data Pallette, drag and drop the FindAll method to the fragment page&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-gsjUYvSj_E4/TqnfXdcVuFI/AAAAAAAAEb4/gcK7EBTq7ds/s1600/jpa_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="316" src="http://3.bp.blogspot.com/-gsjUYvSj_E4/TqnfXdcVuFI/AAAAAAAAEb4/gcK7EBTq7ds/s640/jpa_5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-5SWnFszCNLY/TqnfYOCn1zI/AAAAAAAAEcA/37RosE83IXM/s1600/jpa_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="268" src="http://2.bp.blogspot.com/-5SWnFszCNLY/TqnfYOCn1zI/AAAAAAAAEcA/37RosE83IXM/s400/jpa_6.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
And the result.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-iA8zFe8nSCY/TqnfY7gFtOI/AAAAAAAAEcI/rHV_-3bx0cY/s1600/jpa_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="267" src="http://1.bp.blogspot.com/-iA8zFe8nSCY/TqnfY7gFtOI/AAAAAAAAEcI/rHV_-3bx0cY/s400/jpa_7.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-1994227067555483928?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/1994227067555483928/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=1994227067555483928" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/1994227067555483928?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/1994227067555483928?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/moeEd7J7-Ms/playing-with-adf-task-flows-in-oepe.html" title="Playing with ADF Task Flows in OEPE 11.1.1.8" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-YBpUN2IeOOk/Tqm-sgD6cgI/AAAAAAAAEaM/TjmgBwQ8ZD4/s72-c/oepe_0.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/10/playing-with-adf-task-flows-in-oepe.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkAER387eyp7ImA9WhdaE0Q.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-4261088155385106132</id><published>2011-10-23T20:31:00.001+02:00</published><updated>2011-10-23T20:31:46.103+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-23T20:31:46.103+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WebLogic" /><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g soa suite" /><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g webcenter" /><category scheme="http://www.blogger.com/atom/ns#" term="adf" /><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11gR2" /><title>Using FMW IdentityStore for your User management</title><content type="html">In Fusion Middleware you can use IdentityStore framework to do all your user, role and password management. This IDM and JPS frameworks will give you a lot options which you don't have with the standaard JAAS framework of WebLogic ( you need to create your authentication provider and add a private principal to the subject). &amp;nbsp;IDM framework works really great with LDAP identity providers like the default WebLogic internal LDAP, OpenLDAP, Oracle Internet Directory ( OID ) or Microsoft Active Directory.&lt;br /&gt;
With this you don't need to make your own software to do some user management on a particular LDAP provider, IDM can do it for you and IDM will detect the right LDAP provider. So you just need to implement this and IDM will do all the work. &lt;br /&gt;
&lt;br /&gt;
This is what you can do with IDM.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Retrieving and changing LDAP attributes of a user.&lt;/li&gt;
&lt;li&gt;User management, search, create users in a particular LDAP provider.&lt;/li&gt;
&lt;li&gt;Role management, search, create etc.&lt;/li&gt;
&lt;li&gt;Retrieve a username and password from the credential store and use it in your own application. &amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
I will try to explain the different use cases in this blogpost.&lt;br /&gt;
&lt;br /&gt;
Before we begin, is good to know how the IdentityStore will work with LDAP providers. Default it only works with the internal WebLogic LDAP. If you also want to use AD or OID, then you need to add it to WebLogic authentication provider of the myrealm security realm ( no need to add it to the jps-config.xml located at domain/config/fmwconfig ,this is only necessary when you don't use WebLogic ).&lt;br /&gt;
The jps serviceInstance called idstore.ldap&amp;nbsp;can detect all the LDAP providers which are configured in WebLogic. &lt;br /&gt;
But when you have more then one LDAP providers then you got two options.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Add the &lt;b&gt;virtualize&lt;/b&gt; property with value &lt;b&gt;true&lt;/b&gt; to the &lt;b&gt;idstore.ldap&lt;/b&gt; serviceInstance ( in&amp;nbsp;jps-config.xml located at domain/config/fmwconfig )&amp;nbsp;. This will switch IDM from WebLogic to Oracle Virtual Directory mode. This will make sure that FMW applications will see all the users and roles. When you use Webcenter or SOA Suite / BPM Human worklist application then you need to add this property when you have more then one LDAP provider. In this OVD mode you can't retrieve the LDAP attributes of a user, OVD did not implement this option.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Re-order the LDAP authentication providers. The first authenticator provider will be used and the other will be ignored, ( WebLogic will still use all it's authenticators for JAAS but FMW will not &amp;nbsp;). &amp;nbsp;That's why in some forums or blogposts talk about re-ordering of the authentications providers. In most cases is setting the virtualize a better approach.&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
Let's start with retrieving all the things we know about a user. Here I will retrieve its roles and all the LDAP attributes. ( this will not work with virtualize property on true and only on the first authentication provider )&lt;br /&gt;
Using LDAP attributes can be very handy for retrieving particular information which you can use in your application, like location information else you need to create a lot of roles to achieve the same. You can retrieve for example the location attribute and pass this value to the database ( Use it in Virtual Private Database VPD what Larry said it is a false cloud feature :-) ) or use it to disable some region screens.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-oW46oWyd_ww/TqRI-hvXsKI/AAAAAAAAEYI/AdS0DnkURAY/s1600/Screen+Shot+2011-10-23+at+7.03.34+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="310" src="http://3.bp.blogspot.com/-oW46oWyd_ww/TqRI-hvXsKI/AAAAAAAAEYI/AdS0DnkURAY/s400/Screen+Shot+2011-10-23+at+7.03.34+PM.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Here I need to create JpsContext and lookup the IdentityStore. After that I can lookup the User with its UserProfile and retrieve the LDAP attributes by retrieving the PropertySet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Important to know that these user operations will use the account defined in the authentication provider, there is no check if your normal user should be able to do so. So test this for a possible abuse.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1307585.js?file=IDM.class"&gt;
&lt;/script&gt;
&lt;br /&gt;
These are the steps to create a new Role in your LDAP repository. Lookup the RoloManager and use the createRole method.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-gIrxflAdDK0/TqRMUiZOzPI/AAAAAAAAEYQ/Wf9hyqF2bXY/s1600/Screen+Shot+2011-10-23+at+7.17.04+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="133" src="http://3.bp.blogspot.com/-gIrxflAdDK0/TqRMUiZOzPI/AAAAAAAAEYQ/Wf9hyqF2bXY/s400/Screen+Shot+2011-10-23+at+7.17.04+PM.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1307600.js?file=role.java"&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
We can also create a user and assign a role to this new user. In this case also need to provide a AD property called&amp;nbsp;samaccountname. After that I can retrieve the UserManager and use the createUser method. Lookup the role and assign to this user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1307613.js?file=user.java"&gt;
&lt;/script&gt;
The last part is about how you can store your passwords in a safe way on the WebLogic Server. Every environment can have its own passwords and this can be managed by your Administrators.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-4c_ijyruhKo/TqRRX3MxB7I/AAAAAAAAEYY/_UuYbHoekM8/s1600/Screen+Shot+2011-10-23+at+7.39.18+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="271" src="http://1.bp.blogspot.com/-4c_ijyruhKo/TqRRX3MxB7I/AAAAAAAAEYY/_UuYbHoekM8/s400/Screen+Shot+2011-10-23+at+7.39.18+PM.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
To store a password in the credential store you can use the following wlst script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
start wlst.cmd from oracle_common\common\bin not from the the weblogic server home&lt;br /&gt;
&lt;br /&gt;
connect('weblogic','weblogic1','t3://localhost:7101')&lt;br /&gt;
createCred(map="&lt;b&gt;JPS&lt;/b&gt;",key="&lt;b&gt;AD_ldap&lt;/b&gt;",user="CN=Administrator,CN=Users,DC=alfa,DC=local",password="Welcome02" ,desc="Windows LDAP user")&lt;br /&gt;
exit()&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
To allow FMW to retrieve this password I need to give the authenticated role some permissions on this map.&lt;br /&gt;
&lt;br /&gt;
Open the jazn-data.xml of your FMW application, lookup the authenticated role and add the following entries&lt;br /&gt;
oracle.security.jps.service.credstore.CredentialAccessPermission with read permission for&amp;nbsp;context=SYSTEM,mapName=&lt;b&gt;JPS&lt;/b&gt;,keyName=&lt;b&gt;AD_ldap&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Somehow I also need to do this for&amp;nbsp;mapName=j2ee-app#V2.0. The WebLogic will provide some logging to say what you are missing.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-W2ixqTY0-60/TqRVCuK_LqI/AAAAAAAAEYg/SXOnDwLhAdU/s1600/Screen+Shot+2011-10-23+at+7.49.49+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="284" src="http://4.bp.blogspot.com/-W2ixqTY0-60/TqRVCuK_LqI/AAAAAAAAEYg/SXOnDwLhAdU/s640/Screen+Shot+2011-10-23+at+7.49.49+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
And here the code to retrieve it.&lt;br /&gt;
&lt;script src="https://gist.github.com/1307664.js?file=password.java"&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
You can download my sample application at github &lt;a href="https://github.com/biemond/jdev11g_examples/tree/master/ADFSecurity"&gt;https://github.com/biemond/jdev11g_examples/tree/master/ADFSecurity&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-4261088155385106132?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/4261088155385106132/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=4261088155385106132" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/4261088155385106132?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/4261088155385106132?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/1Csh00X5UYs/using-fmw-identitystore-for-your-user.html" title="Using FMW IdentityStore for your User management" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-oW46oWyd_ww/TqRI-hvXsKI/AAAAAAAAEYI/AdS0DnkURAY/s72-c/Screen+Shot+2011-10-23+at+7.03.34+PM.png" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/10/using-fmw-identitystore-for-your-user.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUAMQnkyeip7ImA9WhdbF0Q.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-6224112976060306780</id><published>2011-10-16T21:36:00.000+02:00</published><updated>2011-10-16T21:36:23.792+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-16T21:36:23.792+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g soa suite" /><category scheme="http://www.blogger.com/atom/ns#" term="adf" /><title>Working with the Human WorkList api and create your own WorkList application</title><content type="html">In this blogpost I will explain what is possible with the IWorkflowServiceClient ( HumanTask java client ) &amp;nbsp;so you can integrate this in your own Custom WorkList application. &amp;nbsp;This way you don't need to use the standard BPM worklist application, add some extra functionality and also don't need to create HumanTask ADF Task Flow and deploy this to the SOA Suite server.&lt;br /&gt;
&lt;br /&gt;
This demo shows you the power of Fusion Middleware where you can combine SOA Suite workflow to your own ADF applications.&lt;br /&gt;
&lt;br /&gt;
At the end of this blogpost I will show you the link for this demo application which also contains the BPEL to create the HumanTasks.&lt;br /&gt;
&lt;br /&gt;
Here are some pics of the demo application. You will get an overview of the tasks assigned to the weblogic user ( normally this will be replaced by the user of the application ). The user can search on certain field, change the ordering and control the maximum rows.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-v7jyJ9jPQUk/TpsvPBRaQlI/AAAAAAAAEX0/bICjjQLK6DM/s1600/Screen+Shot+2011-10-16+at+9.20.57+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="353" src="http://4.bp.blogspot.com/-v7jyJ9jPQUk/TpsvPBRaQlI/AAAAAAAAEX0/bICjjQLK6DM/s400/Screen+Shot+2011-10-16+at+9.20.57+PM.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
And in combination with the ADF UIShell template of Oracle you can make a multi task handling application. Every task you click on will have its own Tab. Here you can also lookup the extra information which is necessary to the user so it can handle this task.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-_mC_jn4hRd4/TpsvU35KgvI/AAAAAAAAEX8/CGv0YVnux1g/s1600/Screen+Shot+2011-10-16+at+9.23.00+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="210" src="http://4.bp.blogspot.com/-_mC_jn4hRd4/TpsvU35KgvI/AAAAAAAAEX8/CGv0YVnux1g/s640/Screen+Shot+2011-10-16+at+9.23.00+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Time to go back to the code.&lt;br /&gt;
&lt;br /&gt;
I will start with a BPEL which invokes a HumanTask and to make my life easy I will use the flexible text , date or url fields of the HumanTask for my own important data so I don't need to examine payload.&lt;br /&gt;
This way you can search on these fields and use it in your own task entity.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-Ej158jjAosQ/TpsdrNQy0dI/AAAAAAAAEXk/93-cVW2iKN8/s1600/Screen+Shot+2011-10-16+at+8.07.04+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="504" src="http://4.bp.blogspot.com/-Ej158jjAosQ/TpsdrNQy0dI/AAAAAAAAEXk/93-cVW2iKN8/s640/Screen+Shot+2011-10-16+at+8.07.04+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
And map the payload fields to the flex fields in a Assign activity. These fields are located in the systemMessageAttributes element.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-zZuaFs98TKE/TpseCC5Ph8I/AAAAAAAAEXs/rse-8Mjj58Y/s1600/Screen+Shot+2011-10-16+at+8.08.15+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="458" src="http://4.bp.blogspot.com/-zZuaFs98TKE/TpseCC5Ph8I/AAAAAAAAEXs/rse-8Mjj58Y/s640/Screen+Shot+2011-10-16+at+8.08.15+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Next is to retrieve these tasks from the java / ejb client. Todo so I need two libraries bpm-infra.jar and bpm-services.jar. Copy these jars from the soa server so you don't get serial id versioning errors.&lt;br /&gt;
&lt;br /&gt;
I will use on behalf of so I don't need to have the password of the user and I can do all the actions of behalf of this user.&lt;br /&gt;
&lt;br /&gt;
Start with a property file or you can set some java parameters&lt;br /&gt;
&lt;br /&gt;
soa.properties&lt;br /&gt;
soaserver=soaps3.alfa.local:8001&lt;br /&gt;
humantask.user=weblogic&lt;br /&gt;
humantask.password=weblogic1
&lt;br /&gt;
&lt;br /&gt;
or set these java parameters on the project&lt;br /&gt;
-Dhumantask.url&lt;br /&gt;
-Dhumantask.user&lt;br /&gt;
-Dhumantask.password&lt;br /&gt;
&lt;br /&gt;
For the tasks I will connect to the HumanTask EJB and for the Identities I need to connect the Identity SOAP Service.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1291226.js?file=connection.java"&gt;
&lt;/script&gt;
&lt;br /&gt;
We need to have an IWorkflowContext which I can use for the query operation on the Task bean. I will first authenticate with the superuser and then on behalf of the user of my application.&lt;script src="https://gist.github.com/1291241.js?file=authenticate.java"&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
In this query on the human task I can control which attributes I want to use in my application.&lt;br /&gt;
&lt;br /&gt;
List&amp;lt;String&amp;gt; queryColumns = new ArrayList&amp;lt;String&amp;gt;();
queryColumns.add(TableConstants.WFTASK_TITLE_COLUMN.getName());&lt;br /&gt;
&lt;br /&gt;
And if I want to have the payload or the comments, I need to do this.&lt;br /&gt;
List&amp;lt;ITaskQueryService.OptionalInfo&amp;gt; optionalInfo =&lt;br /&gt;
&amp;nbsp; &amp;nbsp; new ArrayList&amp;lt;ITaskQueryService.OptionalInfo&amp;gt;(); optionalInfo.add(ITaskQueryService.OptionalInfo.COMMENTS);
optionalInfo.add(ITaskQueryService.OptionalInfo.PAYLOAD);&lt;br /&gt;
&lt;br /&gt;
Do ordering on the tasks.&lt;br /&gt;
&lt;br /&gt;
Ordering taskOrdering = null;&lt;br /&gt;
if ( "PRIO".equalsIgnoreCase(orderBy) ) {&lt;br /&gt;
&amp;nbsp;taskOrdering = new Ordering(TableConstants.WFTASK_PRIORITY_COLUMN, true,false);&lt;br /&gt;
&amp;nbsp;taskOrdering.addClause(TableConstants.WFTASK_TASKNUMBER_COLUMN, true,false);&lt;br /&gt;
} else if  ("ID".equalsIgnoreCase(orderBy) ) {&lt;br /&gt;
&amp;nbsp; taskOrdering = new Ordering(TableConstants.WFTASK_TASKNUMBER_COLUMN, false,true);&lt;br /&gt;
} else if ("ESC_DESC".equalsIgnoreCase(orderBy)  ) {&lt;br /&gt;
&amp;nbsp; taskOrdering = new Ordering(TableConstants.WFTASK_EXPIRATIONDATE_COLUMN, false, false);&lt;br /&gt;
}&amp;nbsp;else if ("ESC_ASC".equalsIgnoreCase(orderBy) ) {&lt;br /&gt;
&amp;nbsp; taskOrdering = new Ordering(TableConstants.WFTASK_EXPIRATIONDATE_COLUMN, true, false);
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
It is also possible to do a search and add a fixed where condition. For this we need to have a Predicate where we can add the states we want to see.&lt;br /&gt;
&lt;br /&gt;
List&amp;lt;String&amp;gt; correctStates = new ArrayList&amp;lt;String&amp;gt;();
 correctStates.add(IWorkflowConstants.TASK_STATE_ALERTED);
 correctStates.add(IWorkflowConstants.TASK_STATE_ASSIGNED);&lt;br /&gt;
&lt;br /&gt;
Predicate predicateBasic =
    new Predicate(&lt;br /&gt;
&amp;nbsp; TableConstants.WFTASK_STATE_COLUMN,&lt;br /&gt;
&amp;nbsp; Predicate.OP_IN,&lt;br /&gt;
&amp;nbsp; correctStates);&lt;br /&gt;
&lt;br /&gt;
predicateBasic.addClause(Predicate.AND,&lt;br /&gt;
&amp;nbsp;TableConstants.WFTASK_STATE_COLUMN,&lt;br /&gt;
&amp;nbsp;Predicate.OP_NEQ,&lt;br /&gt;
&amp;nbsp;IWorkflowConstants.TASK_STATE_STALE);&lt;br /&gt;
&lt;br /&gt;
This Predicate can be combined to an other Predicate with an other AND / OR and finally added to the queryTasks method of the workflowServiceClient.getTaskQueryService()&lt;br /&gt;
&lt;script src="https://gist.github.com/1291246.js?file=querytask.java"&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;br /&gt;
To make your life easier try to convert the tasks to your own entity &amp;nbsp;so you can use your own attributes instead of using text1 etc.&lt;br /&gt;
&lt;br /&gt;
You can download, fork or improve the Demo application at github &lt;a href="https://github.com/biemond/soa11g_examples/tree/master/HumanTaskListApp"&gt;https://github.com/biemond/soa11g_examples/tree/master/HumanTaskListApp&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-6224112976060306780?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/6224112976060306780/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=6224112976060306780" title="11 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6224112976060306780?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6224112976060306780?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/awIhSANa6lg/working-with-human-worklist-api-and.html" title="Working with the Human WorkList api and create your own WorkList application" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-v7jyJ9jPQUk/TpsvPBRaQlI/AAAAAAAAEX0/bICjjQLK6DM/s72-c/Screen+Shot+2011-10-16+at+9.20.57+PM.png" height="72" width="72" /><thr:total>11</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/10/working-with-human-worklist-api-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8BRXo8fyp7ImA9WhdUGU4.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-2196385146293292330</id><published>2011-10-06T22:44:00.000+02:00</published><updated>2011-10-06T22:44:14.477+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-06T22:44:14.477+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g soa suite" /><category scheme="http://www.blogger.com/atom/ns#" term="web services" /><category scheme="http://www.blogger.com/atom/ns#" term="OWSM" /><category scheme="http://www.blogger.com/atom/ns#" term="Axis" /><title>Calling an OWSM protected service with Axis2 and Rampart</title><content type="html">In a &lt;a href="http://biemond.blogspot.com/2011/09/calling-owsm-protected-service-with.html"&gt;previous blogpost&lt;/a&gt; I used Axis 1.4 in combination with WSS4J 1.5 and because Axis 1.4 is getting old so I tried the same with Axis 2 and Rampart which uses WSSJ. For all the security details like the username and how to generate certificates you can check see &lt;a href="http://biemond.blogspot.com/2011/09/calling-owsm-protected-service-with.html"&gt;my previous post&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Just like the Axis 1.4 post I will call a OSB service which has an oracle/wss10_username_token_with_message_protection_service_policy OWSM server policy.&lt;br /&gt;
&lt;br /&gt;
Before we start we need to download axis2 and the matching Rampart version, I use in this blogpost the 1.60 versions of axis2 and Rampart. &amp;nbsp;Copy the Rampart jars to the axis lib folder and the Rampart modules to the axis2 modules folder.&lt;br /&gt;
&lt;br /&gt;
Download the WSDL with it's XSDs from the Web Service.&lt;br /&gt;
&lt;br /&gt;
After that use this ANT build file to generate a ADB web service proxy client. The wsdl I used has the Customer.wsdl as name.&lt;br /&gt;
&lt;script src="https://gist.github.com/1268490.js?file=build.xml"&gt;
&lt;/script&gt;This OWSM policy have different signing and encryption options on the message of the request / response. So we need to move the right WS security policies / assertions from the Customer WSDL to a Request and Response policy file.&lt;br /&gt;
&lt;br /&gt;
Here is the Request Policy which matches with the&amp;nbsp;oracle/wss10_username_token_with_message_protection_service_policy Server policy. I also added the Rampart Configuration which contains references to the keystore and the username I used. Add the&amp;nbsp;sp:AsymmetricBinding, sp:SignedSupportingTokens and the sp:SignedParts &amp;amp; sp:EncryptedParts of the request from the customer wsdl to this policy file.&lt;br /&gt;
&lt;script src="https://gist.github.com/1268516.js?file=rampart_request.xml"&gt;
&lt;/script&gt;
We also need to do this for the Response. Add the&amp;nbsp;sp:AsymmetricBinding and the sp:SignedParts &amp;amp; sp:EncryptedParts of the response from the customer wsdl to this policy file.&lt;br /&gt;
&lt;script src="https://gist.github.com/1268531.js?file=response_policy.xml"&gt;
&lt;/script&gt;
Because we are using a keystore and a username token ( which got passwords ) we need to add a Password Callback class.&lt;br /&gt;
&lt;script src="https://gist.github.com/1268546.js?file=PWCallback.java"&gt;
&lt;/script&gt;
And here the test client which loads the Axis2 configuration with the Addressing and Rampart modules and also loads the Request and Response policy.&lt;br /&gt;
&lt;script src="https://gist.github.com/1268553.js?file=axis2testclient.java"&gt;
&lt;/script&gt;
Here you can download my code at&amp;nbsp;&lt;a href="https://github.com/biemond/soa11g_examples/tree/master/OWSM_AXIS"&gt;https://github.com/biemond/soa11g_examples/tree/master/OWSM_AXIS&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-2196385146293292330?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/2196385146293292330/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=2196385146293292330" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/2196385146293292330?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/2196385146293292330?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/qp900dM_Kzs/calling-owsm-protected-service-with.html" title="Calling an OWSM protected service with Axis2 and Rampart" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/10/calling-owsm-protected-service-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8HRXgycCp7ImA9WhdUEUs.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-6339518519110655233</id><published>2011-09-27T21:12:00.000+02:00</published><updated>2011-09-28T00:00:34.698+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-28T00:00:34.698+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g soa suite" /><title>Base64 encoding in Oracle BPEL 11g</title><content type="html">Sometimes in SOA Suite 11g you need to pass binary data to a web service reference. In SOA Suite 11g there is no standard XSLT or XPATH function which you can use. But in BEPL you can use embedded java, like &lt;a href="http://blogs.oracle.com/sdhurjati/entry/base_64_encoding"&gt;Sudheer&lt;/a&gt; already blogged about. He used the com.collaxa.common.util.Base64Encoder class which does not exists in 11g so I will use the new oracle.soa.common.util.Base64Encoder class. &lt;br /&gt;
&lt;br /&gt;
As input I will retrieve some xml from the inputVariable, get the xml as a string, encode this and set the value to a base64Binary variable.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1246375.js?file=bpel_base64_encoder.java"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-6339518519110655233?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/6339518519110655233/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=6339518519110655233" title="9 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6339518519110655233?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6339518519110655233?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/Zu1gV0DQqi4/base64-encoding-in-oracle-bpel-11g.html" title="Base64 encoding in Oracle BPEL 11g" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><thr:total>9</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/09/base64-encoding-in-oracle-bpel-11g.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8GQXY6eSp7ImA9WhdVF08.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-8290580655300610676</id><published>2011-09-22T22:53:00.000+02:00</published><updated>2011-09-22T22:53:40.811+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-22T22:53:40.811+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WebLogic" /><category scheme="http://www.blogger.com/atom/ns#" term="SAML" /><title>Virtual Users with SAML in WebLogic</title><content type="html">A small blogpost how you can use virtual users on your SAML Service Provider WebLogic Server. A virtual user is a user who is authenticated on the SAML Identity Provider and this user is transfered ( with all his attributes and roles ) &amp;nbsp;in a SAML Token to the Service Provider, this user does not need to exists on the WebLogic server of the Service Provider.&lt;br /&gt;
Before you can use this feature you need to setup SAML 2.0 SSO on your WebLogic Domain. You can follow &lt;a href="http://biemond.blogspot.com/2009/09/sso-with-weblogic-1031-and-saml2.html"&gt;this blogpost&lt;/a&gt; for all the instructions. You can also do this with Web Services but then you need to follow&lt;a href="http://biemond.blogspot.com/2011/08/do-saml-with-owsm.html"&gt; this guide&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
First we need to enable &lt;b&gt;Generate Attributes&lt;/b&gt; on the Identity Provider Side.&lt;br /&gt;
Go to the myrealm security realm -&amp;gt; &amp;nbsp;Providers -&amp;gt; Credentials Mapping -&amp;gt; your SAML 2.0 Credential Mapping Provider -&amp;gt; Provider Specific.&lt;br /&gt;
Also do this on the imported Service Provider Partner located at the Management tab of your&amp;nbsp;SAML 2.0 Credential Mapping Provider. Open the&amp;nbsp;Service Provider Partner and also enable here&amp;nbsp;&lt;b&gt;Generate Attributes&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Next step is to configure the SAML Service Provider.&lt;br /&gt;
Go to the myrealm security realm -&amp;gt; &amp;nbsp;Providers -&amp;gt;&amp;nbsp;&amp;nbsp;Authentication -&amp;gt; your SAML 2.0 Identity Assertion Provider -&amp;gt; Management Tab. &lt;br /&gt;
Open your imported Identity Provider Partner configuration.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-nSOSWB-qwU0/TnudObofusI/AAAAAAAAEXE/0aedEJxKxVM/s1600/Screen+Shot+2011-09-22+at+10.39.54+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://3.bp.blogspot.com/-nSOSWB-qwU0/TnudObofusI/AAAAAAAAEXE/0aedEJxKxVM/s640/Screen+Shot+2011-09-22+at+10.39.54+PM.png" width="572" /&gt;&lt;/a&gt;&lt;/div&gt;
Enable&lt;b&gt; Virtual User&lt;/b&gt; and also enable &lt;b&gt;Process Attributes&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Now we need to add an extra WebLogic SAML Authentication Provider. This provider will process the virtual user SAML token with all its attributes and roles.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-XQvlJzNIiWk/Tnue40HNxcI/AAAAAAAAEXI/XJ49SzyIUqA/s1600/Screen+Shot+2011-09-22+at+10.47.12+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="338" src="http://1.bp.blogspot.com/-XQvlJzNIiWk/Tnue40HNxcI/AAAAAAAAEXI/XJ49SzyIUqA/s400/Screen+Shot+2011-09-22+at+10.47.12+PM.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
Set the Control Flag to Sufficient also change the other authentication provider from Required to Sufficient.&lt;br /&gt;
&lt;br /&gt;
That's all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-8290580655300610676?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/8290580655300610676/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=8290580655300610676" title="11 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/8290580655300610676?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/8290580655300610676?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/VwKj2gjMyvQ/virtual-users-with-saml-in-weblogic.html" title="Virtual Users with SAML in WebLogic" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-nSOSWB-qwU0/TnudObofusI/AAAAAAAAEXE/0aedEJxKxVM/s72-c/Screen+Shot+2011-09-22+at+10.39.54+PM.png" height="72" width="72" /><thr:total>11</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/09/virtual-users-with-saml-in-weblogic.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8DRHwzeCp7ImA9WhdUGU4.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-8023429814046998635</id><published>2011-09-12T22:07:00.001+02:00</published><updated>2011-10-06T22:44:35.280+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-06T22:44:35.280+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g soa suite" /><category scheme="http://www.blogger.com/atom/ns#" term="web services" /><category scheme="http://www.blogger.com/atom/ns#" term="OWSM" /><category scheme="http://www.blogger.com/atom/ns#" term="Axis" /><title>Calling an OWSM protected service with Axis 1.4 and WSS4J</title><content type="html">Not the whole world uses Fusion Middleware so sometimes it is necessary to call an Oracle Web Service Manager protected Web Service from a different java framework like Apache Axis 1.4 combined with WSS4J 1.5. In this blogpost I will show you the steps how to do this.&lt;br /&gt;
&lt;br /&gt;
First you can't use every OWSM policy with Axis. Oracle made an &lt;a href="http://download.oracle.com/docs/cd/E21764_01/web.1111/e16098/interop_axis.htm#CHDCICGG"&gt;interoperability documentation&lt;/a&gt;&amp;nbsp;page what is possible with Axis 1.4 and OWSM 11g, please check this first.&lt;br /&gt;
&lt;br /&gt;
In this post I will use the &lt;b&gt;oracle/wss10_username_token_with_message_protection_service_policy&lt;/b&gt;&amp;nbsp;OWSM server policy on a protected OSB proxy service and will call this from axis / wss4j and these frameworks will use the following policies UsernameToken, Timestamp, Signature and Encrypt.&lt;br /&gt;
&lt;br /&gt;
In this demo I will used self signed keys and these are generated by the keytool of java 1.6. Basically I create two keystores and exchange the public keys. The server keystore is imported in the OWSM configuration page and the client keystore will be used in Axis.&lt;br /&gt;
&lt;br /&gt;
keytool -genkey -alias serverKey -keyalg "RSA" -sigalg "SHA1withRSA" -dname "CN=server, C=US" -keypass welcome -keystore c:\temp\server.jks -storepass welcome -validity 3650&lt;br /&gt;
&lt;br /&gt;
keytool -genkey -alias clientKey -keyalg "RSA" -sigalg "SHA1withRSA" -dname "CN=client, C=US" -keypass welcome -keystore c:\temp\client_2.jks -storepass welcome  -validity 3650&amp;nbsp;
&lt;br /&gt;
&lt;br /&gt;
keytool -exportcert -alias serverKey -storepass welcome -keystore c:\temp\server.jks -file c:\temp\server.cer&lt;br /&gt;
&lt;br /&gt;
keytool -exportcert -alias clientKey -storepass welcome -keystore c:\temp\client_2.jks -file c:\temp\client.cer&lt;br /&gt;
&lt;br /&gt;
keytool -import -alias serverKey -file c:\temp\server.cer -storepass welcome -keystore c:\temp\client_2.jks
keytool -import -alias clientKey -file c:\temp\client.cer -storepass welcome -keystore c:\temp\server.jks&amp;nbsp;
&lt;br /&gt;
&lt;br /&gt;
keytool -list -storepass welcome -keystore c:\temp\client_2.jks&lt;br /&gt;
keytool -list -storepass welcome -keystore c:\temp\server.jks&lt;br /&gt;
&lt;br /&gt;
For this policy we also need to create a user called osbbook and with password weblogic1 in the myrealm security realm of WebLogic.&lt;br /&gt;
&lt;br /&gt;
The next step is to check if all is fine by creating an OWSM client in Jdeveloper 11g and using the oracle/wss10_username_token_with_message_protection_client_policy OWSM client policy . First generate a web service client and use the following code to check if it works.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1249002.js?file=CustomerManagementSOAPQSPortClient.java"&gt;&lt;/script&gt;
&lt;br /&gt;
If all is fine we can go to the Axis and WSS4J part.&lt;br /&gt;
We need to download the following software frameworks from Apache.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://axis.apache.org/axis/java/releases.html"&gt;Axis 1.4&lt;/a&gt;, not Axis2&lt;/li&gt;
&lt;li&gt;&lt;a href="http://ws.apache.org/wss4j/download.html"&gt;WSS4J 1.5&lt;/a&gt;, Not the 1.6 version&lt;/li&gt;
&lt;li&gt;&lt;a href="http://santuario.apache.org/download.html"&gt;Apache XML Security &lt;/a&gt;for Java 1.4.5&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Download the WSDL and it's XML Schemas of the remote service and fix the schema imports of the WSDL. Put these files in your project folder.&lt;br /&gt;
&lt;br /&gt;
The first step is to generate a Web Service Proxy client based on this WSDL, for this we don't use JAX-WS but we will use the AXIS libraries.&lt;br /&gt;
Here is the ANT build file to generate the Java classes from WSDL with Axis 1.4, &amp;nbsp;I put the build.xml in my project folder of JDeveloper.
&lt;br /&gt;
&lt;script src="https://gist.github.com/1249007.js?file=build.xml"&gt;&lt;/script&gt;
&lt;br /&gt;
Add the following libraries to the project. Wss4j-1.5.12.jar, Axis.jar, Jaxrpc.jar, Saaj.jar, Wsdl4j-1.5.1.jar, Commons-discovery-0.2.jar, Commons-logging-1.0.4.jar, Log4j-1.2.8.jar, Javax.activation_1.1.0.0_1-1.jar, Javax.mail_1.1.0.0_1-4-1.jar ,Xmlsec-1.4.5.jar, Xml-apis-1.3.03.jar, Serializer-2.7.1.jar, Xalan-2.7.1.jar, XercesImpl-2.9.1.jar&lt;br /&gt;
&lt;br /&gt;
We also need to create a security property file called crypto.properties and put this in the src folder. This file contains the keystore path with its keystore password.
&lt;br /&gt;
&lt;script src="https://gist.github.com/1249012.js?file=crypto.properties"&gt;&lt;/script&gt;
&lt;br /&gt;
Create a Password callback class for all the password used in this ws client (  the password of the usernametoken and the keystore passwords )
&lt;br /&gt;
&lt;script src="https://gist.github.com/1249018.js?file=PWCallback.java"&gt;&lt;/script&gt;
We also need an Axis deployment file WSDD with the WSS4J configuration, put this file called client_deployment.wsdd in your project folder.&lt;br /&gt;
&lt;br /&gt;
For the response I need to do the following policies Signature, Timestamp and then Encrypt , this is wrong in the documentation
&lt;br /&gt;
&lt;script src="https://gist.github.com/1249027.js?file=deployment.xml"&gt;&lt;/script&gt;
&lt;br /&gt;
Use the log4j.properties to see all the messages, else you won't see the debug information of WSS4J and Axis 1.4.&lt;br /&gt;
Put this file in the src folder.
&lt;br /&gt;
&lt;script src="https://gist.github.com/1249030.js?file=log4j.properties"&gt;&lt;/script&gt;
&lt;br /&gt;
And at last the Axis test client where we load the client_deployment.wsdd file.
&lt;br /&gt;
&lt;script src="https://gist.github.com/1249032.js?file=Test.java"&gt;&lt;/script&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-8023429814046998635?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/8023429814046998635/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=8023429814046998635" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/8023429814046998635?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/8023429814046998635?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/E-xIof4MSy4/calling-owsm-protected-service-with.html" title="Calling an OWSM protected service with Axis 1.4 and WSS4J" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><thr:total>6</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/09/calling-owsm-protected-service-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkEFQns_eCp7ImA9WhdUEk4.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-7053322221417056703</id><published>2011-09-06T22:19:00.001+02:00</published><updated>2011-09-28T21:36:53.540+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-28T21:36:53.540+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WebLogic" /><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g soa suite" /><category scheme="http://www.blogger.com/atom/ns#" term="web services" /><category scheme="http://www.blogger.com/atom/ns#" term="OWSM" /><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Service Bus" /><title>Using OWSM Kerberos policies</title><content type="html">In this blogpost I will explain how you can use the OWSM ( Oracle Web Service Manager) Kerberos policies in Fusion Middleware 11g. Some of these kerberos policies are compatible with the Window Active Directory KDC and these kerberos tokens can be used for authentication and message protection. It basically&amp;nbsp;works&amp;nbsp;the same as I described in my blog about &lt;a href="http://biemond.blogspot.com/2011/08/single-sign-on-with-windows-kerberos-on.html"&gt;Windows Single Sign On with web applications deployed on WebLogic&lt;/a&gt;. If you want to use OWSM SAML policies instead then you can use &lt;a href="http://biemond.blogspot.com/2011/08/do-saml-with-owsm.html"&gt;this blogpost&lt;/a&gt; and for username tokens or certificates protection you can use &lt;a href="http://biemond.blogspot.com/2011/08/do-saml-with-owsm.html"&gt;this blogpost&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
OWSM support the following Kerberos server policies.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;oracle/wss11_kerberos_token_service_policy&lt;/b&gt;, this can be used for authentication just like the username token policies. It does not encrypt the message and can be used with AD and MIT&lt;/li&gt;
&lt;li&gt;&lt;b&gt;oracle/wss11_kerberos_token_with_message_protection_basic128_service_policy&lt;/b&gt;, besides the authentication it also encrypts the message. This policy works with AD.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;oracle/wss11_kerberos_token_with_message_protection_service_policy&lt;/b&gt;, this policy does the same but only works with MIT.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
For Windows AD we can only use the first two policies.&lt;br /&gt;
&lt;br /&gt;
Before we can start you need to know or do the following&lt;br /&gt;
&lt;br /&gt;
Know the supported encryption types of your Windows Environment. For example Windows XP or Windows 2003 Domain Controller ( not SP1 ) does not support every encryption type.&lt;br /&gt;
&lt;br /&gt;
I got this working with a Windows 7 client and a Windows 2008 R2 Domain Controller and my encryption type is&lt;b&gt;&lt;i&gt;&amp;nbsp;RC4-HMAC-NT&lt;/i&gt;&lt;/b&gt;, which is also supported in Java 1.6&lt;br /&gt;
&lt;br /&gt;
My Active Directory domain = ALFA.LOCAL &amp;nbsp;( always use it in uppercase )&lt;br /&gt;
Make sure that all server can be found in the DNS ( and reverse ) and that the time is synchronized&amp;nbsp;on all machines.&lt;br /&gt;
&lt;br /&gt;
In my test environment I will use 3 servers, The first is my AD 2008 server, second is the OWSM server&amp;nbsp;called soaps3.alfa.local&amp;nbsp;on which we will deploy a kerberos protected JAX-WS service and third is the Web Service Proxy client machine called win7.alfa.local and this has the OWSM kerberos client policy.&lt;br /&gt;
&lt;br /&gt;
We need to create 2 unique service account in Active Directory. In this case &lt;b&gt;soaps3_kerb&lt;/b&gt; and &lt;b&gt;win7_kerb&lt;/b&gt; and make sure that the passwords of these accounts never expires.&lt;br /&gt;
&lt;br /&gt;
On the Windows 2008 DC server I did the following to generate a service account called HTTP/soaps3.alfa.local and map this to soaps3_kerb AD account. Soaps3 is the server hostname of the WebLogic Server.&lt;br /&gt;
&lt;br /&gt;
First generate a keytab file for the HTTP/soaps3.alfa.local@ALFA.LOCAL account,  HTTP is a container ( IIS also uses this convention ) and ALFA.LOCAL is my AD domain.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;ktpass -princ HTTP/soaps3.alfa.local@ALFA.LOCAL -pass Welcome01 -mapuser soaps3_kerb@ALFA.LOCAL -out c:\soaps3.keytab -ptype KRB5_NT_PRINCIPAL -crypto RC4-HMAC-NT&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
copy the generated soaps3.keytab file to the WebLogic machine ( soaps3 )&lt;br /&gt;
I put it in the c:\oracle folder.&lt;br /&gt;
&lt;br /&gt;
Now we need to modify the Service Principal Names with the SPN utility ( Do this on the AD server )&lt;br /&gt;
&lt;b&gt;setSpn -A HTTP/soaps3.alfa.local@ALFA.LOCAL soaps3_kerb&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Now we can do the same for the win7 machine, which will be used as ws client.&lt;br /&gt;
&lt;b&gt;ktpass -princ HTTP/win7.alfa.local@ALFA.LOCAL -pass Welcome01 -mapuser win7_kerb@ALFA.LOCAL -out c:\win7.keytab -ptype KRB5_NT_PRINCIPAL -crypto RC4-HMAC-NT&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
copy the win7.keytab to the oracle folder of the win7 machine&lt;br /&gt;
&lt;b&gt;setSpn -A HTTP/win7.alfa.local win7_kerb&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
On the win7 and soapss3 machine we need to create krb5.ini textfile and put this in c:\windows&lt;br /&gt;
&lt;br /&gt;
ALFA.LOCAL is my AD domain and soaps3 is my WebLogic server and it exists in the alfa.local dns domain.&lt;br /&gt;
ad-win2008r2.alfa.local is my domain controller.&lt;br /&gt;
the krb5.ini for the soaps3 machine&lt;br /&gt;
-------------------&lt;br /&gt;
[libdefaults]&lt;br /&gt;
default_realm = ALFA.LOCAL&lt;br /&gt;
default_tkt_enctypes = rc4-hmac&lt;br /&gt;
default_tgs_enctypes = rc4-hmac&lt;br /&gt;
permitted_enctypes = rc4-hmac&lt;br /&gt;
&lt;br /&gt;
[domain_realm]&lt;br /&gt;
.soaps3.alfa.local = ALFA.LOCAL&lt;br /&gt;
soaps3.alfa.local = ALFA.LOCAL&lt;br /&gt;
&lt;br /&gt;
[realms]&lt;br /&gt;
ALFA.LOCAL = {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; kdc = ad-win2008r2.alfa.local&lt;br /&gt;
&amp;nbsp; &amp;nbsp; admin_server = ad-win2008r2.alfa.local&lt;br /&gt;
&amp;nbsp; &amp;nbsp; default_domain = alfa.local
}&lt;br /&gt;
&lt;br /&gt;
[appdefaults]&lt;br /&gt;
autologin = true&lt;br /&gt;
forward = true&lt;br /&gt;
forwardable = true&lt;br /&gt;
encrypt = true&lt;br /&gt;
&lt;br /&gt;
---------------
&lt;br /&gt;
&lt;br /&gt;
and the win7 machine version.&lt;br /&gt;
-----------------&lt;br /&gt;
&lt;br /&gt;
[libdefaults]&lt;br /&gt;
default_realm = ALFA.LOCAL&lt;br /&gt;
default_tkt_enctypes = rc4-hmac&lt;br /&gt;
default_tgs_enctypes = rc4-hmac&lt;br /&gt;
permitted_enctypes = rc4-hmac&lt;br /&gt;
&lt;br /&gt;
[domain_realm]&lt;br /&gt;
.win7.alfa.local = ALFA.LOCAL&lt;br /&gt;
win7.alfa.local = ALFA.LOCAL&lt;br /&gt;
&lt;br /&gt;
[realms]&lt;br /&gt;
ALFA.LOCAL = {&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;kdc = ad-win2008r2.alfa.local&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;admin_server = ad-win2008r2.alfa.local&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;default_domain = alfa.local&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
------------------&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to the JVM bin folder of the the WebLogic server. This is the soaps3 machine. Here we generate a token.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;cd c:\oracle\jrockit-jdk1.6.0_26-R28\bin&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;kinit HTTP/soaps3.alfa.local@ALFA.LOCAL&lt;/b&gt;&lt;br /&gt;
Provide the password of HTTP/soaps3.alfa.local and the ticket will be stored in your user profile.&lt;br /&gt;
&lt;br /&gt;
Do the same on the win7 machine but then with the use HTTP/win7.alfa.local account.&lt;br /&gt;
&lt;b&gt;cd c:\oracle\jrockit-jdk1.6.0_26-R28\bin&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;kinit HTTP/win7.alfa.local@ALFA.LOCAL&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
That's all for the kerberos configuration on the windows machines. Now we need to do some configuration in the Enterprise Manager and the WebLogic Console.&lt;br /&gt;
&lt;br /&gt;
First we need to configure the kerberos Login module.&lt;br /&gt;
Go the Enterprise Manager (EM) application of the WebLogic server.  Open the WebLogic Domain treenode and select your WebLogic domain. In the Domain menu (right window)  go to Security -&amp;gt; Security Provider Configuration
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-N1GQpOcFJBs/TmZ8XYQL9lI/AAAAAAAAEW0/iKbj_BLqdjg/s1600/Screen+Shot+2011-09-06+at+9.58.57+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="303" src="http://1.bp.blogspot.com/-N1GQpOcFJBs/TmZ8XYQL9lI/AAAAAAAAEW0/iKbj_BLqdjg/s400/Screen+Shot+2011-09-06+at+9.58.57+PM.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Select the krb5.loginmodule and click on the Edit button.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-0zOYhOXZn8M/TmZ8X0l8WYI/AAAAAAAAEW4/fd806QqmPdM/s1600/Screen+Shot+2011-09-06+at+9.59.20+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="229" src="http://1.bp.blogspot.com/-0zOYhOXZn8M/TmZ8X0l8WYI/AAAAAAAAEW4/fd806QqmPdM/s640/Screen+Shot+2011-09-06+at+9.59.20+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Here we need to provide the principal name HTTP/soaps3.alfa.local@ALFA.LOCAL and its keyTab file.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-4Gdm4dQzgv0/TmZ8Yf79W2I/AAAAAAAAEW8/Scr9b-hKyYA/s1600/Screen+Shot+2011-09-06+at+10.00.03+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="638" src="http://1.bp.blogspot.com/-4Gdm4dQzgv0/TmZ8Yf79W2I/AAAAAAAAEW8/Scr9b-hKyYA/s640/Screen+Shot+2011-09-06+at+10.00.03+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
Save and restart the WebLogic server.&lt;br /&gt;
&lt;br /&gt;
After that we need to create a user on the WebLogic domain or configure an AD ldap authenticator.&lt;br /&gt;
The user HTTP/win7.alfa.local must exists on the domain. The password does not matter because it is already authenticated against the AD.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-H_JSJCF7lKM/TmZ8Y_USjLI/AAAAAAAAEXA/mes_s1Ol9Lo/s1600/Screen+Shot+2011-09-06+at+10.01.36+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="232" src="http://4.bp.blogspot.com/-H_JSJCF7lKM/TmZ8Y_USjLI/AAAAAAAAEXA/mes_s1Ol9Lo/s400/Screen+Shot+2011-09-06+at+10.01.36+PM.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
For the server side you can enable the kerberos debugging by adding the following parameter to the EXTRA_JAVA_PROPERTIES parameter in the setDomainEnv.bat of your domain. &amp;nbsp;-Dsun.security.krb5.debug=true&lt;br /&gt;
&lt;br /&gt;
Deploy the following JAX-WS service on the soaps3 server.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1248995.js?file=HelloService.java"&gt;&lt;/script&gt;
&lt;br /&gt;
That's all for the server part, now we can test the web service proxy client on the win7 machine.&lt;br /&gt;
&lt;br /&gt;
On the client you can also set the following project options&amp;nbsp;-Dsun.security.krb5.debug=true to see all the debug information. And off course you can use the HTTP analyzer to see all the traffic.&lt;br /&gt;
&lt;br /&gt;
This is my test client code.
&lt;br /&gt;
&lt;script src="https://gist.github.com/1248997.js?file=HelloServicePortClient.java"&gt;&lt;/script&gt;
&lt;br /&gt;
When you run the test client you should be authenticated and see the output.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-7053322221417056703?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/7053322221417056703/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=7053322221417056703" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/7053322221417056703?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/7053322221417056703?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/m3S4mIgOPsI/using-owsm-kerberos-policies.html" title="Using OWSM Kerberos policies" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-N1GQpOcFJBs/TmZ8XYQL9lI/AAAAAAAAEW0/iKbj_BLqdjg/s72-c/Screen+Shot+2011-09-06+at+9.58.57+PM.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/09/using-owsm-kerberos-policies.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUQDR304eyp7ImA9WhdXGU0.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-4801842565250103637</id><published>2011-09-01T20:56:00.001+02:00</published><updated>2011-09-01T20:56:16.333+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-01T20:56:16.333+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g soa suite" /><category scheme="http://www.blogger.com/atom/ns#" term="EclipseLink" /><title>Using the EJB adapter in SOA Suite 11g</title><content type="html">In Oracle SOA Suite 11g you can use the EJB adapter to expose a Remote interface as a Service or use it in a Reference Service. &amp;nbsp;From PS2 you only need to have an interface jar for the EJB adapter. The interface jar only contains the entities and the Session Bean interfaces (local and remote ) and does not contains the bean or the persistence unit. &amp;nbsp;Off course you can still generate an SDO interface on the EJB Session and use that in the EJB adapter like I did in this&lt;a href="http://biemond.blogspot.com/2009/07/using-ejb-service-reference-in-soa.html"&gt; blogpost&lt;/a&gt; but this is not&amp;nbsp;necessary.&lt;br /&gt;
&lt;br /&gt;
In this blogpost I will focus on how to use the EJB adapter as a reference service. With this you can think of replacing your database adapters. &amp;nbsp;Off course you can make some composites in which you expose some database adapters for optimal reuse but maybe it is easier to use an EJB Session Bean deployed on a model tier which can cache your data, is cluster aware and can be also used by your Java (Web) applications.&lt;br /&gt;
&lt;br /&gt;
We start by dropping an EJB adapter on the reference side of the composite. &amp;nbsp;Lookup the interface jar and provide the remote interface class. Add some text to the JNDI Name, we need to delete this entry and replace it with the right value ( a jdeveloper bug)&lt;br /&gt;
&lt;br /&gt;
Choose for the JAVA interface else you need to have an EJB Session Bean with a SDO interface.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-GGcNPgbtJtY/Tl_C4dOIAfI/AAAAAAAAEV8/kYuEbnfpXa0/s1600/ejb_adapter_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="336" src="http://1.bp.blogspot.com/-GGcNPgbtJtY/Tl_C4dOIAfI/AAAAAAAAEV8/kYuEbnfpXa0/s400/ejb_adapter_1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
After the creation of the EJB adapter you can select the adapter and optional add some properties( in the property window ) like the java.naming.provider.url in case when the EJB Session Bean is not deployed on the SOA Suite server.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-25z0az78NUU/Tl_C47wAcUI/AAAAAAAAEWA/Qrscb1ktS7k/s1600/ejb_adapter_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="360" src="http://3.bp.blogspot.com/-25z0az78NUU/Tl_C47wAcUI/AAAAAAAAEWA/Qrscb1ktS7k/s400/ejb_adapter_2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now go the source mode of your composite where we fix the JNDI url. Delete the uri attribute of the binding.ejb element.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-eghIlEQ4rOU/Tl_C5a7mAdI/AAAAAAAAEWE/xebxEXkRYs4/s1600/ejb_adapter_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="150" src="http://3.bp.blogspot.com/-eghIlEQ4rOU/Tl_C5a7mAdI/AAAAAAAAEWE/xebxEXkRYs4/s640/ejb_adapter_3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now we need to add the JNDI name of your EJB Session Bean to the ejb binding. You can select the binding.ejb element and add the jndi url in the property window.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-uK7GfpW-79U/Tl_C508ypyI/AAAAAAAAEWI/m8jvKSBIfws/s1600/ejb_adapter_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="223" src="http://1.bp.blogspot.com/-uK7GfpW-79U/Tl_C508ypyI/AAAAAAAAEWI/m8jvKSBIfws/s400/ejb_adapter_4.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
It need to have the jndiName attribute and not the uri attribute.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/--ENvs7GX0SI/Tl_C6BN8g7I/AAAAAAAAEWM/Haaj6Iyp_Lk/s1600/ejb_adapter_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="130" src="http://4.bp.blogspot.com/--ENvs7GX0SI/Tl_C6BN8g7I/AAAAAAAAEWM/Haaj6Iyp_Lk/s640/ejb_adapter_5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
That's all for the EJB adapter but to use it in a Service Component we need to follow the rules of exposing a java class as a web service. The bottom up approach with JAX-WS like I describe in &lt;a href="http://biemond.blogspot.com/2011/08/expose-your-session-bean-with-jax-ws.html"&gt;this blogpost&lt;/a&gt;. This is also necessary when you use the EJB transport in the OSB.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
We start with the Remote Interface of the EJB Session bean. With the JAX-WS annotations like WebParam, WebMethod or WebResult we can control and influence the WSDL generation. &amp;nbsp;This WSDL will be used by the Service Components.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-DDpf-CJJBWc/Tl_C6xkLoXI/AAAAAAAAEWU/AkpoHsU_4mM/s1600/ejb_adapter_6_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="306" src="http://4.bp.blogspot.com/-DDpf-CJJBWc/Tl_C6xkLoXI/AAAAAAAAEWU/AkpoHsU_4mM/s640/ejb_adapter_6_5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
If we don't do this you will get arg0 as argument name and return as Response element.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-fz2GHrBB0ro/Tl_C7VCQcKI/AAAAAAAAEWY/Cp-QJ0ekmTM/s1600/ejb_adapter_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="364" src="http://2.bp.blogspot.com/-fz2GHrBB0ro/Tl_C7VCQcKI/AAAAAAAAEWY/Cp-QJ0ekmTM/s640/ejb_adapter_7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
With JPA you can have a reference&amp;nbsp;entity&amp;nbsp;attribute between two entities. For example the employee entity has a department attribute and department has a collection of employees. With this you can create a loop in loading employee and department entities. JPA don't allow this and you can control it with eager of lazy loading.&lt;br /&gt;
For JAX-WS and the EJB adapter you need to decide where you want to stop this loading by adding the XmlTransient attribute to a getter. So in this example you can add this to the getDepartment method of the employee entity or add this to the getEmployees of the department entity.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-CxUD7OxfWgc/Tl_C7r7MXEI/AAAAAAAAEWc/6xStNuAOZdE/s1600/ejb_adapter_8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="203" src="http://4.bp.blogspot.com/-CxUD7OxfWgc/Tl_C7r7MXEI/AAAAAAAAEWc/6xStNuAOZdE/s400/ejb_adapter_8.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
In the WSDL you can see that the employee does not have the department element.
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-JYPSM0nxNwU/Tl_C6omQqzI/AAAAAAAAEWQ/jLW9G7mf16s/s1600/ejb_adapter_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="379" src="http://2.bp.blogspot.com/-JYPSM0nxNwU/Tl_C6omQqzI/AAAAAAAAEWQ/jLW9G7mf16s/s640/ejb_adapter_6.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The last important thing is, to avoid the use of java.util.Date, Timestamp or java.sql.Date. This will be ignored by the EJB adapter. You need to use Calendar as java type.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-3_401Vy25OQ/Tl_C8F_Qa1I/AAAAAAAAEWg/DprDEQSL_A0/s1600/ejb_adapter_9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="252" src="http://1.bp.blogspot.com/-3_401Vy25OQ/Tl_C8F_Qa1I/AAAAAAAAEWg/DprDEQSL_A0/s640/ejb_adapter_9.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-4801842565250103637?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/4801842565250103637/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=4801842565250103637" title="9 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/4801842565250103637?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/4801842565250103637?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/UAI2B32gPNI/using-ejb-adapter-in-soa-suite-11g.html" title="Using the EJB adapter in SOA Suite 11g" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-GGcNPgbtJtY/Tl_C4dOIAfI/AAAAAAAAEV8/kYuEbnfpXa0/s72-c/ejb_adapter_1.png" height="72" width="72" /><thr:total>9</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/09/using-ejb-adapter-in-soa-suite-11g.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cNRH45fip7ImA9WhdXE0Q.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-6718640243609854809</id><published>2011-08-26T23:40:00.004+02:00</published><updated>2011-08-26T23:44:55.026+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-26T23:44:55.026+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WebLogic" /><category scheme="http://www.blogger.com/atom/ns#" term="adf" /><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g" /><category scheme="http://www.blogger.com/atom/ns#" term="OWSM" /><category scheme="http://www.blogger.com/atom/ns#" term="adf security" /><title>Single Sign On with windows / kerberos on WebLogic</title><content type="html">In this blogspot I will show you the steps I did to achieve SSO kerberos windows authentication on an ADF or a Web Application deployed on a WebLogic application server.&lt;br /&gt;
&lt;br /&gt;
Before we can start you should know the supported encryption types of your Windows Environment. For example Windows XP or Windows 2003 Domain Controller ( not SP1 ) does not support every encryption type.&lt;br /&gt;
&lt;br /&gt;
I got this working with a Windows 7 client and a Windows 2008 R2 Domain Controller and my encryption type is&lt;b&gt;&lt;i&gt; RC4-HMAC-NT&lt;/i&gt;&lt;/b&gt;, which is also supported in Java 1.6&lt;br /&gt;
&lt;br /&gt;
My Active Directory domain = ALFA.LOCAL &amp;nbsp;( always use it in uppercase )&lt;br /&gt;
&lt;br /&gt;
Make sure that all server can be found in the DNS ( and reverse ) &amp;nbsp;and that the time is synchronized&amp;nbsp;on all machines.&lt;br /&gt;
&lt;br /&gt;
We start by creating a unique service account ( it must not exists, not as computer and not as an user ), in my case is that&amp;nbsp;&lt;b&gt;&lt;i&gt;soaps3_kerb&lt;/i&gt;&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-MKZ7FTRUNLc/Tlf9xe1Fs0I/AAAAAAAAEVI/vmD0NMbymd4/s1600/kerberos_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="590" src="http://3.bp.blogspot.com/-MKZ7FTRUNLc/Tlf9xe1Fs0I/AAAAAAAAEVI/vmD0NMbymd4/s640/kerberos_1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I used &lt;b&gt;&lt;i&gt;Welcome01&lt;/i&gt;&lt;/b&gt; as password and make sure that the password never expires.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-z6MZqLAUr7Y/Tlf9xwzCWNI/AAAAAAAAEVM/8nqtG0NvfDY/s1600/kerberos_1_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="268" src="http://1.bp.blogspot.com/-z6MZqLAUr7Y/Tlf9xwzCWNI/AAAAAAAAEVM/8nqtG0NvfDY/s320/kerberos_1_2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
On the Windows 2008 DC server I did the following to generate a service account called&amp;nbsp;&lt;b&gt;&lt;i&gt;HTTP/soaps3.alfa.local&lt;/i&gt;&lt;/b&gt;&amp;nbsp;and map this to&amp;nbsp;&lt;b&gt;&lt;i&gt;soaps3_kerb&lt;/i&gt;&lt;/b&gt; AD account. soaps3 is the server name of the WebLogic Server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First generate a keytab file for the&amp;nbsp;HTTP/soaps3.alfa.local@ALFA.LOCAL account, &amp;nbsp;HTTP is a container ( IIS also uses this convention ) and ALFA.LOCAL is my AD domain.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;ktpass -princ HTTP/soaps3.alfa.local@ALFA.LOCAL -pass Welcome01 -mapuser soaps3_kerb@ALFA.LOCAL -out c:\soaps3.keytab -ptype KRB5_NT_PRINCIPAL -crypto RC4-HMAC-NT&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
my output&lt;br /&gt;
Targeting domain controller: AD-WIN2008R2.alfa.local&lt;br /&gt;
&lt;br /&gt;
Using legacy password setting method&lt;br /&gt;
Successfully mapped HTTP/soaps3.alfa.local to soaps3_kerb.Key created.&lt;br /&gt;
Output keytab to c:\soaps3.keytab:&lt;br /&gt;
Keytab version: 0x502&lt;br /&gt;
keysize 68 HTTP/soaps3.alfa.local@ALFA.LOCAL ptype 1 (KRB5_NT_PRINCIPAL) vno 3 etype 0x17 (RC4-HMAC) keylength 16 (0x1d863479e1ab3bd62a2bfafa1abaa2dd)&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
copy the generated &lt;b&gt;&lt;i&gt;soaps3.keytab &lt;/i&gt;&lt;/b&gt;file to the WebLogic machine. I put it in the &lt;b&gt;&lt;i&gt;c:\oracle&lt;/i&gt;&lt;/b&gt; folder.&lt;br /&gt;
&lt;br /&gt;
Now we need to modify the Service Principal Names with the SPN utility.&lt;br /&gt;
&lt;b&gt;&lt;i&gt;setSpn -A HTTP/soaps3.alfa.local@ALFA.LOCAL soaps3_kerb&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
my output&lt;br /&gt;
Registering ServicePrincipalNames for CN=soaps3_kerb,CN=Users,DC=alfa,DC=local&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HTTP/soaps3.alfa.local@ALFA.LOCAL&lt;br /&gt;
Updated object&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
Now we can continue with the WebLogic Server configuration.&lt;br /&gt;
&lt;br /&gt;
Start by making create a text file called &lt;b&gt;&lt;i&gt;krb5.ini&lt;/i&gt;&lt;/b&gt; and put it in &lt;b&gt;&lt;i&gt;c:\windows&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
ALFA.LOCAL is my AD domain and soaps3 is my WebLogic server and it exists in the alfa.local dns domain. &amp;nbsp;ad-win2008r2.alfa.local is my domain controller.&lt;br /&gt;
-------------------&lt;br /&gt;
&lt;br /&gt;
[libdefaults]&lt;br /&gt;
default_realm = ALFA.LOCAL&lt;br /&gt;
default_tkt_enctypes = rc4-hmac&lt;br /&gt;
default_tgs_enctypes = rc4-hmac&lt;br /&gt;
permitted_enctypes = rc4-hmac&lt;br /&gt;
&lt;br /&gt;
[domain_realm]&lt;br /&gt;
.soaps3.alfa.local = ALFA.LOCAL&lt;br /&gt;
soaps3.alfa.local = ALFA.LOCAL&lt;br /&gt;
.alfa.local = ALFA.LOCAL&lt;br /&gt;
alfa.local = ALFA.LOCAL&lt;br /&gt;
&lt;br /&gt;
[realms]&lt;br /&gt;
ALFA.LOCAL = {&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;kdc = ad-win2008r2.alfa.local&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;admin_server = ad-win2008r2.alfa.local&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;default_domain = alfa.local&lt;br /&gt;
}&lt;br /&gt;
[appdefaults]&lt;br /&gt;
autologin = true&lt;br /&gt;
forward = true&lt;br /&gt;
forwardable = true&lt;br /&gt;
encrypt = true&lt;br /&gt;
&lt;br /&gt;
---------------&lt;br /&gt;
&lt;br /&gt;
On the soaps3 WebLogic machine we need to create a new Kerberos ticket which will be used by WebLogic.&lt;br /&gt;
&lt;br /&gt;
First let's flush the current ones&lt;br /&gt;
go to c:\ ( not in the java bin folder )&lt;br /&gt;
&lt;b&gt;&lt;i&gt;klist purge&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
go to the bin folder of your java home ( jdk )&lt;br /&gt;
cd c:\oracle\jrockit-jdk1.6.0_26-R28\bin&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;kinit HTTP/soaps3.alfa.local@ALFA.LOCAL&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
My output&lt;br /&gt;
Password for HTTP/soaps3.alfa.local@ALFA.LOCAL:&lt;br /&gt;
New ticket is stored in cache file C:\Users\admin\krb5cc_admin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This should work and it will use the &lt;b&gt;&lt;i&gt;krb5.ini &lt;/i&gt;&lt;/b&gt;located at &lt;b&gt;&lt;i&gt;c:\windows&lt;/i&gt;&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create or change an application with ADF Security or a normal Web Application which got security enabled.&amp;nbsp;Open the &lt;b&gt;&lt;i&gt;web.xml&lt;/i&gt;&lt;/b&gt; and change the&amp;nbsp;auth-method to &lt;b&gt;&lt;i&gt;CLIENT-CERT&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;lt;login-config&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;auth-method&amp;gt;CLIENT-CERT&amp;lt;/auth-method&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;/login-config&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Deploy the application to the WebLogic Server.&lt;br /&gt;
&lt;br /&gt;
Open the WebLogic console application and go to myrealm &lt;b&gt;&lt;i&gt;security realm -&amp;amp;gt; providers -&amp;amp;gt; authentication&lt;/i&gt;&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
create a &lt;b&gt;&lt;i&gt;NegotiateIdentityAsserter &lt;/i&gt;&lt;/b&gt;called Microsoft.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-tw-fYUJoE3o/TlgMhTcZgYI/AAAAAAAAEVc/ENJGBU8mm5s/s1600/kerberos_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="278" src="http://3.bp.blogspot.com/-tw-fYUJoE3o/TlgMhTcZgYI/AAAAAAAAEVc/ENJGBU8mm5s/s400/kerberos_5.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Open the&amp;nbsp;NegotiateIdentityAsserter and go to Provider Specific and de-select &lt;b&gt;&lt;i&gt;Form Based Negotiation Enabled&lt;/i&gt;&lt;/b&gt;.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-Z2wzoLIXUSs/TlgMjPvWSDI/AAAAAAAAEVg/0EFSwfjRvME/s1600/kerberos_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="212" src="http://1.bp.blogspot.com/-Z2wzoLIXUSs/TlgMjPvWSDI/AAAAAAAAEVg/0EFSwfjRvME/s400/kerberos_6.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Next step is to create a kerberos login configuration which will be read by WebLogic.&lt;br /&gt;
Create a text file called&lt;b&gt;&amp;nbsp;&lt;i&gt;kerberos.login&lt;/i&gt;&lt;/b&gt; located in the &lt;b&gt;&lt;i&gt;c:\oracle&lt;/i&gt;&lt;/b&gt;. This is the content which will work with Java 1.6&lt;br /&gt;
-------&lt;br /&gt;
&lt;br /&gt;
com.sun.security.jgss.krb5.initiate {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;com.sun.security.auth.module.Krb5LoginModule required&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;principal="&lt;b&gt;&lt;i&gt;HTTP/soaps3.alfa.local@ALFA.LOCAL&lt;/i&gt;&lt;/b&gt;"&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;useKeyTab=true&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;keyTab="&lt;b&gt;&lt;i&gt;c:/oracle/soaps3.keytab&lt;/i&gt;&lt;/b&gt;"&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;storeKey=true&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;debug=true;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
com.sun.security.jgss.krb5.accept {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;com.sun.security.auth.module.Krb5LoginModule required&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;principal="&lt;b&gt;&lt;i&gt;HTTP/soaps3.alfa.local@ALFA.LOCAL&lt;/i&gt;&lt;/b&gt;"&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;useKeyTab=true&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;keyTab="&lt;b&gt;&lt;i&gt;c:/oracle/soaps3.keytab&lt;/i&gt;&lt;/b&gt;"&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;storeKey=true&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;debug=true;&lt;br /&gt;
};&lt;br /&gt;
-------&lt;br /&gt;
&lt;br /&gt;
Add the following parameters to the EXTRA_JAVA_PROPERTIES in the setDomainEnv.bat of your domain.&lt;br /&gt;
&lt;b&gt;&lt;i&gt;-Dsun.security.krb5.debug=true&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;-Djavax.security.auth.useSubjectCredsOnly=false&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;-Djava.security.auth.login.config=C:/oracle/kerberos.login&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;-Djava.security.krb5.realm=ALFA.LOCAL&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;-Djava.security.krb5.kdc=ad-win2008r2.alfa.local&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are finished with the WebLogic and the AD configuration. &lt;br /&gt;
&lt;br /&gt;
Just add the login name of the window user and its groups to the myrealm security realm, so you can test the Web Application.&lt;br /&gt;
&lt;br /&gt;
Log on a machine which is part of your AD domain.&lt;br /&gt;
&lt;br /&gt;
use Internet Explorer and trust the weblogic site and enable authentication in the advanced options of IE.&lt;br /&gt;
or&lt;br /&gt;
use Google Chrome and start chrome.exe with the following parameter &lt;i style="font-weight: bold;"&gt;--args --auth-server-whitelist="*alfa.local" &lt;/i&gt;This allows SSO with chrome.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-6718640243609854809?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/6718640243609854809/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=6718640243609854809" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6718640243609854809?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6718640243609854809?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/hE64EgEoKlQ/single-sign-on-with-windows-kerberos-on.html" title="Single Sign On with windows / kerberos on WebLogic" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-MKZ7FTRUNLc/Tlf9xe1Fs0I/AAAAAAAAEVI/vmD0NMbymd4/s72-c/kerberos_1.png" height="72" width="72" /><thr:total>4</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/08/single-sign-on-with-windows-kerberos-on.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMGSXo7fip7ImA9WhdUEk4.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-8869609433493251201</id><published>2011-08-22T23:35:00.001+02:00</published><updated>2011-09-28T21:33:48.406+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-28T21:33:48.406+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WebLogic" /><category scheme="http://www.blogger.com/atom/ns#" term="SAML" /><category scheme="http://www.blogger.com/atom/ns#" term="web services" /><category scheme="http://www.blogger.com/atom/ns#" term="OWSM" /><title>Do SAML with OWSM</title><content type="html">In this blogpost I will explain the different SAML options and the advanced configurations you can do when you use the SAML client and server policies of Oracle Web Service Manager FMW 11gR1. &lt;br /&gt;
The following will be explained and configured in this blogpost.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;A basic SAML authentication with 2 OWSM Servers.&lt;/li&gt;
&lt;li&gt;Change the default SAML issuer name.&lt;/li&gt;
&lt;li&gt;Allow only trusted SAML clients.&lt;/li&gt;
&lt;li&gt;SAML Identity switching.&lt;/li&gt;
&lt;li&gt;Virtual Users with User roles.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span class="Apple-style-span" style="font-size: large;"&gt;Creating a working SAML setup.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
For this we need two WebLogic domains and both have at least the Enterprise Manager web application and enabled the OWSM option. For this demo I will have one domain with SOA Suite and one with only a WebLogic Adminserver where we will deploy a JAX-WS Web Service which has an OWSM server policy. You can replace the SOA Suite with a OSB server ( it works in the same way ) . For OWSM, every domain need to have it's own MDS repository to store all the OWSM policies and for SOA Suite you also need a soa-infra database repos.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This will be our setup.&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;A client ( soapUI or WS client proxy ) calls an exposed web service of a SOA Suite composite and the client needs to provide a username token.&lt;/li&gt;
&lt;li&gt;The exposed service has &lt;b&gt;oracle/wss_username_token_service_policy&lt;/b&gt; as OWSM Server policy. The username token will be validated by WebLogic and the username will be passed on by SAML and signed with the signing certificate of the SOA Suite OWSM. The exposed service has a wire to a Mediator with a simple routing rule.&lt;/li&gt;
&lt;li&gt;The Mediator has a wire to the Reference Web Service. This reference WS binding has&amp;nbsp;&lt;b&gt;oracle/wss11_saml_token_with_message_protection_client_policy&lt;/b&gt; as OWSM client policy.&lt;/li&gt;
&lt;li&gt;The Reference WS binding calls a JAX-WS Web Service deployed on the other WebLogic Domain and this Web Service has&amp;nbsp;&lt;b&gt;oracle/wss11_saml_token_with_message_protection_service_policy&lt;/b&gt; as OWSM server policy. OWSM will validate the SAML issuer and check if it knows the username ( the password does not matter, because it is trusted )&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
The SOA Composite I used.&lt;/div&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-po_5n4Ike38/TlKuzr0DXdI/AAAAAAAAET8/tsMJZoENC5Y/s1600/saml_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="337" src="http://1.bp.blogspot.com/-po_5n4Ike38/TlKuzr0DXdI/AAAAAAAAET8/tsMJZoENC5Y/s640/saml_1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The JAX-WS service&lt;/div&gt;
&lt;script src="https://gist.github.com/1248981.js?file=HelloService.java"&gt;&lt;/script&gt;
&lt;div&gt;
Before we can test this SAML service, we need to generate some keystores, configure OWSM and add some users to WebLogic. &lt;br /&gt;
Execute the following commands to generate some self signed private keys and exchange the public keys ( this will trust each other certificates )&lt;br /&gt;
&lt;br /&gt;
Go to the bin folder of your JDK.&lt;br /&gt;
&lt;b&gt;cd c:\oracle\jrockit-jdk1.6.0_26-R28\bin&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Generate a certificate for SOA ( server.jks ) and one for the JAX-WS server ( &amp;nbsp;saml.jks )&lt;br /&gt;
&lt;b&gt;keytool -genkey -alias serverKey -keyalg "RSA" -sigalg "SHA1withRSA" -dname "CN=server, C=US" -keypass welcome -keystore c:\temp\server.jks -storepass welcome -validity 3650&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;keytool -genkey -alias samlKey -keyalg "RSA" -sigalg "SHA1withRSA" -dname "CN=saml, C=US" -keypass welcome -keystore c:\temp\saml.jks -storepass welcome &amp;nbsp;-validity 3650&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Export the public key&lt;br /&gt;
&lt;b&gt;keytool -exportcert -alias serverKey -storepass welcome -keystore c:\temp\server.jks -file c:\temp\server.cer&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;keytool -exportcert -alias samlKey -storepass welcome -keystore c:\temp\saml.jks -file c:\temp\saml.cer&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Import the keys in each other keystore ( for the trust (&lt;br /&gt;
&lt;b&gt;keytool -import -alias serverKey -file c:\temp\server.cer -storepass welcome -keystore c:\temp\saml.jks&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;keytool -import -alias samlKey -file c:\temp\saml.cer -storepass welcome -keystore c:\temp\server.jks&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Show the certificates in each keystore.&lt;br /&gt;
&lt;b&gt;keytool -list -storepass welcome -keystore c:\temp\server.jks&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;keytool -list -storepass welcome -keystore c:\temp\saml.jks&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Copy the server.jks to the config\fmwconfig folder of your SOA Suite domain. Do the same for the saml.jks keystore but then to fmwconfig of the JAX-WS server domain.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Go the Enterprise Manager (EM) application of the SOA Suite. &amp;nbsp;Open the WebLogic Domain treenode and select your SOA domain. In the Domain menu (right window) &amp;nbsp;go to &lt;b&gt;&lt;i&gt;Security &lt;/i&gt;&lt;/b&gt;-&amp;amp;amp;gt; &lt;b&gt;&lt;i&gt;Security Provider Configuration&lt;/i&gt;&lt;/b&gt;. Click on the &lt;b&gt;Configure &lt;/b&gt;button in the keystore section.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-qa0FEnw4CYo/TlK0w4J17LI/AAAAAAAAEUA/19c8Qq7tRAo/s1600/saml_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="290" src="http://4.bp.blogspot.com/-qa0FEnw4CYo/TlK0w4J17LI/AAAAAAAAEUA/19c8Qq7tRAo/s640/saml_2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
Use &lt;b&gt;./server.jks&lt;/b&gt; in the Keystore Path field and &lt;b&gt;serverKey &lt;/b&gt;in the Key and Crypt Alias. Use &lt;b&gt;welcome &lt;/b&gt;for all the password fields.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We need to do the same at the JAX-WS server but then use the following values.&lt;/div&gt;
&lt;div&gt;
Use&amp;nbsp;&lt;b&gt;./saml.jks&lt;/b&gt;&amp;nbsp;in the Keystore Path field and&amp;nbsp;&lt;b&gt;samlKey&amp;nbsp;&lt;/b&gt;in the Key and Crypt Alias. Use&amp;nbsp;&lt;b&gt;welcome&amp;nbsp;&lt;/b&gt;for all the password fields.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Add a user with &lt;b&gt;client&amp;nbsp;&lt;/b&gt;as name and with &lt;b&gt;weblogic1 &lt;/b&gt;as password in the myrealm security realm of the SOA Suite server. Do the same at the JAX-WS server but now use &lt;b&gt;welcome1 &lt;/b&gt;as password.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Do a restart of the all the servers.&lt;br /&gt;
&lt;br /&gt;
We can test the SAML setup by generating a Web Service Client proxy in JDeveloper. Here is an example how I add the client credentials.&lt;br /&gt;
&lt;script src="https://gist.github.com/1248986.js?file=Test.java"&gt;&lt;/script&gt;
&lt;br /&gt;
that is all for the basic SAML test.&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;How to change the&amp;nbsp;SAML issuer name.&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
The default SAML issuer name is www.oracle.com , We can change this at the JAX-WS server. For this we need to go the EM application of the JAX-WS Server.&amp;nbsp;Open the WebLogic Domain treenode and select your JAX-WS domain. In the Domain menu (right window) &amp;nbsp;go to &lt;b&gt;&lt;i&gt;Security&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;-&amp;gt;&lt;/i&gt;&lt;/b&gt;&amp;nbsp;&lt;b&gt;&lt;i&gt;Security Provider Configuration&lt;/i&gt;&lt;/b&gt;. Click on the Configure button in the Advanced section.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-jvmHJHS3cyk/TlK7aCE6QRI/AAAAAAAAEUE/9mN-XTqMZ7Y/s1600/saml_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="330" src="http://3.bp.blogspot.com/-jvmHJHS3cyk/TlK7aCE6QRI/AAAAAAAAEUE/9mN-XTqMZ7Y/s640/saml_3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Here we can change the name attribute of &lt;b&gt;saml.trusted.issuers.1&lt;/b&gt; property to www.amis.nl and click on Ok.&amp;nbsp;This way you will change the default trusted issuer for all the SAML login modules, if you only want to change this for SAML1.1 and not for SAML2 then you can open the saml.loginmodule instead (located at the Security Provider Configuration) and change it there. This will add an extra saml property name beside the one of www.oracle.com&lt;br /&gt;
You will need to restart the WebLogic server.&lt;br /&gt;
&lt;br /&gt;
We also need to change an attribute on the reference web service binding of the SOA Composite. Select the reference binding and right click, to open the Configure WS Policies menu.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-91uHgoi5EnU/TlK9JODH3fI/AAAAAAAAEUI/9QduwdMT-_A/s1600/saml_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-91uHgoi5EnU/TlK9JODH3fI/AAAAAAAAEUI/9QduwdMT-_A/s320/saml_4.png" width="292" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Click on the pencil to override the saml.issuer.name and use www.amis.nl&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-f5QJsceBDEQ/TlK9nfJ9cjI/AAAAAAAAEUM/64GJNirrwH4/s1600/saml_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="241" src="http://4.bp.blogspot.com/-f5QJsceBDEQ/TlK9nfJ9cjI/AAAAAAAAEUM/64GJNirrwH4/s640/saml_5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Deploy the composite and re-test it with the jdeveloper ws proxy client.&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: large;"&gt;Allow only trusted SAML clients&lt;/span&gt;&lt;br /&gt;
In the current setup each public key found in the saml.jks keystore can sign a SAML token. In this part we can restrict this to only "CN=server, C=US", this is the DN of the signing certificate located at the SOA Suite server.&lt;br /&gt;
&lt;br /&gt;
Go the Enterprise Manager (EM) application of the JAX-WS Server. &amp;nbsp;Open the WebLogic Domain treenode and select your JAX-WS domain. In the Domain menu (right window) &amp;nbsp;go to &lt;b&gt;&lt;i&gt;Web Services&lt;/i&gt;&lt;/b&gt;&amp;nbsp;&lt;b&gt;&lt;i&gt;-&amp;gt;&lt;/i&gt;&lt;/b&gt;&amp;nbsp;&lt;b&gt;&lt;i&gt;Platform Policy Configuration&lt;/i&gt;&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Go to the Trusted SAML clients Tab and add a new Trusted Issuer called www.amis.nl .&lt;br /&gt;
Select the just created Trusted Issuer and add a Trusted SAML Client and use&amp;nbsp;&lt;b&gt;&lt;i&gt;CN=server, C=US&lt;/i&gt;&lt;/b&gt; as value.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-PChxZFCtwSE/TlLAEr3s8eI/AAAAAAAAEUU/aaN40vluFkI/s1600/saml_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="448" src="http://2.bp.blogspot.com/-PChxZFCtwSE/TlLAEr3s8eI/AAAAAAAAEUU/aaN40vluFkI/s640/saml_6.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Restart the JAX-WS Server and now only&amp;nbsp;&lt;b&gt;&lt;i&gt;CN=server, C=US&lt;/i&gt;&lt;/b&gt; can sign the SAML token.&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: large;"&gt;SAML Identity switching&lt;/span&gt;&lt;br /&gt;
In the last part of this blogpost we will change the identity of the SAML token. In the previous examples we used &lt;b&gt;&lt;i&gt;client &lt;/i&gt;&lt;/b&gt;as username and this is passed on to the JAX-WS server. &amp;nbsp;We will override this on the SOA Suite server. &amp;nbsp;In our test client we can now use &lt;b&gt;&lt;i&gt;weblogic &lt;/i&gt;&lt;/b&gt;as username and override to &lt;b&gt;&lt;i&gt;client&lt;/i&gt;&lt;/b&gt; in the SOA Composite.&lt;br /&gt;
Open the Mediator of the &amp;nbsp;SOA Composite where we will add an Assign to the request part of the Routing Rule.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-icnhXrx7ois/TlLDf-4hHII/AAAAAAAAEUY/MZ48_P_5M8w/s1600/saml_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="350" src="http://2.bp.blogspot.com/-icnhXrx7ois/TlLDf-4hHII/AAAAAAAAEUY/MZ48_P_5M8w/s640/saml_7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Here we need to add the &lt;b&gt;&lt;i&gt;javax.xml.ws.security.auth.username&lt;/i&gt;&lt;/b&gt; property with &lt;b&gt;&lt;i&gt;client &lt;/i&gt;&lt;/b&gt;as value.&lt;br /&gt;
&lt;br /&gt;
We also need to change the OWSM client policy to oracle/wss11_saml_token_identity_switch_with_message_protection_client_policy on the reference web service binding.&lt;br /&gt;
&lt;br /&gt;
Deploy your composite.&lt;br /&gt;
&lt;br /&gt;
Too bad, this is not enough we also need to give my SOA Composite the right permissions to do identity switching. Go the Enterprise Manager (EM) application of the SOA Suite. &amp;nbsp;Open the WebLogic Domain treenode and select your SOA domain. In the Domain menu (right window) &amp;nbsp;go to &lt;b&gt;&lt;i&gt;Security&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;-&amp;gt;&lt;/i&gt;&lt;/b&gt;&amp;nbsp;&lt;b&gt;&lt;i&gt;System Policies&lt;/i&gt;&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Select Codebase as Type and search. Select a Codebase policy and do Create Like.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-QARHKvcHsHc/TlLG-1_Fa4I/AAAAAAAAEUc/BFk1cHod2Lc/s1600/saml_8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="330" src="http://1.bp.blogspot.com/-QARHKvcHsHc/TlLG-1_Fa4I/AAAAAAAAEUc/BFk1cHod2Lc/s640/saml_8.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Use&amp;nbsp;&lt;b&gt;&lt;i&gt;file:${common.components.home}/modules/oracle.wsm.agent.common_11.1.1/wsm-agent-core.jar&lt;/i&gt;&lt;/b&gt; as value in the Codebase field and click on Edit.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-X19AqyLEFVI/TlLG_nVvzYI/AAAAAAAAEUg/ig3oezu8_ig/s1600/saml_9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="270" src="http://2.bp.blogspot.com/-X19AqyLEFVI/TlLG_nVvzYI/AAAAAAAAEUg/ig3oezu8_ig/s640/saml_9.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Enter &lt;b&gt;&lt;i&gt;oracle.wsm.security.WSIdentityPermission&lt;/i&gt;&lt;/b&gt; in the Permission Class field. The action is always &lt;b&gt;&lt;i&gt;assert&lt;/i&gt;&lt;/b&gt;. The Resource Name is your Composite Name which does the identity switching.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-vuTSX-lf-Ww/TlLHAcjF-GI/AAAAAAAAEUk/vNAU5GC7b8o/s1600/saml_10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="162" src="http://3.bp.blogspot.com/-vuTSX-lf-Ww/TlLHAcjF-GI/AAAAAAAAEUk/vNAU5GC7b8o/s400/saml_10.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: large;"&gt;Virtual Users with User roles&lt;/span&gt;&lt;br /&gt;
The last part is virtual users, in this section will we add some roles and change some attributes on the SOA Suite client user. Change the policy back on the composite reference ( oracle/wss11_saml_token_with_message_protection_client_policy ) and also use client as username in the web service proxy client.&lt;br /&gt;
&lt;br /&gt;
First change some client user attributes. We can do this in the security realm of the SOA Suite WebLogic Domain.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-Qdj1fSxOfKc/TlQuj6fP1zI/AAAAAAAAEUo/jjIreLzRl-o/s1600/saml_14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="382" src="http://1.bp.blogspot.com/-Qdj1fSxOfKc/TlQuj6fP1zI/AAAAAAAAEUo/jjIreLzRl-o/s400/saml_14.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Normally the user is only mapped to the user located at the JAX-WS server. To make virtual servers work we need to add a property to the saml.loginmodule located at the JAX-WS server.&amp;nbsp;&amp;nbsp;For this we need to go the EM application of the JAX-WS Server.&amp;nbsp;Open the WebLogic Domain treenode and select your JAX-WS domain. In the Domain menu (right window) &amp;nbsp;go to&amp;nbsp;&lt;b&gt;&lt;i&gt;Security -&amp;gt;&lt;/i&gt;&lt;/b&gt;&amp;nbsp;&lt;b&gt;&lt;i&gt;Security Provider Configuration&lt;/i&gt;&lt;/b&gt;.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-KSxvjPL0448/TlQvwXzk5DI/AAAAAAAAEUs/x9hJr0KI1u8/s1600/saml_11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="460" src="http://3.bp.blogspot.com/-KSxvjPL0448/TlQvwXzk5DI/AAAAAAAAEUs/x9hJr0KI1u8/s640/saml_11.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Click on Edit and add a custom property &lt;b&gt;&lt;i&gt;oracle.security.jps.assert.saml.identity&lt;/i&gt;&lt;/b&gt; with value &lt;i&gt;&lt;b&gt;true.&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-Gw7aAz5NLDs/TlQvw4BEdDI/AAAAAAAAEUw/jtbBLyBTAlw/s1600/saml_12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://4.bp.blogspot.com/-Gw7aAz5NLDs/TlQvw4BEdDI/AAAAAAAAEUw/jtbBLyBTAlw/s640/saml_12.png" width="628" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Restart the JAX-WS WebLogic server.&lt;br /&gt;
&lt;br /&gt;
We also need to do something in the SOA Composite.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-mG-qEGaiR0g/TlQvxnqVndI/AAAAAAAAEU0/J9_JOpWpFL0/s1600/saml_13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://2.bp.blogspot.com/-mG-qEGaiR0g/TlQvxnqVndI/AAAAAAAAEU0/J9_JOpWpFL0/s640/saml_13.png" width="582" /&gt;&lt;/a&gt;&lt;/div&gt;
Override the following properties &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;user.attributes&lt;/i&gt;&lt;/b&gt;&amp;nbsp;with value &amp;nbsp;&lt;b&gt;&lt;i&gt;displayname,employeenumber&lt;/i&gt;&lt;/b&gt; ( use , to separate ldap attributes you want to pass on )&lt;br /&gt;
&lt;b&gt;&lt;i&gt;user.roles.include&lt;/i&gt;&lt;/b&gt; with value &lt;b&gt;&lt;i&gt;true&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;i&gt;subject.precedence&lt;/i&gt;&lt;/b&gt;&amp;nbsp;with value&amp;nbsp;&lt;b&gt;&lt;i&gt;true&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Deploy the composite and when you test your test client. You will see the following output on the JAX-WS Server.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
virtual found&lt;br /&gt;
saml issuer: www.amis.nl&lt;br /&gt;
&lt;br /&gt;
SAML attribute: employeenumber&lt;br /&gt;
value: 100&lt;br /&gt;
&lt;br /&gt;
SAML attribute: Roles&lt;br /&gt;
value: Operators&lt;br /&gt;
value: AdminChannelUsers&lt;br /&gt;
value: IntegrationOperators&lt;br /&gt;
value: IntegrationMonitors&lt;br /&gt;
value: Monitors&lt;br /&gt;
&lt;br /&gt;
SAML attribute: displayname&lt;br /&gt;
value: SAML client&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-8869609433493251201?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/8869609433493251201/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=8869609433493251201" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/8869609433493251201?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/8869609433493251201?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/EBoOgPSL1q0/do-saml-with-owsm.html" title="Do SAML with OWSM" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-po_5n4Ike38/TlKuzr0DXdI/AAAAAAAAET8/tsMJZoENC5Y/s72-c/saml_1.png" height="72" width="72" /><thr:total>5</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/08/do-saml-with-owsm.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkICQX46fyp7ImA9WhdQEks.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-3356552731382782460</id><published>2011-08-13T22:49:00.000+02:00</published><updated>2011-08-13T22:49:20.017+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-13T22:49:20.017+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="web services" /><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g" /><title>Contract First web service with JDeveloper</title><content type="html">In this blogpost I will explain the options you have when you use JDeveloper to generate a web service based on a WSDL, so called top down or contract first. In my previous &lt;a href="http://biemond.blogspot.com/2011/08/expose-your-session-bean-with-jax-ws.html"&gt;blogpost &lt;/a&gt;I showed you the bottom up approach. This works great but it can lead to a ugly WSDL which it is not so great for interoperability. Off course you can control it all with some web service annotations but then you really need to know what you are doing.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a bottom up WSDL. It matches with the java methods&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-2ttv0L5tRMM/TkbYCkYXI0I/AAAAAAAAESw/yQTKNWjJP80/s1600/contractfirst_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="275" src="http://1.bp.blogspot.com/-2ttv0L5tRMM/TkbYCkYXI0I/AAAAAAAAESw/yQTKNWjJP80/s640/contractfirst_1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Let's change it to this and use this WSDL in JDeveloper.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-zyMBtB8Pxvg/TkbYDGNkeCI/AAAAAAAAES0/g8MgTaElC3Y/s1600/contractfirst_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="270" src="http://2.bp.blogspot.com/-zyMBtB8Pxvg/TkbYDGNkeCI/AAAAAAAAES0/g8MgTaElC3Y/s640/contractfirst_2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Before we can start lets copy the WSDL and its XSD to the project folder. This way JDeveloper can detect it.&lt;br /&gt;
&lt;br /&gt;
In JDeveloper we can choose for &lt;b&gt;Java Web Service from WSDL&lt;/b&gt;.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-k-uir7vGMlk/TkbYDpMvuBI/AAAAAAAAES4/UmJwo3IhXjE/s1600/contractfirst_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="464" src="http://4.bp.blogspot.com/-k-uir7vGMlk/TkbYDpMvuBI/AAAAAAAAES4/UmJwo3IhXjE/s640/contractfirst_3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
We can select our WSDL from the listbox and in this dialog we can choose for some important options.&lt;br /&gt;
&lt;br /&gt;
First we can choose Java or for EJB 3.0 as &lt;b&gt;Service Type&lt;/b&gt;. With Java as Service Type JDeveloper will add the Web Service as servlet to the web.xml. This is not the case with EJB.&lt;br /&gt;
With EJB as Service Type you will get transaction, security support, can&amp;nbsp;use interceptors and the timer service.&amp;nbsp;If you enable the &lt;b&gt;Add Service Endpoint Interface&lt;/b&gt; option and add an Remote annotations to this interface you can call the Remote interface of this EJB with RMI (t3:) besides invoking this Web Service with HTTP.&lt;br /&gt;
&lt;br /&gt;
The Service Endpoint Interface (SEI) is a Java interface that declares the methods that a client can invoke on the service.&amp;nbsp;It provides the client's view of the web service and hiding the implementation from the client.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-w1JiNVu2MwY/TkbYE6SVuII/AAAAAAAAETA/ci5sKrr2JwI/s1600/contractfirst_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="476" src="http://4.bp.blogspot.com/-w1JiNVu2MwY/TkbYE6SVuII/AAAAAAAAETA/ci5sKrr2JwI/s640/contractfirst_5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Provide the package names for the web service and the java types.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-0GjW9M4x0Kg/TkbYFlVymPI/AAAAAAAAETE/AzNq0o5MbK4/s1600/contractfirst_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="298" src="http://3.bp.blogspot.com/-0GjW9M4x0Kg/TkbYFlVymPI/AAAAAAAAETE/AzNq0o5MbK4/s400/contractfirst_6.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This will generate the following code. We need this JAXB code in completing the service implementation. &amp;nbsp;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-mzTnrpU4IPY/TkbYF5NYuxI/AAAAAAAAETI/av3AKSbd4Zc/s1600/contractfirst_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-mzTnrpU4IPY/TkbYF5NYuxI/AAAAAAAAETI/av3AKSbd4Zc/s320/contractfirst_7.png" width="230" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The generated service interface.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-4lY_kr9Rd0k/TkbYGXCBI_I/AAAAAAAAETM/e_fOy79YPD8/s1600/contractfirst_8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="428" src="http://1.bp.blogspot.com/-4lY_kr9Rd0k/TkbYGXCBI_I/AAAAAAAAETM/e_fOy79YPD8/s640/contractfirst_8.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The service implementation.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-dGHrEIgtjG0/TkbYG-W6WqI/AAAAAAAAETQ/bqaywqLnxks/s1600/contractfirst_9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="364" src="http://4.bp.blogspot.com/-dGHrEIgtjG0/TkbYG-W6WqI/AAAAAAAAETQ/bqaywqLnxks/s640/contractfirst_9.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
To complete the service we can for example inject an EJB and include the JAXB ObjectFactory.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-Q66dcscqnXI/TkbYHAw509I/AAAAAAAAETU/SJijjjouyvE/s1600/contractfirst_10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="542" src="http://3.bp.blogspot.com/-Q66dcscqnXI/TkbYHAw509I/AAAAAAAAETU/SJijjjouyvE/s640/contractfirst_10.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
And the contract first web service is finished.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-3356552731382782460?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/3356552731382782460/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=3356552731382782460" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/3356552731382782460?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/3356552731382782460?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/oqc7X2gtw7w/contract-first-web-service-with.html" title="Contract First web service with JDeveloper" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-2ttv0L5tRMM/TkbYCkYXI0I/AAAAAAAAESw/yQTKNWjJP80/s72-c/contractfirst_1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/08/contract-first-web-service-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUGQX07eip7ImA9WhdUEk4.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-8272207669614317932</id><published>2011-08-10T22:55:00.004+02:00</published><updated>2011-09-28T21:30:20.302+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-28T21:30:20.302+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WebLogic" /><category scheme="http://www.blogger.com/atom/ns#" term="EclipseLink" /><category scheme="http://www.blogger.com/atom/ns#" term="web services" /><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g" /><title>Expose your Session Bean as a Web Service with JAX-WS and Eclipselink</title><content type="html">In this blogpost I will show you how you can expose your EJB Session Bean as a Web Service, also tell you everything what I encountered and how I solved my issues. I will do this in JDeveloper and I will use the following frameworks: Eclipselink, JAX-WS and test it on WebLogic.&lt;br /&gt;
&lt;br /&gt;
First let's start with the JPA part. In my project I&amp;nbsp;generated&amp;nbsp;some&amp;nbsp;entities based on the Emp &amp;amp;amp;amp; Dept tables of the Scott schema.&lt;br /&gt;
&lt;br /&gt;
In this demo I want to retrieve one department so I need to add a NamedQuery.&amp;nbsp;I added Dept.findByPK to the NamedQueries annotation. Normally you only need to add the following JQL statement&amp;nbsp;&lt;b&gt;select o from Dept o where o.deptno = :deptid&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
In this case I didn't want to set the OneToMany relation between Emp and Dept to &lt;b&gt;eager&lt;/b&gt;. This can cause a fetch loop, so let's use the default value ( &lt;b&gt;lazy &lt;/b&gt;). I still need to fetch the employees on a department so I can return the department with all its employees in the Web Service response. To also fetch the employees I can add&amp;nbsp;&lt;b&gt;join fetch o.empList&lt;/b&gt;&amp;nbsp;to the JQL statement. &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1248952.js?file=Dept.java"&gt;&lt;/script&gt;
&lt;br /&gt;
The Emp entity also got some&amp;nbsp;important&amp;nbsp;adjustments.&lt;br /&gt;
This entity got an attribute called hiredate with &amp;nbsp;timestamp as java type. First I added the &lt;b&gt;Temporal &lt;/b&gt;annotation with a Date value and also change the java type to &lt;b&gt;Calendar &lt;/b&gt;else it will be ignored by the Web Service.&lt;br /&gt;
Because this entity has a getter to the Dept entity and Dept got one to Emp we need to break the loop for the Web Service response. You can do this by adding the &lt;b&gt;XmlTransient &lt;/b&gt;annotation to the getDept() method.&amp;nbsp;Else you will get an empty response or this error&lt;br /&gt;
javax.xml.stream.XMLStreamException: Premature end of file encountered&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/1248957.js?file=Emp.java"&gt;&lt;/script&gt;
&lt;br /&gt;
This is my Session Bean where I added the WebService, WebMethod and WebParam annotation to the session bean to control the WSDL.&lt;br /&gt;
&lt;br /&gt;
When you change one of these annotations you can get an deployment compiler error &amp;nbsp;like&lt;br /&gt;
&lt;br /&gt;
weblogic.utils.AssertionError: ***** ASSERTION FAILED *****&amp;nbsp;Caused by: java.lang.ClassNotFoundException: nl.amis.model.services.ScottSessionBean_esxgzy_WSOImpl&lt;br /&gt;
&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;	&lt;/span&gt;at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297).&lt;br /&gt;
&lt;br /&gt;
To fix this you need to remove the&amp;nbsp;EJBCompilerCache folder located in MiddlewareJDevPS5\jdeveloper\system11.1.1.5.37.60.13\DefaultDomain\servers\DefaultServer\cache&lt;br /&gt;
&lt;br /&gt;
Also in Eclipselink I used getResultList() and return a list instead of using GetSingleResult(). With GetSingleResult you get an error when there is no result. So you need to handle that when you use it.&lt;br /&gt;
&lt;script src="https://gist.github.com/1248962.js?file=ScottSessionBean.java"&gt;&lt;/script&gt;
At last we can also remove the Web Service annotations from the Session Bean, create a new class and maybe do Contract first . ( this will fix the EJBcompiler errors and keeps it more clean.)
In this class I inject the Session Bean to a private variable and call it's ejb methods.
&lt;br /&gt;
&lt;script src="https://gist.github.com/1248969.js?file=ScottService.java"&gt;&lt;/script&gt;
Now you can run it and test the EJB Web Service.
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-8272207669614317932?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/8272207669614317932/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=8272207669614317932" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/8272207669614317932?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/8272207669614317932?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/Af48Qs8KCJ0/expose-your-session-bean-with-jax-ws.html" title="Expose your Session Bean as a Web Service with JAX-WS and Eclipselink" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/08/expose-your-session-bean-with-jax-ws.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkIESXwzcSp7ImA9WhZaGEU.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-5449006828970291096</id><published>2011-07-05T19:55:00.000+02:00</published><updated>2011-07-05T19:55:08.289+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-05T19:55:08.289+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WebLogic" /><title>Change the log files location of a WebLogic Domain</title><content type="html">In a default WebLogic Domain you can have various WebLogic logfiles located at different locations. For administrators it can be hard to find them all and these&amp;nbsp;log files&amp;nbsp;can have and grow to a large file size which can lead to a full file system. In this blogpost we will move these log files to one location.&lt;br /&gt;
&lt;br /&gt;
For example when we take a look at the logs folder of the AdminServer you will see off course the WebLogic server log called &lt;b&gt;AdminServer.log&lt;/b&gt; , the domain log in this case &lt;b&gt;base_domain.log&lt;/b&gt;, &lt;b&gt;access.log&lt;/b&gt; for the HTTP request logging and the FMW log called&amp;nbsp;&lt;b&gt;AdminServer-diagnostic.log.&lt;/b&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-ks15VU1Pq08/ThNHCgu-1AI/AAAAAAAAEOg/6_UwZk9W1OE/s1600/log_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://2.bp.blogspot.com/-ks15VU1Pq08/ThNHCgu-1AI/AAAAAAAAEOg/6_UwZk9W1OE/s400/log_1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
At a managed server logs folder location you can also see the server1.out and server1.out00001 log files. These files are created by the NodeManager when we start the Managed servers from the WebLogic Console.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-sLOj99WJE9Y/ThNHDKF22nI/AAAAAAAAEOk/tK0Qz2y9Sio/s1600/log_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="231" src="http://1.bp.blogspot.com/-sLOj99WJE9Y/ThNHDKF22nI/AAAAAAAAEOk/tK0Qz2y9Sio/s400/log_2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&amp;nbsp;First let's move the Domain log.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-E0lvcUXTtLI/ThNHDiVuwbI/AAAAAAAAEOo/f229XO8yqyk/s1600/log_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="346" src="http://3.bp.blogspot.com/-E0lvcUXTtLI/ThNHDiVuwbI/AAAAAAAAEOo/f229XO8yqyk/s640/log_3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Then change the General log file for all the WebLogic Servers.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-JUQDzZkjhec/ThNHEXHOZwI/AAAAAAAAEOs/CQs14QqFqR4/s1600/log_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="406" src="http://1.bp.blogspot.com/-JUQDzZkjhec/ThNHEXHOZwI/AAAAAAAAEOs/CQs14QqFqR4/s640/log_4.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Also do this for the HTTP access.log and rename the logfile to servername_access.log else it will conflict with the other servers.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-i88UpDeGRZA/ThNHE1_VzMI/AAAAAAAAEOw/2VU8KhdHpn8/s1600/log_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-i88UpDeGRZA/ThNHE1_VzMI/AAAAAAAAEOw/2VU8KhdHpn8/s640/log_5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
To control the NodeManager standard and error output of the Managed Servers you need set the following&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;b&gt;weblogic.Stdout weblogic.Stderr&lt;/b&gt; parameters. Add these parameters to the argument field of all the managed server which will be started by the NodeManager.&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-93fBSYggre4/ThNHFAbiS1I/AAAAAAAAEO0/eDvist96UAQ/s1600/log_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="510" src="http://4.bp.blogspot.com/-93fBSYggre4/ThNHFAbiS1I/AAAAAAAAEO0/eDvist96UAQ/s640/log_6.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
When you enable at least the JRF or the Enterprise Manager option on your domain you need to change the location of the FMW log files. Go the Enterprise Manager Application and select all the Managed Servers.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-gKj_Fy6ENNY/ThNHFih_iAI/AAAAAAAAEO4/rFpx4VXiKJc/s1600/log_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://1.bp.blogspot.com/-gKj_Fy6ENNY/ThNHFih_iAI/AAAAAAAAEO4/rFpx4VXiKJc/s640/log_7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Click on odl-handler and press the Edit Configuration.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-57rKODbPL00/ThNHGPeux7I/AAAAAAAAEO8/hR8ijgPI1FY/s1600/log_8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="264" src="http://1.bp.blogspot.com/-57rKODbPL00/ThNHGPeux7I/AAAAAAAAEO8/hR8ijgPI1FY/s640/log_8.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Change the path of the log file.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Tzdn2HMPZss/ThNHGq0p2PI/AAAAAAAAEPA/9vuAzFzVcSo/s1600/log_9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="410" src="http://3.bp.blogspot.com/-Tzdn2HMPZss/ThNHGq0p2PI/AAAAAAAAEPA/9vuAzFzVcSo/s640/log_9.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Now you have one location which contains all the log files.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-JFdoZixUQxs/ThNHHLdGu_I/AAAAAAAAEPE/5NSDT2AUyM4/s1600/log_10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="388" src="http://3.bp.blogspot.com/-JFdoZixUQxs/ThNHHLdGu_I/AAAAAAAAEPE/5NSDT2AUyM4/s400/log_10.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-5449006828970291096?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/5449006828970291096/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=5449006828970291096" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/5449006828970291096?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/5449006828970291096?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/ucTVxuVrCVY/change-log-files-location-of-weblogic.html" title="Change the log files location of a WebLogic Domain" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-ks15VU1Pq08/ThNHCgu-1AI/AAAAAAAAEOg/6_UwZk9W1OE/s72-c/log_1.png" height="72" width="72" /><thr:total>6</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/07/change-log-files-location-of-weblogic.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU4FQn86fip7ImA9WhdUEk4.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-8103753945918711239</id><published>2011-06-21T12:39:00.000+02:00</published><updated>2011-09-28T21:25:13.116+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-28T21:25:13.116+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g soa suite" /><category scheme="http://www.blogger.com/atom/ns#" term="EDN" /><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Service Bus" /><title>Publish to EDN from java &amp; OSB with JMS</title><content type="html">My&lt;a href="http://biemond.blogspot.com/2011/06/configure-en-test-jms-based-edn-in-soa.html"&gt; previous blogpost&lt;/a&gt; was about how to configure the SOA Suite EDN for JMS ( EDN-JMS ) instead of AQ (EDN-DB) and in this blogpost I will show you how you can publish events from Java and OSB.&lt;br /&gt;
&lt;br /&gt;
Before we start you should know that we can only make Remote Event Connections because you are running the Java or OSB process in a different JVM then the SOA Suite. And only asynchronous subscriptions will be supported for remote event connections.&lt;br /&gt;
&lt;br /&gt;
First let's create a Java Client which publish the events directly to the SOA Suite Server. I will use the jars of the SOA Suite. This is not necessary. You can just publish a JMS text message and set some JMS Header properties (MessageType and SideCar )&lt;br /&gt;
&lt;br /&gt;
Make a new JDeveloper &amp;nbsp;project which contains the following libraries.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-_TKkteP5mUk/TgBrnvt34zI/AAAAAAAAEGY/CB0N-dykAng/s1600/edn_client_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-_TKkteP5mUk/TgBrnvt34zI/AAAAAAAAEGY/CB0N-dykAng/s1600/edn_client_1.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Here is my test class.&lt;br /&gt;
&lt;script src="https://gist.github.com/1248946.js?file=PublishJMSEvent.java"&gt;&lt;/script&gt;
And this will produce the following event on the EDN Queue.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-EMnzHAL40qY/TgBroeBKhqI/AAAAAAAAEGc/0z21YT1qCxE/s1600/edn_client_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="572" src="http://4.bp.blogspot.com/-EMnzHAL40qY/TgBroeBKhqI/AAAAAAAAEGc/0z21YT1qCxE/s640/edn_client_2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;The second part of this blogpost is how to do this in OSB.&lt;/b&gt;&lt;br /&gt;
Before we can work on the Proxy or Business Service we need to create a Foreign JNDI Provider on the WebLogic Service. ( You can also use a JNDI Provider of the OSB Configuration project )&lt;br /&gt;
&lt;br /&gt;
Provide the SOA Server details.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-uUeg998dHfU/TgBwV4UIL1I/AAAAAAAAEGg/AmyPx1wEbNw/s1600/edn_client_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="351" src="http://2.bp.blogspot.com/-uUeg998dHfU/TgBwV4UIL1I/AAAAAAAAEGg/AmyPx1wEbNw/s400/edn_client_3.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Provide the local and remote EDN-JMS JNDI Link names. The Remote JNDI Names are fixed but you can change your &amp;nbsp;local ones.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-7tE1tctXXAk/TgBwWFtu8fI/AAAAAAAAEGk/I6_jEM57vCU/s1600/edn_client_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="388" src="http://3.bp.blogspot.com/-7tE1tctXXAk/TgBwWFtu8fI/AAAAAAAAEGk/I6_jEM57vCU/s640/edn_client_4.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Restart the OSB Server and open OEPE or the SBConsole.&lt;br /&gt;
&lt;br /&gt;
Create a new Business Service and choose for Messaging Service as Service Type.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-tcKyGCHHDuc/TgBwWX0nMzI/AAAAAAAAEGo/IFdjMLxQgvA/s1600/edn_client_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="366" src="http://4.bp.blogspot.com/-tcKyGCHHDuc/TgBwWX0nMzI/AAAAAAAAEGo/IFdjMLxQgvA/s400/edn_client_5.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Event is an One Way Operation so only need to set the Request Message Type to text.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-T-2ZHo_ZXS4/TgBwWqwL5fI/AAAAAAAAEGs/BQ82PTvOKJ0/s1600/edn_client_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-T-2ZHo_ZXS4/TgBwWqwL5fI/AAAAAAAAEGs/BQ82PTvOKJ0/s400/edn_client_6.png" width="367" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Use the Local JNDI names of the Foreign JNDI Provider in the Endpoint URI&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-k6hEhElXUEw/TgBwXCxOxcI/AAAAAAAAEGw/XACyw5uQVmA/s1600/edn_client_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="454" src="http://2.bp.blogspot.com/-k6hEhElXUEw/TgBwXCxOxcI/AAAAAAAAEGw/XACyw5uQVmA/s640/edn_client_7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&amp;nbsp;Select Text as Message Type.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-pa0amvlTkVs/TgBwXhIuclI/AAAAAAAAEG0/f9XO1pHz77Q/s1600/edn_client_8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="277" src="http://4.bp.blogspot.com/-pa0amvlTkVs/TgBwXhIuclI/AAAAAAAAEG0/f9XO1pHz77Q/s320/edn_client_8.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Create a Proxy Service which call this Business Service, where we will replace the Body contents with the event data and set some JMS Headers in the Transport Header.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-BSGPIGbpi9w/TgBwX4uYPnI/AAAAAAAAEG4/ZeYpkuNO4Vg/s1600/edn_client_9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://3.bp.blogspot.com/-BSGPIGbpi9w/TgBwX4uYPnI/AAAAAAAAEG4/ZeYpkuNO4Vg/s640/edn_client_9.png" width="475" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;Replace the body contents in a Replace Action.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-pGGtpwb5uVY/TgBwYHDVN7I/AAAAAAAAEG8/DCKTeau7kJo/s1600/edn_client_10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="187" src="http://2.bp.blogspot.com/-pGGtpwb5uVY/TgBwYHDVN7I/AAAAAAAAEG8/DCKTeau7kJo/s640/edn_client_10.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
My test event, the values of Id and ecid element contains unique UUID values.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-ewdGtSvszsE/TgBwYmFbR1I/AAAAAAAAEHA/-ZB78TmifuY/s1600/edn_client_11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="272" src="http://1.bp.blogspot.com/-ewdGtSvszsE/TgBwYmFbR1I/AAAAAAAAEHA/-ZB78TmifuY/s640/edn_client_11.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
And the last part is to set the Messagetype and SideCar JMS Headers&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-5NBdXIiEWUM/TgBwY_IpkCI/AAAAAAAAEHE/YxrmOQo44tE/s1600/edn_client_12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="246" src="http://1.bp.blogspot.com/-5NBdXIiEWUM/TgBwY_IpkCI/AAAAAAAAEHE/YxrmOQo44tE/s640/edn_client_12.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;MessageType is always Remote&lt;br /&gt;
SideCar in my case&lt;br /&gt;
&lt;br /&gt;
&amp;lt;business-event-sidecar xmlns:ns="http://schemas.oracle.com/events/edl/EmployeeEventEDL"&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xmlns="http://oracle.com/fabric/sideCar"&amp;gt;&lt;br /&gt;
&amp;lt;name xmlns="http://oracle.com/fabric/businessEvent"&amp;gt;ns:EmployeeEvent-sidecar&amp;lt;/name&amp;gt;&lt;br /&gt;
&amp;lt;/business-event-sidecar&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can test the Proxy Service in the SBConsole.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-8103753945918711239?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/8103753945918711239/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=8103753945918711239" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/8103753945918711239?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/8103753945918711239?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/w_SATYQ_e-w/publish-to-edn-from-java-osb-with-jms.html" title="Publish to EDN from java &amp; OSB with JMS" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-_TKkteP5mUk/TgBrnvt34zI/AAAAAAAAEGY/CB0N-dykAng/s72-c/edn_client_1.png" height="72" width="72" /><thr:total>5</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/06/publish-to-edn-from-java-osb-with-jms.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YDRnoyfip7ImA9WhZbFk0.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-6369156253467278679</id><published>2011-06-21T00:27:00.001+02:00</published><updated>2011-06-21T00:32:57.496+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-21T00:32:57.496+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g soa suite" /><category scheme="http://www.blogger.com/atom/ns#" term="EDN" /><title>Configure and test JMS based EDN in SOA Suite 11g</title><content type="html">Beside the default AQ implementation it is also possible to use a JMS Queue for&amp;nbsp;EDN. When you use the JMS implementation in SOA Suite 11g instead of AQ, it can be easier to publish an event from a Java Web application, WebLogic SAF, MDB or from OSB.&amp;nbsp;In this blogpost I will show you how to configure EDN-JMS and how to publish an Event to this JMS Queue.&lt;br /&gt;
&lt;br /&gt;
When you take a look at the SOAJMSModule located at the JMSModules of WebLogic you can see that the module already contains an EDN Queue and an EDN ConnectionFactory.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-gdAWokwpgkY/Tf_AwsJf0mI/AAAAAAAAEFk/QrNxEZCzObw/s1600/edn_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="496" src="http://4.bp.blogspot.com/-gdAWokwpgkY/Tf_AwsJf0mI/AAAAAAAAEFk/QrNxEZCzObw/s640/edn_1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
So you only need to configure SOA Suite so it uses this Queue and Connection Factory. To do so open the enterprise manager application | SOA | soa-infra and open the Common Properties Menu item of the SOA-Infrastructure menu. Click on &lt;b&gt;More SOA-Infra Advanced Configuration Properties&lt;/b&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-axnnyiKWJBU/Tf_AxFohxcI/AAAAAAAAEFo/yCH597LBqhc/s1600/edn_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="636" src="http://1.bp.blogspot.com/-axnnyiKWJBU/Tf_AxFohxcI/AAAAAAAAEFo/yCH597LBqhc/s640/edn_2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
This will open the System MBean Browser. In this we can change the EdnJmsMode and set this to true.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-mzqB7lV7yPc/Tf_AxmQIjkI/AAAAAAAAEFs/JEXug7ePhlk/s1600/edn_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="262" src="http://2.bp.blogspot.com/-mzqB7lV7yPc/Tf_AxmQIjkI/AAAAAAAAEFs/JEXug7ePhlk/s640/edn_3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Restart the SOA Server and take a look at the monitoring of the EDN Queue. Here you must see there are some Queue Consumers&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-ZsOclNNsYHc/Tf_AyJxY4XI/AAAAAAAAEFw/EcInTJzFtds/s1600/edn_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="298" src="http://3.bp.blogspot.com/-ZsOclNNsYHc/Tf_AyJxY4XI/AAAAAAAAEFw/EcInTJzFtds/s640/edn_4.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;Second part of this blog is to publish a event. For this I made a simple Employee Id XSD which can be published.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-u2M6CVL93qQ/Tf_AyYqPfCI/AAAAAAAAEF0/d_iLSyjWPz4/s1600/edn_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="131" src="http://3.bp.blogspot.com/-u2M6CVL93qQ/Tf_AyYqPfCI/AAAAAAAAEF0/d_iLSyjWPz4/s320/edn_5.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Create a SOA Project and add a Mediator with a One Way Operation which uses this XSD. Also expose this Mediator so you can invoke this operation from the Enterprise Manager.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-LYXmd1GBiC0/Tf_Ay1kTWSI/AAAAAAAAEF4/0e78Tsuua-8/s1600/edn_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="293" src="http://2.bp.blogspot.com/-LYXmd1GBiC0/Tf_Ay1kTWSI/AAAAAAAAEF4/0e78Tsuua-8/s400/edn_6.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Add a routing rule and choose for an Event.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-LN9EqjckWGI/Tf_AzC6T2nI/AAAAAAAAEF8/U73BirMDKN4/s1600/edn_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="212" src="http://3.bp.blogspot.com/-LN9EqjckWGI/Tf_AzC6T2nI/AAAAAAAAEF8/U73BirMDKN4/s320/edn_7.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;Define an Employee Event.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-4SPE3LyWogs/Tf_Azvob8kI/AAAAAAAAEGA/jSbdzqtme58/s1600/edn_8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="403" src="http://2.bp.blogspot.com/-4SPE3LyWogs/Tf_Azvob8kI/AAAAAAAAEGA/jSbdzqtme58/s640/edn_8.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Add a transformation and map the source and destination elements&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-e9eNUXkcpgY/Tf_A0OP2_YI/AAAAAAAAEGE/cWMbc9o8IrM/s1600/edn_9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="323" src="http://2.bp.blogspot.com/-e9eNUXkcpgY/Tf_A0OP2_YI/AAAAAAAAEGE/cWMbc9o8IrM/s640/edn_9.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Your composite will look like this. &amp;nbsp;Deploy the composite to the SOA Server.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-GfrnhWsavYE/Tf_A07da88I/AAAAAAAAEGI/zOjOGUITrFU/s1600/edn_10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="190" src="http://4.bp.blogspot.com/-GfrnhWsavYE/Tf_A07da88I/AAAAAAAAEGI/zOjOGUITrFU/s400/edn_10.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
To see the event you need to pause the consumption of the EDNQueue.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-Han_WaolKtU/Tf_A1F5dzWI/AAAAAAAAEGM/pxTQEmf_PpY/s1600/edn_11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="504" src="http://4.bp.blogspot.com/-Han_WaolKtU/Tf_A1F5dzWI/AAAAAAAAEGM/pxTQEmf_PpY/s640/edn_11.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Open the Enterprise Manager and test the service of the EDN composite.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-ZPiHGPVQjsU/Tf_A1x2CiFI/AAAAAAAAEGQ/YlyFQx_9cVU/s1600/edn_12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="460" src="http://3.bp.blogspot.com/-ZPiHGPVQjsU/Tf_A1x2CiFI/AAAAAAAAEGQ/YlyFQx_9cVU/s640/edn_12.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Go back to the EDNQueue and look at the JMS Message. It contains some SOA instance tracing elements and has a MessageType JMS Header which defines the EDN mode.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-vrVXoZaJYJ8/Tf_A2UkA5mI/AAAAAAAAEGU/y-TGm-194zU/s1600/edn_13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="472" src="http://3.bp.blogspot.com/-vrVXoZaJYJ8/Tf_A2UkA5mI/AAAAAAAAEGU/y-TGm-194zU/s640/edn_13.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
In the following documentation you can read about, how to create a Foreign JNDI provider on your ADF server so you can publish JMS EDN events from an ADF Client.&lt;br /&gt;
&lt;h3 class="sect2" style="font-family: Tahoma, sans-serif; font-size: 14px; font-weight: bold;"&gt;&lt;a href="http://download.oracle.com/docs/cd/E21764_01/integration.1111/e10224/obe_intro.htm#BABHBGAG"&gt;&lt;span class="secnum"&gt;38.3.6&lt;/span&gt;&amp;nbsp;How to Configure JMS-based EDN Implementations&lt;/a&gt;&lt;/h3&gt;In one of the future blogposts I will publish an JMS event from a Java Client.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-6369156253467278679?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/6369156253467278679/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=6369156253467278679" title="15 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6369156253467278679?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6369156253467278679?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/o3KT4lGSxAo/configure-en-test-jms-based-edn-in-soa.html" title="Configure and test JMS based EDN in SOA Suite 11g" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-gdAWokwpgkY/Tf_AwsJf0mI/AAAAAAAAEFk/QrNxEZCzObw/s72-c/edn_1.png" height="72" width="72" /><thr:total>15</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/06/configure-en-test-jms-based-edn-in-soa.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEAMSHY8cCp7ImA9WhdUFEw.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-2970600218362523119</id><published>2011-06-13T01:10:00.002+02:00</published><updated>2011-09-30T23:06:29.878+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-30T23:06:29.878+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Maven" /><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11gR2" /><title>Building with Maven in JDeveloper 11gR2</title><content type="html">With JDeveloper 11gR2 you can use Maven 2 as your build engine, before 11gR2 you could download a plugin which did not work great because all the required Oracle libraries which were not available in a public repository. So you had no choice to add them manually to a Maven Repository before you can use Maven. With 11gR2 Oracle fixed that by adding your projects libraries to the local Maven Repository when you add a Pom.xml to your projects.&lt;br /&gt;
&lt;br /&gt;
Using Maven in JDeveloper is not that simple and I hope that this blogpost can help you to use maven as your buidtool.&lt;br /&gt;
&lt;br /&gt;
First check if you have in your user profile a folder called &lt;b&gt;.m2&lt;/b&gt; . This folder must contain a settings.xml file ( you can copy it from jdeveloper\apache-maven-2.2.1\conf ) And also add a sub folder called repository.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-aWS2hMGxeCw/TfUvO6qgMmI/AAAAAAAAEEY/tCRUkevlFn8/s1600/maven_0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="187" src="http://1.bp.blogspot.com/-aWS2hMGxeCw/TfUvO6qgMmI/AAAAAAAAEEY/tCRUkevlFn8/s640/maven_0.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Select for example your model project and add a Maven POM for Project to this project&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-S_HhYta20vE/TfUvPj4Q9yI/AAAAAAAAEEc/TscECOe9rrk/s1600/maven_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://4.bp.blogspot.com/-S_HhYta20vE/TfUvPj4Q9yI/AAAAAAAAEEc/TscECOe9rrk/s400/maven_1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
You will get a POM overview which matches with your project.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-pYlF0MEtYak/TfUvPyilMiI/AAAAAAAAEEg/yI0H0SYKlTQ/s1600/maven_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-pYlF0MEtYak/TfUvPyilMiI/AAAAAAAAEEg/yI0H0SYKlTQ/s320/maven_2.png" width="312" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This will add the libraries of the model project to your local Maven repository.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-XzVHhYcYF6Q/TfUvQX4AK9I/AAAAAAAAEEk/3OxfY_p1rSA/s1600/maven_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="236" src="http://4.bp.blogspot.com/-XzVHhYcYF6Q/TfUvQX4AK9I/AAAAAAAAEEk/3OxfY_p1rSA/s640/maven_3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now you can do the same for the ViewController project.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-clGMrLbBE-8/TfUvQhDQLlI/AAAAAAAAEEo/8ULcgg3sz4g/s1600/maven_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="370" src="http://1.bp.blogspot.com/-clGMrLbBE-8/TfUvQhDQLlI/AAAAAAAAEEo/8ULcgg3sz4g/s400/maven_4.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The only thing missing is the application workspace POM.xml which build all workspace projects. Add the Application POM to your workspace.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-VNbHSGm7QSY/TfUvRHnY7_I/AAAAAAAAEEs/r5yaqI1LMsY/s1600/maven_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="251" src="http://3.bp.blogspot.com/-VNbHSGm7QSY/TfUvRHnY7_I/AAAAAAAAEEs/r5yaqI1LMsY/s400/maven_5.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Don't enable Generate POM for Projects in this Application because we already did that.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-fePjJkOHQ4k/TfUvRsAzkjI/AAAAAAAAEEw/0FrotaE0nvk/s1600/maven_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-fePjJkOHQ4k/TfUvRsAzkjI/AAAAAAAAEEw/0FrotaE0nvk/s400/maven_6.png" width="336" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This Application POM is located in the Application Resources window and only contains the Model and ViewController references,&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-BGb4mAYlrXU/TfUyyvinAWI/AAAAAAAAEE0/bthTlJgTNrQ/s1600/maven_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-BGb4mAYlrXU/TfUyyvinAWI/AAAAAAAAEE0/bthTlJgTNrQ/s1600/maven_7.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
In the project options or when you select the POM.xml you can change the Maven settings&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-WaA2jw3cZkU/TfUy0yHrLbI/AAAAAAAAEFE/_XBtSoY0nS8/s1600/maven_11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="305" src="http://1.bp.blogspot.com/-WaA2jw3cZkU/TfUy0yHrLbI/AAAAAAAAEFE/_XBtSoY0nS8/s320/maven_11.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Add some extra Maven goals to your project.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-c7Ugwi3l_gQ/TfUyzBKS0HI/AAAAAAAAEE4/YatqlD0H9eo/s1600/maven_8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="256" src="http://1.bp.blogspot.com/-c7Ugwi3l_gQ/TfUyzBKS0HI/AAAAAAAAEE4/YatqlD0H9eo/s400/maven_8.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
or add some extra Maven Repositories, like your company one.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-Nn2Pzyk7NVw/TfUyzrOZrsI/AAAAAAAAEE8/U9F3D4zejsE/s1600/maven_9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="256" src="http://1.bp.blogspot.com/-Nn2Pzyk7NVw/TfUyzrOZrsI/AAAAAAAAEE8/U9F3D4zejsE/s400/maven_9.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Too bad indexing the Maven repositories ends in a error. Even when I use my own repository. You can ignore this error.&lt;br /&gt;
&lt;br /&gt;
This is fixed in the&amp;nbsp;11gR2 patch and now it is working fine.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/--jZjMjIV7FU/TfUy0T1a9tI/AAAAAAAAEFA/P38ZlC4CkRU/s1600/maven_10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="256" src="http://2.bp.blogspot.com/--jZjMjIV7FU/TfUy0T1a9tI/AAAAAAAAEFA/P38ZlC4CkRU/s400/maven_10.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Now its time to build your project by running the Maven Package Goal.&lt;br /&gt;
&lt;br /&gt;
The Model project was no problem.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-s053NNPKaNc/TfU3fPyNQkI/AAAAAAAAEFI/xLEUB7A3IzQ/s1600/maven_12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="409" src="http://3.bp.blogspot.com/-s053NNPKaNc/TfU3fPyNQkI/AAAAAAAAEFI/xLEUB7A3IzQ/s640/maven_12.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
The ViewControler project was different.&lt;br /&gt;
&lt;br /&gt;
First I got a Apacle Trinidad error ( the ADF Faces Runtime needs a Trinidad pom )&lt;br /&gt;
Cannot find parent: org.apache.myfaces.trinidad:trinidad for project: null:trinidad-api:jar:null for project null:trinidad-api:jar:null&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
You can try to add and remove the right dependency &amp;nbsp;(&amp;nbsp;oracle.jdeveloper.library:ADF-Faces-Runtime-11:pom:11.1.2.0.0 ), maybe this will fix it.&lt;br /&gt;
&lt;br /&gt;
This is fixed in the&amp;nbsp;11gR2 patch and now it is working fine.&lt;br /&gt;
&lt;br /&gt;
In the Maven setting you can Add or Remove the library dependency.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-65BT0b9Oqbs/TfU3gfSIM1I/AAAAAAAAEFQ/rYYjYJFDOi0/s1600/maven_14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="256" src="http://2.bp.blogspot.com/-65BT0b9Oqbs/TfU3gfSIM1I/AAAAAAAAEFQ/rYYjYJFDOi0/s400/maven_14.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
You will get a message that the local repository will be updated.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-QxJjdWW1kWE/TfU3gylsC8I/AAAAAAAAEFU/3M3APDc5ECA/s1600/maven_15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="150" src="http://4.bp.blogspot.com/-QxJjdWW1kWE/TfU3gylsC8I/AAAAAAAAEFU/3M3APDc5ECA/s400/maven_15.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
In case of the Apache Trinidad error. I need to update the trinidad pom in my local repository and remove the &amp;nbsp;missing parent and move the groupId and version element,&lt;br /&gt;
&lt;br /&gt;
This is fixed in the&amp;nbsp;11gR2 patch and now it is working fine.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;nbsp; &amp;lt;parent&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;groupId&amp;gt;org.apache.myfaces.trinidad&amp;lt;/groupId&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;artifactId&amp;gt;trinidad&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;version&amp;gt;2.0.0.1-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;/parent&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;groupId&amp;gt;org.apache.myfaces.trinidad&amp;lt;/groupId&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;version&amp;gt;2.0.0.1-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;artifactId&amp;gt;trinidad-impl&amp;lt;/artifactId&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;packaging&amp;gt;jar&amp;lt;/packaging&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and so it goes on and on. Also need to do this for the 2 RichClient Faces POMs located in .m2\repository\oracle\adf\view\faces&lt;br /&gt;
Somehow the parent POM of the Oracle and Apache POMs are not added to &amp;nbsp;the local repository.&lt;br /&gt;
&lt;br /&gt;
And it would be great if Oracle made a option to force the synchronization of all the Jdeveloper libraries ( disc &amp;nbsp;space is not a problem anymore and make it complete ) &amp;nbsp;and even a option to export these POMs to your own Maven Repository.&lt;br /&gt;
&lt;br /&gt;
The ViewController project has a dependecy with the model project so you need to make sure that the ViewController project can find the Model jar. To do so I will add my own Maven Repository to all the projects.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-7ToP1OTRAX4/TfVFpcBRPvI/AAAAAAAAEFY/ujXaigBNFaA/s1600/maven_16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="410" src="http://2.bp.blogspot.com/-7ToP1OTRAX4/TfVFpcBRPvI/AAAAAAAAEFY/ujXaigBNFaA/s640/maven_16.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Change the Settings.xml of Apache Maven or of your local Maven repository and the add the username password which can upload the model artifact.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-5NczC0P9k0c/TfVFpt6EaQI/AAAAAAAAEFc/iyA-WbjzpBQ/s1600/maven_17.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="126" src="http://4.bp.blogspot.com/-5NczC0P9k0c/TfVFpt6EaQI/AAAAAAAAEFc/iyA-WbjzpBQ/s320/maven_17.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
In the Model POM add a Distribution so Maven can upload the model artifact.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-vX73j1jrTH8/TfVFqLz4y4I/AAAAAAAAEFg/bQC39AculHA/s1600/maven_18.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="174" src="http://1.bp.blogspot.com/-vX73j1jrTH8/TfVFqLz4y4I/AAAAAAAAEFg/bQC39AculHA/s320/maven_18.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
The ViewController can now find the Model dependency and you can create the WAR. This is a big one (130) because it adds all the reference jar to the web-inf/lib. You need to control this by deselecting the export option in the Maven project dependency.&lt;br /&gt;
&lt;br /&gt;
To solve the Apache Trinidad dependency you need to add the Apache repository on the ViewController maven repositories. Add&amp;nbsp;https://repository.apache.org/content/repositories/snapshots/ as url&lt;br /&gt;
Open the&amp;nbsp;ADF-Faces-Runtime-11-11.1.2.0.0.pom located in&amp;nbsp;.m2\repository\oracle\jdeveloper\library\ADF-Faces-Runtime-11\11.1.2.0.0\ and change the Trinidad dependency from&amp;nbsp;2.0.0.1-SNAPSHOT to 2.0.0.3-SNAPSHOT&lt;br /&gt;
The 2.0.0.1-SNAPSHOT does not exists in the Apache repository anymore.&lt;br /&gt;
&lt;br /&gt;
This is fixed in the&amp;nbsp;11gR2 patch and now it is working fine.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
Do the same for Trinidad-Runtime-11-11.1.2.0.0.pom &amp;nbsp;located at&amp;nbsp;.m2\repository\oracle\jdeveloper\library\Trinidad-Runtime-11\11.1.2.0.0&lt;br /&gt;
&lt;br /&gt;
This is fixed in the&amp;nbsp;11gR2 patch and now it is working fine.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Also got a Maven Package Goal error when I run this Package Goal twice. It is solved when I do a clean first.&lt;br /&gt;
Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor&lt;br /&gt;
&lt;br /&gt;
message &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor&lt;br /&gt;
cause-exception &amp;nbsp; &amp;nbsp; : com.thoughtworks.xstream.converters.reflection.ObjectAccessException&lt;br /&gt;
cause-message &amp;nbsp; &amp;nbsp; &amp;nbsp; : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor&lt;br /&gt;
class &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : org.apache.maven.plugin.war.util.WebappStructure&lt;br /&gt;
required-type &amp;nbsp; &amp;nbsp; &amp;nbsp; : org.apache.maven.plugin.war.util.WebappStructure&lt;br /&gt;
path &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: /webapp-structure&lt;br /&gt;
line number &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : 1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-2970600218362523119?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/2970600218362523119/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=2970600218362523119" title="15 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/2970600218362523119?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/2970600218362523119?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/GIJFtSEE_sk/building-with-maven-in-jdeveloper-11gr2.html" title="Building with Maven in JDeveloper 11gR2" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-aWS2hMGxeCw/TfUvO6qgMmI/AAAAAAAAEEY/tCRUkevlFn8/s72-c/maven_0.png" height="72" width="72" /><thr:total>15</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/06/building-with-maven-in-jdeveloper-11gr2.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8HQH0yfCp7ImA9WhZUFUs.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-2937376234744029660</id><published>2011-06-08T23:17:00.000+02:00</published><updated>2011-06-08T23:17:11.394+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-08T23:17:11.394+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="adf" /><category scheme="http://www.blogger.com/atom/ns#" term="EclipseLink" /><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11gR2" /><title>Using the EJB or Java Datacontrol in ADF Rich Faces</title><content type="html">In my&amp;nbsp;&lt;a href="http://biemond.blogspot.com/2011/06/ejb-and-adf-java-or-ejb-datacontrol.html"&gt;previous blogspot&lt;/a&gt; I showed you the new JDeveloper 11gR2 EJB and ADF DataControl features and in this blogpost I will use this EJB or Java DataControl in a JSF page.&lt;br /&gt;
&lt;br /&gt;
I made a simple EJB model project which uses the dept and emp tables of the Scott schema. This project also contains with a Session Bean on which I generated an ADF DataControl.&lt;br /&gt;
&lt;br /&gt;
When you open the DataControls.dcx in your model project and select one of your DataControl entries you can click on the edit button. This will open and generate an ADF entity xml in which you can change some properties.&lt;br /&gt;
We will add a new Named Criteria in which you can search on a particular location of the department. This criteria can be used in a Query Panel. &lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-8nPL75mG234/Te_T9A0HR5I/AAAAAAAAEDk/v1wlM6d4LRc/s1600/ejb_ui_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="337" src="http://2.bp.blogspot.com/-8nPL75mG234/Te_T9A0HR5I/AAAAAAAAEDk/v1wlM6d4LRc/s640/ejb_ui_1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The criteria dialog, where I add the location attribute of the dept entity and compare it with a bind variable.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-JxNpOtaf1OA/Te_T9v9qwxI/AAAAAAAAEDo/U4eo50CAaQI/s1600/ejb_ui_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="464" src="http://4.bp.blogspot.com/-JxNpOtaf1OA/Te_T9v9qwxI/AAAAAAAAEDo/U4eo50CAaQI/s640/ejb_ui_2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
When we switch to the ViewController project, you will see this criteria in the DataControl Window.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-7b8XBx88LNE/Te_WHYI_n7I/AAAAAAAAEDs/QUidmP3CFNo/s1600/ejb_ui_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-7b8XBx88LNE/Te_WHYI_n7I/AAAAAAAAEDs/QUidmP3CFNo/s1600/ejb_ui_3.png" /&gt;&lt;/a&gt;&lt;/div&gt;Drag &lt;b&gt;All Queriable Attributes&lt;/b&gt; on the JSF Page and choose for ADF Query Panel with Table.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Nvj0ToCUVcU/Te_WZV1kBcI/AAAAAAAAEDw/uPkWkEGf7vs/s1600/ejb_ui_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://2.bp.blogspot.com/-Nvj0ToCUVcU/Te_WZV1kBcI/AAAAAAAAEDw/uPkWkEGf7vs/s640/ejb_ui_4.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
You can run this page and in the top right Combobox you can select your criteria, &amp;nbsp;next the bind variable will be shown on the query panel.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-mcdXm7KhCqU/Te_XMrt0MII/AAAAAAAAED0/OzOeqKwMaKQ/s1600/ejb_ui_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="128" src="http://3.bp.blogspot.com/-mcdXm7KhCqU/Te_XMrt0MII/AAAAAAAAED0/OzOeqKwMaKQ/s640/ejb_ui_5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;The saving of your own custom queries in the MDS store is not working (yet) with this DataControl. You will get a viewobject error. And I can't define a list of values on an attribute, so no nice combobox in the query panel.&lt;br /&gt;
&lt;br /&gt;
The second part of this blogpost will show you, how you can change a department of a employee. &amp;nbsp;Here you can see that the employee entity has the department entity as attribute( no dept_id attribute).&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Oi-bksvXL3k/Te_ZbOOQqhI/AAAAAAAAED4/Yw7dHX3-q3o/s1600/ejb_ui_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-Oi-bksvXL3k/Te_ZbOOQqhI/AAAAAAAAED4/Yw7dHX3-q3o/s1600/ejb_ui_6.png" /&gt;&lt;/a&gt;&lt;/div&gt;Drag the empFindAll operation on the page and choose for ADF Form&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-z1CN6g9mbAo/Te_a4SC4jaI/AAAAAAAAED8/Bp4b32o6UA4/s1600/ejb_ui_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="298" src="http://4.bp.blogspot.com/-z1CN6g9mbAo/Te_a4SC4jaI/AAAAAAAAED8/Bp4b32o6UA4/s320/ejb_ui_7.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
You can see that there is no combobox option for the department entity but you can include its attributes.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-DKHogyp5L10/Te_a5O0uXDI/AAAAAAAAEEA/G3yqWN4YqTU/s1600/ejb_ui_8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="332" src="http://1.bp.blogspot.com/-DKHogyp5L10/Te_a5O0uXDI/AAAAAAAAEEA/G3yqWN4YqTU/s400/ejb_ui_8.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;On runtime it will look like this.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-A3XjMwNHLPk/Te_a9BpCBgI/AAAAAAAAEEE/2UbT_cuEizk/s1600/ejb_ui_9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-A3XjMwNHLPk/Te_a9BpCBgI/AAAAAAAAEEE/2UbT_cuEizk/s1600/ejb_ui_9.png" /&gt;&lt;/a&gt;&lt;/div&gt;I removed the entity attributes of&amp;nbsp;&amp;nbsp;Dept&amp;nbsp;and drag the dept attribute from the DataControl on the Form and choose for &lt;b&gt;ADF Select One Choice&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Hka2MBBmzQ8/Te_fRBoRZUI/AAAAAAAAEEI/C04XdhEhfeU/s1600/ejb_ui_10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="280" src="http://2.bp.blogspot.com/-Hka2MBBmzQ8/Te_fRBoRZUI/AAAAAAAAEEI/C04XdhEhfeU/s640/ejb_ui_10.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The Base Data Source is the dept entity inside the Employee entity and add a new other department operation as List Data Source&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-_1KjXhSXjPI/Te_i7fmySBI/AAAAAAAAEEM/nzsu3vLx4wk/s1600/ejb_ui_11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="297" src="http://3.bp.blogspot.com/-_1KjXhSXjPI/Te_i7fmySBI/AAAAAAAAEEM/nzsu3vLx4wk/s320/ejb_ui_11.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Add the data mapping and display some department attributes.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-WSFdypycAK4/Te_i8H7k8pI/AAAAAAAAEEQ/hv6tpQ_OGY4/s1600/ejb_ui_12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="297" src="http://1.bp.blogspot.com/-WSFdypycAK4/Te_i8H7k8pI/AAAAAAAAEEQ/hv6tpQ_OGY4/s320/ejb_ui_12.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
This time a combobox is displayed and you can change the department on the employee&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-64ncLSZVqIg/Te_i8bhmHJI/AAAAAAAAEEU/us8uNGCdtfo/s1600/ejb_ui_13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-64ncLSZVqIg/Te_i8bhmHJI/AAAAAAAAEEU/us8uNGCdtfo/s1600/ejb_ui_13.png" /&gt;&lt;/a&gt;&lt;/div&gt;That's all for now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-2937376234744029660?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/2937376234744029660/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=2937376234744029660" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/2937376234744029660?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/2937376234744029660?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/QoMEsDdyvVY/using-ejb-or-java-datacontrol-in-adf.html" title="Using the EJB or Java Datacontrol in ADF Rich Faces" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-8nPL75mG234/Te_T9A0HR5I/AAAAAAAAEDk/v1wlM6d4LRc/s72-c/ejb_ui_1.png" height="72" width="72" /><thr:total>6</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/06/using-ejb-or-java-datacontrol-in-adf.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08MSHgyfSp7ImA9WhZUFEU.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-3923763020943715326</id><published>2011-06-07T23:16:00.001+02:00</published><updated>2011-06-08T00:31:29.695+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-08T00:31:29.695+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="adf" /><category scheme="http://www.blogger.com/atom/ns#" term="EclipseLink" /><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11gR2" /><title>EJB and ADF Java or EJB DataControl features in JDeveloper 11gR2</title><content type="html">Today Oracle released JDeveloper 11gR2 and it's time to do a testdrive on the new EJB, JPA and ADF JAVA or EJB Datacontol R2 features. Last Open World I had a great meeting about these features with Frank Nimphius and one of the developer who made this happen. So I am very curious about this new release.&lt;br /&gt;
&lt;br /&gt;
We start with the Model project and do &lt;b&gt;Create Entities from Tables&lt;/b&gt; to add some entities to the model project.&lt;br /&gt;
&lt;br /&gt;
In the wizard you can disable the discovering of Foreign Keys and generate a toString method on the entity&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-Gay72RNI0cU/Te5ykme-52I/AAAAAAAAEC4/8Dw7INnGTeE/s1600/ejb_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://4.bp.blogspot.com/-Gay72RNI0cU/Te5ykme-52I/AAAAAAAAEC4/8Dw7INnGTeE/s400/ejb_1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;An overview of the entity attributes with it's types.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-FK2_NLcnMoc/Te5yld3HX2I/AAAAAAAAEC8/mQaT92hsh9g/s1600/ejb_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://1.bp.blogspot.com/-FK2_NLcnMoc/Te5yld3HX2I/AAAAAAAAEC8/mQaT92hsh9g/s400/ejb_2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;You can define and change the entity mappings, no need to do it in the persistence.xml wizard.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-XoMh9wOFQJc/Te5ylw2nrOI/AAAAAAAAEDA/DEMs2BV3aQE/s1600/ejb_3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://2.bp.blogspot.com/-XoMh9wOFQJc/Te5ylw2nrOI/AAAAAAAAEDA/DEMs2BV3aQE/s400/ejb_3.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;The persistence.xml entity editor has some extra configuration windows like the locking, Caching, Installation, Converters and the Advanced window&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-GMT5mgI3eyc/Te51IjCA6OI/AAAAAAAAEDE/f-OaDbzNWDc/s1600/ejb_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="332" src="http://2.bp.blogspot.com/-GMT5mgI3eyc/Te51IjCA6OI/AAAAAAAAEDE/f-OaDbzNWDc/s640/ejb_4.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The generation of a SDO Service Interface on the Bean used to go very wrong ( start it by generating service interface on the session bean). Now I only have to fix the response elements of the SessionBean XSD with the right types ( but this is so easy because the property editor of jdeveloper can see the imported types).&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Fh7ayDC5ieE/Te6Ff1A1qGI/AAAAAAAAEDc/cYVFcJ9KGF0/s1600/ejb_10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="285" src="http://3.bp.blogspot.com/-Fh7ayDC5ieE/Te6Ff1A1qGI/AAAAAAAAEDc/cYVFcJ9KGF0/s320/ejb_10.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Next step is to add an EJB Session Bean and generate an ADF DataControl on the remote interface.&lt;br /&gt;
Here you can see that there are no ADF xml Entity files.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-GnpAFywMepE/Te52_4YpkhI/AAAAAAAAEDI/cGt2rTk6ppQ/s1600/ejb_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-GnpAFywMepE/Te52_4YpkhI/AAAAAAAAEDI/cGt2rTk6ppQ/s320/ejb_5.png" width="315" /&gt;&lt;/a&gt;&lt;/div&gt;Unless you want to change the default values. Select one of the methods and press the edit button&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-MzGywdv6Jcs/Te5530_taII/AAAAAAAAEDM/6z6bS1zPVLM/s1600/ejb_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="214" src="http://2.bp.blogspot.com/-MzGywdv6Jcs/Te5530_taII/AAAAAAAAEDM/6z6bS1zPVLM/s320/ejb_6.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;The editor is much better and the attribute windows contains a lot of new options like Validations Rules, Add a Transiet Attribute.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-JxXl8tFSgjU/Te554YhsK1I/AAAAAAAAEDQ/ipTlWq82nA0/s1600/ejb_7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="393" src="http://2.bp.blogspot.com/-JxXl8tFSgjU/Te554YhsK1I/AAAAAAAAEDQ/ipTlWq82nA0/s640/ejb_7.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;You can add Attribute Checks or Rules just like ADF BC&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-BNdGrZ3d-Lg/Te554-tw5WI/AAAAAAAAEDU/caEJYFkf5bM/s1600/ejb_8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="302" src="http://1.bp.blogspot.com/-BNdGrZ3d-Lg/Te554-tw5WI/AAAAAAAAEDU/caEJYFkf5bM/s640/ejb_8.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;Add your own View Criteria ( like in a viewobject of ADF BC ) &amp;nbsp;which you can use in a Query Panel&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-a5BqHvfQOWE/Te555YAqChI/AAAAAAAAEDY/75BCwz4M5k4/s1600/ejb_9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="542" src="http://2.bp.blogspot.com/-a5BqHvfQOWE/Te555YAqChI/AAAAAAAAEDY/75BCwz4M5k4/s640/ejb_9.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
And the last feature for now, is the JNDI url for the remote EJB in the web.xml of your Web application. before 11gR2 you should use a foreign JNDI provider or change with ANT the provider-url &amp;nbsp;in the ejb-definition.&amp;nbsp;Now when you drag the EJB DataControl into your web application then JDeveloper adds a ejb-ref entry to the web.xml but also add a new env-entry with the EJB DataControl name so you can provide the t3 url in the web.xml. The web.xml can be changed in a weblogic deployment plan.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;lt;env-entry&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;env-entry-name&amp;gt;ScottSessionEJB-provider-url&amp;lt;/env-entry-name&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;env-entry-type&amp;gt;java.lang.String&amp;lt;/env-entry-type&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;env-entry-value&amp;gt;t3://127.0.0.1:7101&amp;lt;/env-entry-value&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;/env-entry&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;ejb-ref&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;ejb-ref-name&amp;gt;ejb/ScottSessionEJB&amp;lt;/ejb-ref-name&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;ejb-ref-type&amp;gt;Session&amp;lt;/ejb-ref-type&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;remote&amp;gt;nl.whitehorses.ejbdc.model.services.ScottSessionEJB&amp;lt;/remote&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;ejb-link&amp;gt;ScottSessionEJB&amp;lt;/ejb-link&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;/ejb-ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's all for Part 1, next time we can gonna use the ADF EJB DataControl in a JSF Page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-3923763020943715326?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/3923763020943715326/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=3923763020943715326" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/3923763020943715326?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/3923763020943715326?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/79lz94KRWsI/ejb-and-adf-java-or-ejb-datacontrol.html" title="EJB and ADF Java or EJB DataControl features in JDeveloper 11gR2" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-Gay72RNI0cU/Te5ykme-52I/AAAAAAAAEC4/8Dw7INnGTeE/s72-c/ejb_1.png" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/06/ejb-and-adf-java-or-ejb-datacontrol.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEIMSHo_eSp7ImA9WhZXEks.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-5906805883093490347</id><published>2011-05-01T18:16:00.000+02:00</published><updated>2011-05-01T18:16:29.441+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-01T18:16:29.441+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Service Bus" /><title>OSB Endpoint monitoring and SLA alert rules</title><content type="html">The Oracle Service Bus got some nice features to monitor its endpoints, see if they are still online and you can enable these Proxy and Business Service endpoints in the Operations view of the SBConsole. In OSB you can also make a SLA alert rule to reports these endpoint changes to the SBConsole, send a mail , SNMP trap or publish on a JMS queue.&lt;br /&gt;
&lt;br /&gt;
These options are not enabled by default, you need to do the steps, I describe in this blogpost..&lt;br /&gt;
&lt;br /&gt;
When you create or deployed some new Proxy and Business Services you won't see these endpoints in the &amp;nbsp;Service Health Tab of the Operations View.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-ynB-8h8inS0/Tb197oGhfHI/AAAAAAAAECE/khG0e47fSac/s1600/endpoint_3.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="210" src="http://4.bp.blogspot.com/-ynB-8h8inS0/Tb197oGhfHI/AAAAAAAAECE/khG0e47fSac/s640/endpoint_3.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;When you open the Operation Settings of the Business or Proxy Service you will see that monitoring is not activated by default.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-NhsURAMKf5s/Tb1967okgQI/AAAAAAAAEB8/TpB8tUOe5uc/s1600/endpoint_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="372" src="http://4.bp.blogspot.com/-NhsURAMKf5s/Tb1967okgQI/AAAAAAAAEB8/TpB8tUOe5uc/s640/endpoint_1.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;Create a new Session and change the monitoring setting.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-XDqGVj_nFUE/Tb197RnZwCI/AAAAAAAAECA/s_6velLdS0o/s1600/endpoint_2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="362" src="http://1.bp.blogspot.com/-XDqGVj_nFUE/Tb197RnZwCI/AAAAAAAAECA/s_6velLdS0o/s640/endpoint_2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;When you go back to the Service Health Tab of the Operations view you will now see that the Endpoint of this Business Service is still Online.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-zYVAjjgrZRs/Tb198EoL-MI/AAAAAAAAECI/YRF8MhhjxXs/s1600/endpoint_4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="202" src="http://2.bp.blogspot.com/-zYVAjjgrZRs/Tb198EoL-MI/AAAAAAAAECI/YRF8MhhjxXs/s640/endpoint_4.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;Click on the Online link and you will see that the Action link is not enabled.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-h2bkTjhGNBs/Tb198m-tkfI/AAAAAAAAECM/gLPEjQjELPk/s1600/endpoint_5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="182" src="http://3.bp.blogspot.com/-h2bkTjhGNBs/Tb198m-tkfI/AAAAAAAAECM/gLPEjQjELPk/s640/endpoint_5.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;If you work with the OEPE workshop you can also enable monitoring by opening the Business or Proxy Service in a text editor and change this setting manually.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-CbjxK-oB1jo/Tb198zxusCI/AAAAAAAAECQ/zASGzPbwLu8/s1600/endpoint_6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="280" src="http://3.bp.blogspot.com/-CbjxK-oB1jo/Tb198zxusCI/AAAAAAAAECQ/zASGzPbwLu8/s640/endpoint_6.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;When you disable the endpoint and take a look at the Service Health, you will now see that the endpoint is Offline&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-F6-yrv9ieRw/Tb19-HRtEJI/AAAAAAAAECc/RN6bUzs1Gas/s1600/endpoint_9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="196" src="http://4.bp.blogspot.com/-F6-yrv9ieRw/Tb19-HRtEJI/AAAAAAAAECc/RN6bUzs1Gas/s640/endpoint_9.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;Click on the Offline link&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-qV70A_usrmY/Tb19-mC_y8I/AAAAAAAAECg/ph5N3C83VY8/s1600/endpoint_10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://4.bp.blogspot.com/-qV70A_usrmY/Tb19-mC_y8I/AAAAAAAAECg/ph5N3C83VY8/s640/endpoint_10.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;When you know the endpoint is active again you can press the Action link and the OSB will check it for you and enable it again.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-UT5Bx7TNF5w/Tb19-8u9PaI/AAAAAAAAECk/GstYIiHAlkA/s1600/endpoint_11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="186" src="http://3.bp.blogspot.com/-UT5Bx7TNF5w/Tb19-8u9PaI/AAAAAAAAECk/GstYIiHAlkA/s400/endpoint_11.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;Next step is to make a SLA alert rule so can monitor and report the endpoints changes.&lt;br /&gt;
Open the SLA Alert Rules Tab of the Proxy and Business Service.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/--bKhpGK13Uc/Tb19_N_EOMI/AAAAAAAAECo/pk3FBApYmHM/s1600/endpoint_12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="420" src="http://4.bp.blogspot.com/--bKhpGK13Uc/Tb19_N_EOMI/AAAAAAAAECo/pk3FBApYmHM/s640/endpoint_12.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;Create a new Rule and assign an alert Destination&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-cX4usyS_6BU/Tb19_j0QgWI/AAAAAAAAECs/_I8kzvwaefQ/s1600/endpoint_13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="554" src="http://2.bp.blogspot.com/-cX4usyS_6BU/Tb19_j0QgWI/AAAAAAAAECs/_I8kzvwaefQ/s640/endpoint_13.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;Select Status for the endpoints monitoring. Make a rule for online and offline Endpoints.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-u6wvaS9xBMo/Tb1-AOFGGxI/AAAAAAAAECw/tRiv5SHa9Go/s1600/endpoint_14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="372" src="http://3.bp.blogspot.com/-u6wvaS9xBMo/Tb1-AOFGGxI/AAAAAAAAECw/tRiv5SHa9Go/s640/endpoint_14.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;You will now see these alerts in the SLA Alerts Tab of the Operations window of the SBConsole.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-giey3UvekS0/Tb1-AcvOL_I/AAAAAAAAEC0/jxtNfejy284/s1600/endpoint_15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="424" src="http://1.bp.blogspot.com/-giey3UvekS0/Tb1-AcvOL_I/AAAAAAAAEC0/jxtNfejy284/s640/endpoint_15.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-5906805883093490347?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/5906805883093490347/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=5906805883093490347" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/5906805883093490347?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/5906805883093490347?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/2wRUcSVdMco/osb-endpoint-monitoring-and-sla-alert.html" title="OSB Endpoint monitoring and SLA alert rules" /><author><name>Edwin Biemond</name><uri>https://profiles.google.com/113701679510703185415</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-uH4MAfpWMsI/AAAAAAAAAAI/AAAAAAAAAAA/SbF6ifmaSfU/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-ynB-8h8inS0/Tb197oGhfHI/AAAAAAAAECE/khG0e47fSac/s72-c/endpoint_3.png" height="72" width="72" /><thr:total>8</thr:total><feedburner:origLink>http://biemond.blogspot.com/2011/05/osb-endpoint-monitoring-and-sla-alert.html</feedburner:origLink></entry></feed>

