<?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:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;AkYAQHYzeSp7ImA9WxBSFk0.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047</id><updated>2009-12-23T23:42:21.881+01:00</updated><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="hub" href="http://pubsubhubbub.appspot.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>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>204</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" /><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><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry gd:etag="W/&quot;AkIDQ3o5eip7ImA9WxBSFEQ.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-6947602805509792203</id><published>2009-12-22T15:58:00.013+01:00</published><updated>2009-12-22T17:16:12.422+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-22T17:16:12.422+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WebLogic" /><category scheme="http://www.blogger.com/atom/ns#" term="EclipseLink" /><title>EJB Session Bean Security in Weblogic</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/WF7y4MDbr1G_hP3lfWwdyCswQaA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WF7y4MDbr1G_hP3lfWwdyCswQaA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/WF7y4MDbr1G_hP3lfWwdyCswQaA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WF7y4MDbr1G_hP3lfWwdyCswQaA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;With Weblogic it is relative easy to protect your deployed EJB's by adding roles. These roles are mapped to WLS groups or users. In this blog I will show you, how you can protect for example the EJB Session beans.&lt;br /&gt;I will start with securing an EJB3 Session Bean and later on in this article I will do the same only then in 2.1 way ( ejb-jar ).&lt;br /&gt;&lt;br /&gt;First we create the Remote interface ( JDeveloper can create the EJB Session bean and remote or local interface for you )&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.ejb.security.services;&lt;br /&gt;&lt;br /&gt;import java.util.List;&lt;br /&gt;import javax.ejb.Remote;&lt;br /&gt;&lt;br /&gt;import nl.whitehorses.ejb.security.entities.Departments;&lt;br /&gt;&lt;br /&gt;@Remote&lt;br /&gt;public interface HrModelSessionEJB {&lt;br /&gt;  Departments mergeDepartments(Departments departments);&lt;br /&gt;&lt;br /&gt;  List&amp;lt;Departments&amp;gt; getDepartmentsFindAll();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Create the EJB Session Bean. First we can optional add the @Resource annotation ( SessionContext ctx ) so we can retrieve the principal ( ctx.getCallerPrincipal) or check if the principal has the right role  ( ctx.isCallerInRole )&lt;br /&gt;To protect the Session bean methods we can add the @RolesAllowed or @PermitAll annotation ( @RolesAllowed({"adminsEJB"}) )&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.ejb.security.services;&lt;br /&gt;&lt;br /&gt;import java.security.Principal;&lt;br /&gt;&lt;br /&gt;import java.util.List;&lt;br /&gt;&lt;br /&gt;import javax.annotation.Resource;&lt;br /&gt;&lt;br /&gt;import javax.annotation.security.RolesAllowed;&lt;br /&gt;&lt;br /&gt;import javax.ejb.Remote;&lt;br /&gt;import javax.ejb.SessionContext;&lt;br /&gt;import javax.ejb.Stateless;&lt;br /&gt;&lt;br /&gt;import javax.persistence.EntityManager;&lt;br /&gt;import javax.persistence.PersistenceContext;&lt;br /&gt;&lt;br /&gt;import nl.whitehorses.ejb.security.entities.Departments;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;@Stateless(name = "HrModelSessionEJB", mappedName = "EJB_Security-HrModel-HrModelSessionEJB")&lt;br /&gt;@Remote&lt;br /&gt;public class HrModelSessionEJBBean implements HrModelSessionEJB {&lt;br /&gt;  @PersistenceContext(unitName="HrModel")&lt;br /&gt;  private EntityManager em;&lt;br /&gt;&lt;br /&gt;  public HrModelSessionEJBBean() {&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  @Resource SessionContext ctx;&lt;br /&gt;&lt;br /&gt;  @RolesAllowed({"adminsEJB"})&lt;br /&gt;  public Departments mergeDepartments(Departments departments) {&lt;br /&gt;      return em.merge(departments);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  @RolesAllowed({"adminsEJB","usersEJB"})&lt;br /&gt;  public List&amp;lt;Departments&amp;gt; getDepartmentsFindAll() {&lt;br /&gt;      Principal cp = ctx.getCallerPrincipal();&lt;br /&gt;      System.out.println("getname:" + cp.getName());&lt;br /&gt;      if ( ctx.isCallerInRole("adminsEJB")) {&lt;br /&gt;          System.out.println("user has admins role");&lt;br /&gt;      }&lt;br /&gt;      return em.createNamedQuery("Departments.findAll").getResultList();&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The last thing we need to do is to add the weblogic ejb deployment descriptor ( weblogic-ejb-jar ) , This maps the EJB roles to users or groups in Weblogic Security Realm ( myrealm ). Do manually or use JDeveloper 11g R1 PS1, this version has a nice visual editor for the weblogic descriptors files.&lt;br /&gt;The role-name must match with the roles names used in RolesAllowed annotation and the principal-name must match with a user or role in Weblogic Security Realm.&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;?xml version = '1.0' encoding = 'windows-1252'?&amp;gt;&lt;br /&gt;&amp;lt;weblogic-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;                xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-ejb-jar http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd"&lt;br /&gt;                xmlns="http://www.bea.com/ns/weblogic/weblogic-ejb-jar"&amp;gt;&lt;br /&gt;&amp;lt;weblogic-enterprise-bean&amp;gt;&lt;br /&gt;  &amp;lt;ejb-name&amp;gt;HrModelSessionEJB&amp;lt;/ejb-name&amp;gt;&lt;br /&gt;  &amp;lt;stateless-session-descriptor/&amp;gt;&lt;br /&gt;  &amp;lt;enable-call-by-reference&amp;gt;true&amp;lt;/enable-call-by-reference&amp;gt;&lt;br /&gt;&amp;lt;/weblogic-enterprise-bean&amp;gt;&lt;br /&gt;&amp;lt;security-role-assignment&amp;gt;&lt;br /&gt;  &amp;lt;role-name&amp;gt;usersEJB&amp;lt;/role-name&amp;gt;&lt;br /&gt;  &amp;lt;principal-name&amp;gt;scott&amp;lt;/principal-name&amp;gt;&lt;br /&gt;&amp;lt;/security-role-assignment&amp;gt;&lt;br /&gt;&amp;lt;security-role-assignment&amp;gt;&lt;br /&gt;  &amp;lt;role-name&amp;gt;adminsEJB&amp;lt;/role-name&amp;gt;&lt;br /&gt;  &amp;lt;principal-name&amp;gt;edwin&amp;lt;/principal-name&amp;gt;&lt;br /&gt;&amp;lt;/security-role-assignment&amp;gt;&lt;br /&gt;&amp;lt;/weblogic-ejb-jar&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Deploy your Session Bean to the Weblogicserver. In the Weblogic console we can check the permissions by going to the EJB deployment.&lt;br /&gt;Check the EJB roles&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SzDno_UCAEI/AAAAAAAADI0/OYpIWf5x_Ic/s1600-h/ejb_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 219px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SzDno_UCAEI/AAAAAAAADI0/OYpIWf5x_Ic/s400/ejb_1.png" alt="" id="BLOGGER_PHOTO_ID_5418085043102941250" border="0" /&gt;&lt;/a&gt;Which WLS users or groups are connected to the EJB role&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SzDnogwnDfI/AAAAAAAADIs/IGeR73jKTUI/s1600-h/ejb_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 204px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SzDnogwnDfI/AAAAAAAADIs/IGeR73jKTUI/s400/ejb_2.png" alt="" id="BLOGGER_PHOTO_ID_5418085034901310962" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;check the permissions of the Session methods.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SzDnob7KbvI/AAAAAAAADIk/84zMY-h0LB4/s1600-h/ejb_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 354px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SzDnob7KbvI/AAAAAAAADIk/84zMY-h0LB4/s400/ejb_3.png" alt="" id="BLOGGER_PHOTO_ID_5418085033603395314" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now we only have to make a test client and change the java.naming.security.principal property.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.ejb.security.test;&lt;br /&gt;&lt;br /&gt;import java.util.List;&lt;br /&gt;&lt;br /&gt;import java.util.Properties;&lt;br /&gt;&lt;br /&gt;import javax.naming.Context;&lt;br /&gt;import javax.naming.InitialContext;&lt;br /&gt;&lt;br /&gt;import nl.whitehorses.ejb.security.entities.Departments;&lt;br /&gt;import nl.whitehorses.ejb.security.services.HrModelSessionEJB;&lt;br /&gt;&lt;br /&gt;public class HrClient {&lt;br /&gt;   public HrClient() {&lt;br /&gt;       try {&lt;br /&gt;           Properties parm = new Properties();&lt;br /&gt;           parm.setProperty("java.naming.factory.initial","weblogic.jndi.WLInitialContextFactory");&lt;br /&gt;           parm.setProperty("java.naming.provider.url","t3://localhost:7101");&lt;br /&gt;           parm.setProperty("java.naming.security.principal","edwin");&lt;br /&gt;           parm.setProperty("java.naming.security.credentials","weblogic1");&lt;br /&gt;           final Context context =  new InitialContext(parm);&lt;br /&gt;&lt;br /&gt;           HrModelSessionEJB hr = (HrModelSessionEJB)context.lookup("EJB_Security-HrModel-HrModelSessionEJB#nl.whitehorses.ejb.security.services.HrModelSessionEJB");&lt;br /&gt;&lt;br /&gt;           for (Departments departments : (List&amp;lt;Departments&amp;gt;)hr.getDepartmentsFindAll()) {&lt;br /&gt;               System.out.println( "departmentId = " + departments.getDepartmentId() );&lt;br /&gt;               System.out.println( "departmentName = " + departments.getDepartmentName() );&lt;br /&gt;               System.out.println( "locationId = " + departments.getLocationId() );&lt;br /&gt;           }&lt;br /&gt;       } catch (Exception ex) {&lt;br /&gt;           ex.printStackTrace();&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public static void main(String[] args) {&lt;br /&gt;       HrClient hrClient = new HrClient();&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The EJB 2.1 way is a bit different, now we need the use the ebj-jar.xml and this requires an remote home interface. So first we need to create this.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.ejb.security.services;&lt;br /&gt;&lt;br /&gt;import java.rmi.RemoteException;&lt;br /&gt;&lt;br /&gt;import javax.ejb.CreateException;&lt;br /&gt;import javax.ejb.EJBHome;&lt;br /&gt;&lt;br /&gt;public interface HrModelSessionEJBHome extends EJBHome {&lt;br /&gt;  HrModelSessionEJB create() throws RemoteException, CreateException;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The remote interface is also different then its 3.0 version.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.ejb.security.services;&lt;br /&gt;&lt;br /&gt;import java.rmi.RemoteException;&lt;br /&gt;import java.util.List;&lt;br /&gt;import javax.ejb.EJBObject;&lt;br /&gt;&lt;br /&gt;import nl.whitehorses.ejb.security.entities.Departments;&lt;br /&gt;&lt;br /&gt;public interface HrModelSessionEJB extends EJBObject {&lt;br /&gt;    Departments mergeDepartments(Departments departments) throws RemoteException;&lt;br /&gt;&lt;br /&gt;    List&amp;lt;Departments&amp;gt; getDepartmentsFindAll() throws RemoteException;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The EJB Session Bean&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.ejb.security.services;&lt;br /&gt;&lt;br /&gt;import java.security.Principal;&lt;br /&gt;&lt;br /&gt;import java.util.List;&lt;br /&gt;import javax.annotation.Resource;&lt;br /&gt;&lt;br /&gt;import javax.ejb.EJBHome;&lt;br /&gt;import javax.ejb.EJBObject;&lt;br /&gt;import javax.ejb.Handle;&lt;br /&gt;import javax.ejb.Init;&lt;br /&gt;import javax.ejb.Remote;&lt;br /&gt;import javax.ejb.RemoteHome;&lt;br /&gt;import javax.ejb.Remove;&lt;br /&gt;import javax.ejb.SessionContext;&lt;br /&gt;import javax.ejb.Stateless;&lt;br /&gt;&lt;br /&gt;import javax.persistence.EntityManager;&lt;br /&gt;import javax.persistence.PersistenceContext;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import nl.whitehorses.ejb.security.entities.Departments;&lt;br /&gt;&lt;br /&gt;@Stateless(name = &amp;quot;HrModelSessionEJB&amp;quot;, mappedName = &amp;quot;EJB_Security-HrModel-HrModelSessionEJB&amp;quot;)&lt;br /&gt;@Remote({HrModelSessionEJB.class})&lt;br /&gt;@RemoteHome(HrModelSessionEJBHome.class)&lt;br /&gt;public class HrModelSessionEJBBean implements HrModelSessionEJB {&lt;br /&gt;    @PersistenceContext(unitName=&amp;quot;HrModel&amp;quot;)&lt;br /&gt;    private EntityManager em;&lt;br /&gt;&lt;br /&gt;    public HrModelSessionEJBBean() {&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @Resource SessionContext ctx;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    public Departments mergeDepartments(Departments departments) {&lt;br /&gt;        return em.merge(departments);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /** &amp;lt;code&amp;gt;select o from Departments o&amp;lt;/code&amp;gt; */&lt;br /&gt;    public List&amp;lt;Departments&amp;gt; getDepartmentsFindAll() {&lt;br /&gt;        Principal cp = ctx.getCallerPrincipal();&lt;br /&gt;        System.out.println(&amp;quot;getname:&amp;quot; + cp.getName());&lt;br /&gt;        if ( ctx.isCallerInRole(&amp;quot;adminsEJB&amp;quot;)) {&lt;br /&gt;            System.out.println(&amp;quot;user has admins role&amp;quot;);&lt;br /&gt;        }&lt;br /&gt;        return em.createNamedQuery(&amp;quot;Departments.findAll&amp;quot;).getResultList();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @Init&lt;br /&gt;    public void create(){};&lt;br /&gt;    &lt;br /&gt;    @Remove&lt;br /&gt;    public void remove(){};&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    public EJBHome getEJBHome() {&lt;br /&gt;        return null;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Object getPrimaryKey() {&lt;br /&gt;        return null;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Handle getHandle() {&lt;br /&gt;        return null;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public boolean isIdentical(EJBObject ejbObject) {&lt;br /&gt;        return false;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;We can use the same weblogic-ejb-jar.xml, now we only need to create ebj-jar.xml descriptor. This descriptor does the same as the RolesAllowed annotation&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;?xml version = '1.0' encoding = 'windows-1252'?&amp;gt;&lt;br /&gt;&amp;lt;ejb-jar xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&lt;br /&gt;         xsi:schemaLocation=&amp;quot;http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd&amp;quot;&lt;br /&gt;         version=&amp;quot;3.0&amp;quot; xmlns=&amp;quot;http://java.sun.com/xml/ns/javaee&amp;quot;&amp;gt;&lt;br /&gt;  &amp;lt;enterprise-beans&amp;gt;&lt;br /&gt;    &amp;lt;session&amp;gt;&lt;br /&gt;      &amp;lt;ejb-name&amp;gt;HrModelSessionEJB&amp;lt;/ejb-name&amp;gt;&lt;br /&gt;      &amp;lt;home&amp;gt;nl.whitehorses.ejb.security.services.HrModelSessionEJBHome&amp;lt;/home&amp;gt;&lt;br /&gt;      &amp;lt;remote&amp;gt;nl.whitehorses.ejb.security.services.HrModelSessionEJB&amp;lt;/remote&amp;gt;&lt;br /&gt;      &amp;lt;ejb-class&amp;gt;nl.whitehorses.ejb.security.services.HrModelSessionEJBBean&amp;lt;/ejb-class&amp;gt;&lt;br /&gt;      &amp;lt;session-type&amp;gt;Stateless&amp;lt;/session-type&amp;gt;&lt;br /&gt;      &amp;lt;transaction-type&amp;gt;Container&amp;lt;/transaction-type&amp;gt;&lt;br /&gt;      &amp;lt;security-role-ref&amp;gt;&lt;br /&gt;        &amp;lt;role-name&amp;gt;usersEJB&amp;lt;/role-name&amp;gt;&lt;br /&gt;      &amp;lt;/security-role-ref&amp;gt;&lt;br /&gt;      &amp;lt;security-role-ref&amp;gt;&lt;br /&gt;        &amp;lt;role-name&amp;gt;adminsEJB&amp;lt;/role-name&amp;gt;&lt;br /&gt;      &amp;lt;/security-role-ref&amp;gt;&lt;br /&gt;    &amp;lt;/session&amp;gt;&lt;br /&gt;  &amp;lt;/enterprise-beans&amp;gt;&lt;br /&gt;  &amp;lt;assembly-descriptor&amp;gt;&lt;br /&gt;    &amp;lt;security-role&amp;gt;&lt;br /&gt;      &amp;lt;role-name&amp;gt;usersEJB&amp;lt;/role-name&amp;gt;&lt;br /&gt;    &amp;lt;/security-role&amp;gt;&lt;br /&gt;    &amp;lt;security-role&amp;gt;&lt;br /&gt;      &amp;lt;role-name&amp;gt;adminsEJB&amp;lt;/role-name&amp;gt;&lt;br /&gt;    &amp;lt;/security-role&amp;gt;&lt;br /&gt;    &amp;lt;method-permission&amp;gt;&lt;br /&gt;      &amp;lt;role-name&amp;gt;usersEJB&amp;lt;/role-name&amp;gt;&lt;br /&gt;      &amp;lt;role-name&amp;gt;adminsEJB&amp;lt;/role-name&amp;gt;&lt;br /&gt;      &amp;lt;method&amp;gt;&lt;br /&gt;        &amp;lt;ejb-name&amp;gt;HrModelSessionEJB&amp;lt;/ejb-name&amp;gt;&lt;br /&gt;        &amp;lt;method-name&amp;gt;getDepartmentsFindAll&amp;lt;/method-name&amp;gt;&lt;br /&gt;      &amp;lt;/method&amp;gt;&lt;br /&gt;    &amp;lt;/method-permission&amp;gt;&lt;br /&gt;    &amp;lt;method-permission&amp;gt;&lt;br /&gt;      &amp;lt;role-name&amp;gt;adminsEJB&amp;lt;/role-name&amp;gt;&lt;br /&gt;      &amp;lt;method&amp;gt;&lt;br /&gt;        &amp;lt;ejb-name&amp;gt;HrModelSessionEJB&amp;lt;/ejb-name&amp;gt;&lt;br /&gt;        &amp;lt;method-name&amp;gt;mergeDepartments&amp;lt;/method-name&amp;gt;&lt;br /&gt;      &amp;lt;/method&amp;gt;&lt;br /&gt;    &amp;lt;/method-permission&amp;gt;&lt;br /&gt;  &amp;lt;/assembly-descriptor&amp;gt;&lt;br /&gt;&amp;lt;/ejb-jar&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And the test client.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.ejb.security.test;&lt;br /&gt;&lt;br /&gt;import java.util.List;&lt;br /&gt;&lt;br /&gt;import java.util.Properties;&lt;br /&gt;&lt;br /&gt;import javax.naming.Context;&lt;br /&gt;import javax.naming.InitialContext;&lt;br /&gt;&lt;br /&gt;import nl.whitehorses.ejb.security.entities.Departments;&lt;br /&gt;import nl.whitehorses.ejb.security.services.HrModelSessionEJB;&lt;br /&gt;import nl.whitehorses.ejb.security.services.HrModelSessionEJBHome;&lt;br /&gt;&lt;br /&gt;public class HrClient {&lt;br /&gt;    public HrClient() {&lt;br /&gt;        try {&lt;br /&gt;            Properties parm = new Properties();&lt;br /&gt;            parm.setProperty(&amp;quot;java.naming.factory.initial&amp;quot;,&amp;quot;weblogic.jndi.WLInitialContextFactory&amp;quot;);&lt;br /&gt;            parm.setProperty(&amp;quot;java.naming.provider.url&amp;quot;,&amp;quot;t3://localhost:7101&amp;quot;);&lt;br /&gt;            parm.setProperty(&amp;quot;java.naming.security.principal&amp;quot;,&amp;quot;edwin&amp;quot;);&lt;br /&gt;            parm.setProperty(&amp;quot;java.naming.security.credentials&amp;quot;,&amp;quot;weblogic1&amp;quot;);&lt;br /&gt;            final Context context =  new InitialContext(parm);&lt;br /&gt;&lt;br /&gt;            HrModelSessionEJBHome hRSessionEJB = (HrModelSessionEJBHome)context.lookup(&amp;quot;EJB_Security-HrModel-HrModelSessionEJB#nl.whitehorses.ejb.security.services.HrModelSessionEJBHome&amp;quot;);&lt;br /&gt;            HrModelSessionEJB hr = hRSessionEJB.create();&lt;br /&gt;&lt;br /&gt;            for (Departments departments : (List&amp;lt;Departments&amp;gt;)hr.getDepartmentsFindAll()) {&lt;br /&gt;                System.out.println( &amp;quot;departmentId = &amp;quot; + departments.getDepartmentId() );&lt;br /&gt;                System.out.println( &amp;quot;departmentName = &amp;quot; + departments.getDepartmentName() );&lt;br /&gt;                System.out.println( &amp;quot;locationId = &amp;quot; + departments.getLocationId() );&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        } catch (Exception ex) {&lt;br /&gt;            ex.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public static void main(String[] args) {&lt;br /&gt;        HrClient hrClient = new HrClient();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here is the &lt;a href="http://www.sbsframes.nl/jdeveloper/EJB_Security.zip"&gt;example workspace&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-6947602805509792203?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/6947602805509792203/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=6947602805509792203" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6947602805509792203?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6947602805509792203?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/JnEPrdJ63rA/ejb-session-bean-security-in-weblogic.html" title="EJB Session Bean Security in Weblogic" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_earSixbe3dw/SzDno_UCAEI/AAAAAAAADI0/OYpIWf5x_Ic/s72-c/ejb_1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/12/ejb-session-bean-security-in-weblogic.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUHQ3g6fyp7ImA9WxBTGE8.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-6601154559750340940</id><published>2009-12-14T21:38:00.007+01:00</published><updated>2009-12-14T22:30:32.617+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-14T22:30:32.617+01: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" /><title>SCA Spring in Weblogic 10.3.2 &amp; Soa Suite 11g Part 2</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/91hoNNJAV_FyBEQHBXBEY0z5BW8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/91hoNNJAV_FyBEQHBXBEY0z5BW8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/91hoNNJAV_FyBEQHBXBEY0z5BW8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/91hoNNJAV_FyBEQHBXBEY0z5BW8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;In my &lt;a href="http://biemond.blogspot.com/2009/12/sca-spring-in-weblogic-1032-soa-suite.html"&gt;previous post&lt;/a&gt; I made a SCA Spring example and deployed this on Weblogic 10.3.2 Now it is time to use the same spring context and java sources in a Soa Suite 11g composite ( without any changes) . Keep in mind SCA Spring in WLS and the Spring Component in Soa Suite is still in preview and will be supported in Patch Set2 of Soa Suite 11g.&lt;br /&gt;In this example I use the java Logger and BPEL component of &lt;a href="http://www.oracle.com/technology/architect/soa-suite-series/wli_custom_control_spring_component.html"&gt;Clemens OTN article&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;First I copied the java sources from my Weblogic SCA Spring project to the Soa project and created for demo purposes two Spring Bean configurations.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SyaodDQaobI/AAAAAAAADIc/zO56suOebUg/s1600-h/sca_spring_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 288px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SyaodDQaobI/AAAAAAAADIc/zO56suOebUg/s400/sca_spring_1.png" alt="" id="BLOGGER_PHOTO_ID_5415200819003433394" border="0" /&gt;&lt;/a&gt;The first has a bean with a service and a reference and the second one has only a bean with a service.  ( Off course I can combine these two together in one spring bean configuration, but this is more fun)&lt;br /&gt;&lt;br /&gt;The first spring bean configuration will just passthrough the java call. We need to remove the WS and EJB binding in the service and reference.  ( Soa Suite don't need this )&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="windows-1252" ?&amp;gt;&lt;br /&gt;&amp;lt;beans xmlns="http://www.springframework.org/schema/beans"&lt;br /&gt;    xmlns:util="http://www.springframework.org/schema/util"&lt;br /&gt;    xmlns:jee="http://www.springframework.org/schema/jee"&lt;br /&gt;    xmlns:lang="http://www.springframework.org/schema/lang"&lt;br /&gt;    xmlns:aop="http://www.springframework.org/schema/aop"&lt;br /&gt;    xmlns:tx="http://www.springframework.org/schema/tx"&lt;br /&gt;    xmlns:sca="http://xmlns.oracle.com/weblogic/weblogic-sca"&amp;gt;&lt;br /&gt;&amp;lt;!--Spring 2.5 Bean defintions go here--&amp;gt;&lt;br /&gt;&amp;lt;sca:service target="loggerPassThrough" name="LogServiceWS"&lt;br /&gt;            type="nl.whitehorses.wls.sca.spring.ILoggerComponent"&amp;gt;&lt;br /&gt;&amp;lt;/sca:service&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;bean class="nl.whitehorses.wls.sca.spring.LoggerPassThrough" name="loggerPassThrough"&amp;gt;&lt;br /&gt;  &amp;lt;property name="reference" ref="loggerEJBReference" /&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;sca:reference name="loggerEJBReference"&lt;br /&gt; type="nl.whitehorses.wls.sca.spring.ILoggerComponent"&amp;gt;&lt;br /&gt;&amp;lt;/sca:reference&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/beans&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The second spring bean configuration is the java logger. Here we also have to remove the WS binding in the service&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="windows-1252" ?&amp;gt;&lt;br /&gt;&amp;lt;beans xmlns="http://www.springframework.org/schema/beans"&lt;br /&gt;    xmlns:util="http://www.springframework.org/schema/util"&lt;br /&gt;    xmlns:jee="http://www.springframework.org/schema/jee"&lt;br /&gt;    xmlns:lang="http://www.springframework.org/schema/lang"&lt;br /&gt;    xmlns:aop="http://www.springframework.org/schema/aop"&lt;br /&gt;    xmlns:tx="http://www.springframework.org/schema/tx"&lt;br /&gt;    xmlns:sca="http://xmlns.oracle.com/weblogic/weblogic-sca"&amp;gt;&lt;br /&gt;&amp;lt;!--Spring 2.5 Bean defintions go here--&amp;gt;&lt;br /&gt;&amp;lt;sca:service target="logger" name="LogServiceEJB"&lt;br /&gt;            type="nl.whitehorses.wls.sca.spring.ILoggerComponent"&amp;gt;&lt;br /&gt;&amp;lt;/sca:service&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;bean class="nl.whitehorses.wls.sca.spring.LoggerComponentImpl" name="logger"&amp;gt;&lt;br /&gt;  &amp;lt;property name="output" ref="loggerOutput" /&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;bean id="loggerOutput" class="nl.whitehorses.wls.sca.spring.LoggerOutput"&amp;gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/beans&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now the composite application looks like this. We need to add some wires between the BPEL and Spring Components.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/Syaoc-RWNbI/AAAAAAAADIU/lgwVn8KV9yA/s1600-h/sca_spring_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 372px; height: 400px;" src="http://2.bp.blogspot.com/_earSixbe3dw/Syaoc-RWNbI/AAAAAAAADIU/lgwVn8KV9yA/s400/sca_spring_2.png" alt="" id="BLOGGER_PHOTO_ID_5415200817665160626" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/Syaoce7I88I/AAAAAAAADIE/SMZMHG7j8oQ/s1600-h/sca_spring_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 201px;" src="http://2.bp.blogspot.com/_earSixbe3dw/Syaoce7I88I/AAAAAAAADIE/SMZMHG7j8oQ/s400/sca_spring_3.png" alt="" id="BLOGGER_PHOTO_ID_5415200809250517954" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Open the BPEL component and add an invoke to call the partnerlink and create the input and output variables.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SyaocjWM20I/AAAAAAAADIM/RXJrucD1K0Y/s1600-h/sca_spring_2_5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 289px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SyaocjWM20I/AAAAAAAADIM/RXJrucD1K0Y/s400/sca_spring_2_5.png" alt="" id="BLOGGER_PHOTO_ID_5415200810437761858" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Deploy the composite and test it in the Soa Suite. With this as result.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SyaocLN85aI/AAAAAAAADH8/qfKl-xxyMDA/s1600-h/sca_spring_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 101px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SyaocLN85aI/AAAAAAAADH8/qfKl-xxyMDA/s400/sca_spring_4.png" alt="" id="BLOGGER_PHOTO_ID_5415200803960710562" border="0" /&gt;&lt;/a&gt;Conclusion: With the new SoaSuite Spring component it is relative easy to do a java call outs and you can exchange your SCA spring application from Weblogic to Soa Suite without any changes.&lt;br /&gt;&lt;br /&gt;Here is my &lt;a href="http://www.sbsframes.nl/jdeveloper/SoaSpring.zip"&gt;Soa Suite example workspace&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-6601154559750340940?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/6601154559750340940/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=6601154559750340940" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6601154559750340940?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6601154559750340940?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/zAk4T7QBLY0/sca-spring-in-weblogic-1032-soa-suite_14.html" title="SCA Spring in Weblogic 10.3.2 &amp; Soa Suite 11g Part 2" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_earSixbe3dw/SyaodDQaobI/AAAAAAAADIc/zO56suOebUg/s72-c/sca_spring_1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/12/sca-spring-in-weblogic-1032-soa-suite_14.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MNRno9fip7ImA9WxBTF0k.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-6842486872736480356</id><published>2009-12-13T21:31:00.006+01:00</published><updated>2009-12-13T22:58:17.466+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-13T22:58:17.466+01: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" /><title>SCA Spring in Weblogic 10.3.2 &amp; Soa Suite 11g</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OS11b4hwlLNE7l1C3Lqe7-zRdQ0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OS11b4hwlLNE7l1C3Lqe7-zRdQ0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OS11b4hwlLNE7l1C3Lqe7-zRdQ0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OS11b4hwlLNE7l1C3Lqe7-zRdQ0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;With Weblogic 10.3.2 ( part of Patch Set 1 of Fusion Middleware R1 ) Oracle released a preview of SCA Spring. For more info about this announcement see the &lt;a href="http://blogs.oracle.com/WebLogicServer/2009/12/getting_started_with_weblogic.html"&gt;blog of Raghav&lt;/a&gt;.&lt;br /&gt;This is great news because everything what works in SCA Spring can be used without any problem in Soa Suite 11g. With Patch Set 2 SCA Spring will be supported in WLS or Soa Suite.  For a Soa Suite Spring example see &lt;a href="http://www.oracle.com/technology/architect/soa-suite-series/wli_custom_control_spring_component.html"&gt;this blog of Clemens&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To test this I made a small example based on the blog of Clemens. In this test I will call a logging webservice and this service will pass the call to a passthrough bean which has a reference to an logging EJB service which calls a logging bean and this bean has an other bean injected which does the output.&lt;br /&gt;&lt;br /&gt;First deploy the weblogic-sca war as a library to the WLS server, you can find this war in  wlserver_10.3/common/deployable-libraries/ folder and is called weblogic-sca-1.0.war&lt;br /&gt;&lt;br /&gt;Create in JDeveloper a new web project ( no need for ADF ) . We don't need the spring jar or add some config in the web.xml ( this can be empty , don't need to add  spring listener )&lt;br /&gt;&lt;br /&gt;Add a library reference in your webapp to the weblogic-sca library, Do this in the weblogic.xml or weblogic-application.xml file&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;?xml version = '1.0' encoding = 'windows-1252'?&amp;gt;&lt;br /&gt;&amp;lt;weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;                 xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd"&lt;br /&gt;                 xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app"&amp;gt;&lt;br /&gt;   &amp;lt;library-ref&amp;gt;&lt;br /&gt;       &amp;lt;library-name&amp;gt;weblogic-sca&amp;lt;/library-name&amp;gt;&lt;br /&gt;   &amp;lt;/library-ref&amp;gt;&lt;br /&gt;&amp;lt;/weblogic-web-app&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Create a spring from jdeveloper and call this file spring-context.xml and put this in META-INF/jsca folder ( in the src folder )&lt;br /&gt;When you got experience with Apache Tuscany then this spring configuration is not so difficult.&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="windows-1252" ?&amp;gt;&lt;br /&gt;&amp;lt;beans xmlns="http://www.springframework.org/schema/beans"&lt;br /&gt;      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;      xmlns:sca="http://xmlns.oracle.com/weblogic/weblogic-sca"&lt;br /&gt;      xmlns:wlsb="http://xmlns.oracle.com/weblogic/weblogic-sca-binding"&lt;br /&gt;      xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"&lt;br /&gt;      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://xmlns.oracle.com/weblogic/weblogic-sca http://xmlns.oracle.com/weblogic/weblogic-sca/1.0/weblogic-sca.xsd http://xmlns.oracle.com/weblogic/weblogic-sca-binding http://xmlns.oracle.com/weblogic/weblogic-sca-binding/1.0/weblogic-sca-binding.xsd"&amp;gt;&lt;br /&gt; &amp;lt;!--Spring 2.5 Bean defintions go here--&amp;gt;&lt;br /&gt; &amp;lt;sca:service target="loggerPassThrough" name="LogServiceWS"&lt;br /&gt;              type="nl.whitehorses.wls.sca.spring.ILoggerComponent"&amp;gt;&lt;br /&gt;   &amp;lt;wlsb:binding.ws xmlns="http://xmlns.oracle.com/sca/1.0"&lt;br /&gt;               name="LoggerService_WS" uri="/LoggerService_Uri"&lt;br /&gt;               port="LoggerService_PORT"/&amp;gt;&lt;br /&gt; &amp;lt;/sca:service&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;sca:reference name="loggerEJBReference"&lt;br /&gt; type="nl.whitehorses.wls.sca.spring.ILoggerComponent"&amp;gt;&lt;br /&gt;   &amp;lt;wlsb:binding.ejb uri="LoggerService_EJB30_JNDI" /&amp;gt;&lt;br /&gt; &amp;lt;/sca:reference&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;bean class="nl.whitehorses.wls.sca.spring.LoggerPassThrough" name="loggerPassThrough"&amp;gt;&lt;br /&gt;    &amp;lt;property name="reference" ref="loggerEJBReference" /&amp;gt;&lt;br /&gt; &amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;sca:service target="logger" name="LogServiceEJB"&lt;br /&gt;              type="nl.whitehorses.wls.sca.spring.ILoggerComponent"&amp;gt;&lt;br /&gt;   &amp;lt;wlsb:binding.ejb uri="LoggerService_EJB30_JNDI" remote="true"&lt;br /&gt;                     name="LoggerService_EJB"/&amp;gt;&lt;br /&gt; &amp;lt;/sca:service&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;bean class="nl.whitehorses.wls.sca.spring.LoggerComponentImpl" name="logger"&amp;gt;&lt;br /&gt;    &amp;lt;property name="output" ref="loggerOutput" /&amp;gt;&lt;br /&gt; &amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;bean id="loggerOutput" class="nl.whitehorses.wls.sca.spring.LoggerOutput"&amp;gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/beans&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now we need to create a logger interface, this will be use by the WS &amp; EJB services and references.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.wls.sca.spring;&lt;br /&gt;&lt;br /&gt;public interface ILoggerComponent&lt;br /&gt;{&lt;br /&gt;   &lt;br /&gt;    /**&lt;br /&gt;     * Log a message, including the originating component, its instance id and&lt;br /&gt;     * a message.&lt;br /&gt;     * @param pComponentName the name of the component that sends this log msg&lt;br /&gt;     * @param pInstanceId the instanceId of the component instance&lt;br /&gt;     * @param pMessage the message to be logged&lt;br /&gt;     */&lt;br /&gt;    public void log (String pComponentName,&lt;br /&gt;                     String pInstanceId, String pMessage);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Create a passthrough class this will pass on the logger call to the ejb service. &lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.wls.sca.spring;&lt;br /&gt;&lt;br /&gt;public class LoggerPassThrough implements ILoggerComponent {&lt;br /&gt;    public LoggerPassThrough() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @Override&lt;br /&gt;    public void log(String pComponentName, String pInstanceId,&lt;br /&gt;                    String pMessage)  {&lt;br /&gt;    &lt;br /&gt;       reference.log(pComponentName, pInstanceId, pMessage);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    private ILoggerComponent reference;&lt;br /&gt;&lt;br /&gt;    public void setReference(ILoggerComponent reference) {&lt;br /&gt;        this.reference = reference;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public ILoggerComponent getReference() {&lt;br /&gt;        return reference;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Create the logger implementation class.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.wls.sca.spring;&lt;br /&gt;&lt;br /&gt;public class LoggerComponentImpl implements ILoggerComponent {&lt;br /&gt;    public LoggerComponentImpl() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @Override&lt;br /&gt;    public void log(String pComponentName, String pInstanceId,&lt;br /&gt;                    String pMessage)  {&lt;br /&gt;       output.logToConsole(pComponentName, pInstanceId, pMessage);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    private LoggerOutput output;&lt;br /&gt;&lt;br /&gt;    public void setOutput(LoggerOutput output) {&lt;br /&gt;        this.output = output;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public LoggerOutput getOutput() {&lt;br /&gt;        return output;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The last class prints the console output&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.wls.sca.spring;&lt;br /&gt;&lt;br /&gt;public class LoggerOutput {&lt;br /&gt;    public LoggerOutput() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void logToConsole(String pComponentName, String pInstanceId,  String pMessage)&lt;br /&gt;    {&lt;br /&gt;        StringBuffer logBuffer = new StringBuffer ();&lt;br /&gt;        logBuffer.append("[").append(pComponentName).append("] [Instance: ").&lt;br /&gt;            append(pInstanceId).append("] ").append(pMessage);&lt;br /&gt;        &lt;br /&gt;        System.out.println(logBuffer.toString());&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Deploy the web application the weblogic server and use soapui to test the service.  The wsdl url is in my case http://laptopedwin.wh.lan:7001/WlsSpring-ScaSpring-context-root/LoggerService_Uri?WSDL or make a EJB test client and use this ILoggerComponent logger = (ILoggerComponent)context.lookup("LoggerService_EJB30_JNDI");&lt;br /&gt;&lt;br /&gt;Here you can download &lt;a href="http://www.sbsframes.nl/jdeveloper/WlsSpring.zip"&gt;my example workspace&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-6842486872736480356?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/6842486872736480356/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=6842486872736480356" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6842486872736480356?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6842486872736480356?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/EMWyzPz6yGo/sca-spring-in-weblogic-1032-soa-suite.html" title="SCA Spring in Weblogic 10.3.2 &amp; Soa Suite 11g" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/12/sca-spring-in-weblogic-1032-soa-suite.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8DQXw-eyp7ImA9WxBTEEg.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-3722488663698539168</id><published>2009-12-05T23:34:00.010+01:00</published><updated>2009-12-06T00:47:50.253+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-06T00:47:50.253+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="adf" /><category scheme="http://www.blogger.com/atom/ns#" term="jsf" /><title>ADF Data push with Active Data Service</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/zEJfoctfyWLRDDAsQnphr23S2pU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zEJfoctfyWLRDDAsQnphr23S2pU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/zEJfoctfyWLRDDAsQnphr23S2pU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zEJfoctfyWLRDDAsQnphr23S2pU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;With Patch Set 1 of JDeveloper 11G we can push data to the JSF page. This is called &lt;a href="http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/adv_ads.htm"&gt;Active Data Service&lt;/a&gt; and this works with the following JSF component&lt;br /&gt;&lt;ul&gt;&lt;li&gt;activeCommandToolbarButton&lt;/li&gt;&lt;li&gt;activeImage&lt;/li&gt;&lt;li&gt;activeOutputText&lt;/li&gt;&lt;li&gt;table&lt;/li&gt;&lt;li&gt;tree&lt;/li&gt;&lt;li&gt;All DVT components&lt;/li&gt;&lt;/ul&gt;One requirement for this feature is you need to have a Datasource who supports data push. For example the BAM server of the Soa Suite support this.  For other cases you need to use the Active Data Proxy framework. In this blog I made a demo with 3  different working examples , The first is an example of Oracle this in the fusion demo and can be &lt;a href="http://www.oracle.com/technology/products/adf/adffaces/11/doc/demo/adf_faces_rc_demo.html"&gt;downloaded here&lt;/a&gt; , the second is the one of &lt;a href="http://matthiaswessendorf.wordpress.com/2009/12/05/adf-faces-and-server-side-push/"&gt;Matthias Wessendorf&lt;/a&gt; and the last is the one of the Oracle ADS documentation example which works with a EJB datacontol.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/Sxru2QhRabI/AAAAAAAADHw/0QV--Ltjqic/s1600-h/ads.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 297px;" src="http://3.bp.blogspot.com/_earSixbe3dw/Sxru2QhRabI/AAAAAAAADHw/0QV--Ltjqic/s400/ads.png" alt="" id="BLOGGER_PHOTO_ID_5411900518153939378" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In the next weeks I will make an ADS example with EJB and JMS, The ADS Page components will then listen on a topic for EJB data change events and refreshes the page with push .&lt;br /&gt;&lt;br /&gt;But first let me show what you need to do.&lt;br /&gt;Configure the adf-config.xml , located in  the .adf\META-INF folder ( workspace level). With this ADF file you can configure the push parameters, study these parameters because they can influence the application performance.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="windows-1252" ?&amp;gt;&lt;br /&gt;&amp;lt;adf-config xmlns="http://xmlns.oracle.com/adf/config"&lt;br /&gt;       xmlns:sec="http://xmlns.oracle.com/adf/security/config"&lt;br /&gt;       xmlns:ads="http://xmlns.oracle.com/adf/activedata/config"&amp;gt;&lt;br /&gt;&amp;lt;sec:adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config"&amp;gt;&lt;br /&gt;&amp;lt;CredentialStoreContext credentialStoreClass="oracle.adf.share.security.providers.jps.CSFCredentialStore"&lt;br /&gt;                       credentialStoreLocation="../../src/META-INF/jps-config.xml"/&amp;gt;&lt;br /&gt;&amp;lt;/sec:adf-security-child&amp;gt;&lt;br /&gt;&amp;lt;ads:adf-activedata-config xmlns="http://xmlns.oracle.com/adf/activedata/config"&amp;gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt; transport allows three settings:&lt;br /&gt; * streaming (default)&lt;br /&gt; * polling&lt;br /&gt; * long-polling&lt;br /&gt;--&amp;gt;&lt;br /&gt;&amp;lt;transport&amp;gt;long-polling&amp;lt;/transport&amp;gt;&lt;br /&gt;&amp;lt;latency-threshold&amp;gt;10000&amp;lt;/latency-threshold&amp;gt;&lt;br /&gt;&amp;lt;keep-alive-interval&amp;gt;10000&amp;lt;/keep-alive-interval&amp;gt;&lt;br /&gt;&amp;lt;polling-interval&amp;gt;3000&amp;lt;/polling-interval&amp;gt;&lt;br /&gt;&amp;lt;max-reconnect-attempt-time&amp;gt;1800000&amp;lt;/max-reconnect-attempt-time&amp;gt;&lt;br /&gt;&amp;lt;reconnect-wait-time&amp;gt;10000&amp;lt;/reconnect-wait-time&amp;gt;&lt;br /&gt;&amp;lt;/ads:adf-activedata-config&amp;gt;&lt;br /&gt;&amp;lt;/adf-config&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then create in the .adf\META-INF folder a new folder called services and put a new file in called adf-config.properties and add the following content.&lt;br /&gt;http\://xmlns.oracle.com/adf/activedata/config=oracle.adfinternal.view.faces.activedata.ActiveDataConfiguration$ActiveDataConfigCallback&lt;br /&gt;&lt;br /&gt;Go to your JSF page and drag and drop for example departments from your datacontrol  to your page. Choose a readonly table ( when you want to use inputtext instead of outputtext JSF components then keep in mind you need to reset the uicomponent else it won't get the new value )    and don't use Filtering on the table.&lt;br /&gt;This is how your JSF can look like.&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;           &amp;lt;af:table value="#{bindings.departmentsFindAll.collectionModel}"&lt;br /&gt;                     var="row"&lt;br /&gt;                     rows="#{bindings.departmentsFindAll.rangeSize}"&lt;br /&gt;                     emptyText="#{bindings.departmentsFindAll.viewable ? 'No data to display.' : 'Access Denied.'}"&lt;br /&gt;                     fetchSize="#{bindings.departmentsFindAll.rangeSize}"&lt;br /&gt;                     rowBandingInterval="0"&lt;br /&gt;                     selectedRowKeys="#{bindings.departmentsFindAll.collectionModel.selectedRow}"&lt;br /&gt;                     selectionListener="#{bindings.departmentsFindAll.collectionModel.makeCurrent}"&lt;br /&gt;                     rowSelection="single" id="t3"&amp;gt;&lt;br /&gt;             &amp;lt;af:column sortProperty="departmentId" sortable="true"&lt;br /&gt;                        headerText="#{bindings.departmentsFindAll.hints.departmentId.label}"&lt;br /&gt;                        id="c8"&amp;gt;&lt;br /&gt;               &amp;lt;af:outputText value="#{row.departmentId}" id="ot9"&amp;gt;&lt;br /&gt;                 &amp;lt;af:convertNumber groupingUsed="false"&lt;br /&gt;                                   pattern="#{bindings.departmentsFindAll.hints.departmentId.format}"/&amp;gt;&lt;br /&gt;               &amp;lt;/af:outputText&amp;gt;&lt;br /&gt;             &amp;lt;/af:column&amp;gt;&lt;br /&gt;             &amp;lt;af:column sortProperty="departmentName" sortable="true"&lt;br /&gt;                        headerText="#{bindings.departmentsFindAll.hints.departmentName.label}"&lt;br /&gt;                        id="c9"&amp;gt;&lt;br /&gt;               &amp;lt;af:outputText value="#{row.departmentName}" id="ot8"/&amp;gt;&lt;br /&gt;             &amp;lt;/af:column&amp;gt;&lt;br /&gt;           &amp;lt;/af:table&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here the pagedef of the page ,we need to have a handle to the departmentsFindAll tree in our Active Data Proxy framework.&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" ?&amp;gt;&lt;br /&gt;&amp;lt;pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"&lt;br /&gt;            version="11.1.1.55.36" id="ADStablePageDef"&lt;br /&gt;            Package="nl.whitehorses.app.view.pageDefs"&amp;gt;&lt;br /&gt;&amp;lt;parameters/&amp;gt;&lt;br /&gt;&amp;lt;executables&amp;gt;&lt;br /&gt;&amp;lt;iterator Binds="root" RangeSize="25" DataControl="CountrySessionEJBLocal"&lt;br /&gt;          id="CountrySessionEJBLocalIterator"/&amp;gt;&lt;br /&gt;&amp;lt;accessorIterator MasterBinding="CountrySessionEJBLocalIterator"&lt;br /&gt;                  Binds="departmentsFindAll" RangeSize="25"&lt;br /&gt;                  DataControl="CountrySessionEJBLocal"&lt;br /&gt;                  BeanClass="nl.whitehorses.model2.Departments"&lt;br /&gt;                  id="departmentsFindAllIterator"/&amp;gt;&lt;br /&gt;&amp;lt;/executables&amp;gt;&lt;br /&gt;&amp;lt;bindings&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;tree IterBinding="departmentsFindAllIterator" id="departmentsFindAll"&amp;gt;&lt;br /&gt;  &amp;lt;nodeDefinition DefName="nl.whitehorses.model2.Departments"&lt;br /&gt;                  Name="departmentsFindAll0"&amp;gt;&lt;br /&gt;    &amp;lt;AttrNames&amp;gt;&lt;br /&gt;      &amp;lt;Item Value="departmentId"/&amp;gt;&lt;br /&gt;      &amp;lt;Item Value="departmentName"/&amp;gt;&lt;br /&gt;    &amp;lt;/AttrNames&amp;gt;&lt;br /&gt;  &amp;lt;/nodeDefinition&amp;gt;&lt;br /&gt;&amp;lt;/tree&amp;gt;&lt;br /&gt;&amp;lt;/bindings&amp;gt;&lt;br /&gt;&amp;lt;/pageDefinition&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now we can make our own DepartmentModel where we add Active Data Service to it. We need the departmentsFindAll tree attribute from the pagedef.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.app.ads;&lt;br /&gt;&lt;br /&gt;import oracle.adf.model.BindingContext;&lt;br /&gt;import oracle.adf.model.binding.DCBindingContainer;&lt;br /&gt;import oracle.adf.view.rich.model.ActiveCollectionModelDecorator;&lt;br /&gt;&lt;br /&gt;import oracle.adf.view.rich.model.ActiveDataModel;&lt;br /&gt;&lt;br /&gt;import oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import org.apache.myfaces.trinidad.model.CollectionModel;&lt;br /&gt;&lt;br /&gt;public class DepartmentModel   extends ActiveCollectionModelDecorator {&lt;br /&gt;&lt;br /&gt; private MyActiveDataModel _activeDataModel = new MyActiveDataModel();&lt;br /&gt; private CollectionModel _model = null;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; public CollectionModel getCollectionModel() {&lt;br /&gt;    if (_model == null) {&lt;br /&gt;        DCBindingContainer dcBindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();&lt;br /&gt;        FacesCtrlHierBinding treeData = (FacesCtrlHierBinding)dcBindings.getControlBinding("departmentsFindAll");&lt;br /&gt;        _model = treeData.getCollectionModel();&lt;br /&gt;    }&lt;br /&gt;    return _model;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt; public ActiveDataModel getActiveDataModel() {&lt;br /&gt;      return _activeDataModel;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public MyActiveDataModel getMyActiveDataModel() {&lt;br /&gt;     return _activeDataModel;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Make your own active ActiveDataModel in which we start a thread where we fire change events.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.app.ads;&lt;br /&gt;&lt;br /&gt;import java.util.Collection;&lt;br /&gt;&lt;br /&gt;import java.util.concurrent.atomic.AtomicInteger;&lt;br /&gt;import oracle.adf.view.rich.activedata.BaseActiveDataModel;&lt;br /&gt;import oracle.adf.view.rich.event.ActiveDataUpdateEvent;&lt;br /&gt;&lt;br /&gt;public class MyActiveDataModel extends BaseActiveDataModel&lt;br /&gt;  {&lt;br /&gt;    protected void startActiveData(Collection&amp;lt;Object&amp;gt; rowKeys, int startChangeCount)&lt;br /&gt;    {&lt;br /&gt;      _listenerCount.incrementAndGet();&lt;br /&gt;      if (_listenerCount.get() == 1)&lt;br /&gt;      {&lt;br /&gt;        System.out.println(&amp;quot;start up&amp;quot;);&lt;br /&gt; &lt;br /&gt;        Runnable dataChanger = new Runnable()&lt;br /&gt;        {&lt;br /&gt;          public void run()&lt;br /&gt;          {&lt;br /&gt;            System.out.println(&amp;quot;MyThread starting.&amp;quot;);&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;              Thread.sleep(2000);&lt;br /&gt;              System.out.println(&amp;quot;thread running&amp;quot;);&lt;br /&gt;              Change chg = new Change();  &lt;br /&gt;              chg.triggerDataChange(MyActiveDataModel.this);&lt;br /&gt;            }&lt;br /&gt;            catch (Exception exc)&lt;br /&gt;            {&lt;br /&gt;              System.out.println(&amp;quot;MyThread exceptioned out.&amp;quot;);&lt;br /&gt;            }&lt;br /&gt;            System.out.println(&amp;quot;MyThread terminating.&amp;quot;);&lt;br /&gt;          }&lt;br /&gt;        };&lt;br /&gt;        Thread newThrd = new Thread(dataChanger);&lt;br /&gt;        newThrd.start();&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;    protected void stopActiveData(Collection&amp;lt;Object&amp;gt; rowKeys)&lt;br /&gt;    {&lt;br /&gt;      _listenerCount.decrementAndGet();&lt;br /&gt;      if (_listenerCount.get() == 0)&lt;br /&gt;      {&lt;br /&gt;        System.out.println(&amp;quot;tear down&amp;quot;);&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;    public int getCurrentChangeCount()&lt;br /&gt;    {&lt;br /&gt;      return _currEventId.get();&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;    public void bumpChangeCount()&lt;br /&gt;    {&lt;br /&gt;      _currEventId.incrementAndGet();&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;    public void dataChanged(ActiveDataUpdateEvent event)&lt;br /&gt;    {&lt;br /&gt;      fireActiveDataUpdate(event);&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;    private final AtomicInteger _listenerCount = new AtomicInteger(0);&lt;br /&gt;    private final AtomicInteger _currEventId = new AtomicInteger();&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;For demo purposes we send some change events. For this we need to know the Key of the department iterator and the attribute which changed. See the ADS help page for other events like insert ,delete etc..&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.app.ads;&lt;br /&gt;&lt;br /&gt;import oracle.adf.view.rich.event.ActiveDataEntry;&lt;br /&gt;&lt;br /&gt;import oracle.adf.view.rich.event.ActiveDataUpdateEvent;&lt;br /&gt;&lt;br /&gt;import oracle.adfinternal.view.faces.activedata.ActiveDataEventUtil;&lt;br /&gt;import oracle.adfinternal.view.faces.activedata.JboActiveDataEventUtil;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class Change {&lt;br /&gt;    public Change() {&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void triggerDataChange(MyActiveDataModel model) throws Exception {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;      for ( int i = 0 ; i &amp;lt; 10 ; i++) {&lt;br /&gt;        try {&lt;br /&gt;            Thread.sleep(4000);&lt;br /&gt;        } catch (InterruptedException ie) {&lt;br /&gt;            ie.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;br /&gt;        model.bumpChangeCount();&lt;br /&gt;        &lt;br /&gt;        ActiveDataUpdateEvent event =&lt;br /&gt;            ActiveDataEventUtil.buildActiveDataUpdateEvent(ActiveDataEntry.ChangeType.UPDATE,&lt;br /&gt;                                                           model.getCurrentChangeCount(),&lt;br /&gt;                                                           JboActiveDataEventUtil.convertKeyPath(new Object[] { new Long(10) , new Integer(0)  }),&lt;br /&gt;                                                           null,&lt;br /&gt;                                                           new String[] { &amp;quot;departmentName&amp;quot; },&lt;br /&gt;                                                           new Object[] { &amp;quot;Administration&amp;quot; });&lt;br /&gt;&lt;br /&gt;        model.dataChanged(event);&lt;br /&gt;&lt;br /&gt;        try {&lt;br /&gt;            Thread.sleep(2000);&lt;br /&gt;        } catch (InterruptedException ie) {&lt;br /&gt;            ie.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;    &lt;br /&gt;        model.bumpChangeCount();&lt;br /&gt;        event =&lt;br /&gt;            ActiveDataEventUtil.buildActiveDataUpdateEvent(ActiveDataEntry.ChangeType.UPDATE,&lt;br /&gt;                                                           model.getCurrentChangeCount(),&lt;br /&gt;                                                           JboActiveDataEventUtil.convertKeyPath(new Object[] {  new Long(30), new Integer(0) }),&lt;br /&gt;                                                           null,&lt;br /&gt;                                                           new String[] { &amp;quot;departmentName&amp;quot; },&lt;br /&gt;                                                           new Object[] { &amp;quot;Purchasing&amp;quot; });&lt;br /&gt;&lt;br /&gt;        model.dataChanged(event);&lt;br /&gt;        &lt;br /&gt;    }&lt;br /&gt;  }    &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;We need to add the DepartmentModel class as backing bean in the adfc-config or faces-config xml.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;&amp;lt;managed-bean&amp;gt;&lt;br /&gt; &amp;lt;managed-bean-name&amp;gt;DepartmentModel&amp;lt;/managed-bean-name&amp;gt;&lt;br /&gt; &amp;lt;managed-bean-class&amp;gt;nl.whitehorses.app.ads.DepartmentModel&amp;lt;/managed-bean-class&amp;gt;&lt;br /&gt; &amp;lt;managed-bean-scope&amp;gt;session&amp;lt;/managed-bean-scope&amp;gt;&lt;br /&gt;&amp;lt;/managed-bean&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And at last change the value attribute of the af:table to our managed bean&lt;br /&gt;af:table value="#{DepartmentModel}" var="row"&lt;br /&gt;&lt;br /&gt;Here you &lt;a href="http://www.sbsframes.nl/jdeveloper/ADF_EJB.zip"&gt;can download my demo&lt;/a&gt; workspace&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-3722488663698539168?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/3722488663698539168/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=3722488663698539168" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/3722488663698539168?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/3722488663698539168?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/pHN7_oeAiuk/adf-data-push-with-active-data-service.html" title="ADF Data push with Active Data Service" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_earSixbe3dw/Sxru2QhRabI/AAAAAAAADHw/0QV--Ltjqic/s72-c/ads.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">6</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/12/adf-data-push-with-active-data-service.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUAFQnc8eCp7ImA9WxNbFks.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-3190167570534819301</id><published>2009-11-19T21:33:00.003+01:00</published><updated>2009-11-19T21:48:33.970+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-19T21:48:33.970+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="adf" /><title>Find and Expand all nodes of an ADF Tree</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1j9ybkNRD8ITDPf3CN_1FBc8Buc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1j9ybkNRD8ITDPf3CN_1FBc8Buc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1j9ybkNRD8ITDPf3CN_1FBc8Buc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1j9ybkNRD8ITDPf3CN_1FBc8Buc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;I want to find and expand all nodes of an ADF Tree and I saw an Oracle Forum post of Kenyatta which gave me a nice solution.&lt;br /&gt;First some usefull methods.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;private void expandTreeChildrenNode(  RichTree rt&lt;br /&gt;                                   ,  FacesCtrlHierNodeBinding node&lt;br /&gt;                                   ,  List&amp;lt;Key&amp;gt; parentRowKey) {&lt;br /&gt;     ArrayList children = node.getChildren();&lt;br /&gt;     List&amp;lt;Key&amp;gt; rowKey;&lt;br /&gt;&lt;br /&gt;     if ( children != null )    {&lt;br /&gt;       for (int i = 0; i &amp;lt; children.size(); i++) {&lt;br /&gt;          rowKey = new ArrayList&amp;lt;Key&amp;gt;();&lt;br /&gt;          rowKey.addAll(parentRowKey);&lt;br /&gt;          rowKey.add(((FacesCtrlHierNodeBinding)children.get(i)).getRowKey());&lt;br /&gt;          rt.getDisclosedRowKeys().add(rowKey);&lt;br /&gt;          if (((FacesCtrlHierNodeBinding)(children.get(i))).getChildren() == null)&lt;br /&gt;            continue;&lt;br /&gt;            expandTreeChildrenNode(rt&lt;br /&gt;                                  ,(FacesCtrlHierNodeBinding)(node.getChildren().get(i))&lt;br /&gt;                                  , rowKey);&lt;br /&gt;          }&lt;br /&gt;     } &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt; // find a jsf component&lt;br /&gt;private UIComponent getUIComponent(String name) {&lt;br /&gt;     FacesContext facesCtx = FacesContext.getCurrentInstance();&lt;br /&gt;     return facesCtx.getViewRoot().findComponent(name) ;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private UIComponent getUIComponent(UIComponent component,String name ){&lt;br /&gt;     List&amp;lt;UIComponent&amp;gt; items = component.getChildren(); &lt;br /&gt;     for ( UIComponent item : items ) { &lt;br /&gt;       UIComponent found = getUIComponent(item,name);&lt;br /&gt;       if ( found != null ) {&lt;br /&gt;         return found; &lt;br /&gt;       }&lt;br /&gt;       if ( item.getId().equalsIgnoreCase(name)  ) { &lt;br /&gt;         return item;&lt;br /&gt;       }; &lt;br /&gt;     }&lt;br /&gt;     return null;&lt;br /&gt;} &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now find the ADF tree in a region and expand the main and child nodes of this tree &lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;// get the dymamic region of the main page&lt;br /&gt;RichRegion region = (RichRegion)getUIComponent(&amp;quot;dynam1&amp;quot;);&lt;br /&gt;&lt;br /&gt;if ( region != null) {&lt;br /&gt;   // find tree 2 and expand this tree &lt;br /&gt;   RichTree rt = (RichTree)getUIComponent(region,&amp;quot;t2&amp;quot;);&lt;br /&gt;   if ( rt != null ) {&lt;br /&gt;      int rowCount = rt.getRowCount();&lt;br /&gt;      List&amp;lt;Key&amp;gt; rowKey;&lt;br /&gt;      for (int j = 0; j &amp;lt; rowCount; j++) {&lt;br /&gt;         // expand the main nodes&lt;br /&gt;         FacesCtrlHierNodeBinding node = (FacesCtrlHierNodeBinding)rt.getRowData(j);&lt;br /&gt;         rowKey = new ArrayList&amp;lt;Key&amp;gt;();&lt;br /&gt;         rowKey.add(node.getRowKey());&lt;br /&gt;         rt.getDisclosedRowKeys().add(rowKey);&lt;br /&gt;         rt.setRowKey(rowKey);&lt;br /&gt;         // expand the child nodes of the main nodes&lt;br /&gt;         expandTreeChildrenNode(rt , node, rowKey);&lt;br /&gt;       }   &lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-3190167570534819301?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/3190167570534819301/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=3190167570534819301" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/3190167570534819301?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/3190167570534819301?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/ry2ajml5Xac/find-and-expand-all-nodes-of-adf-tree.html" title="Find and Expand all nodes of an ADF Tree" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/11/find-and-expand-all-nodes-of-adf-tree.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8FSXs9fyp7ImA9WxNbFks.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-7493333950186659765</id><published>2009-11-19T21:04:00.005+01:00</published><updated>2009-11-19T21:33:38.567+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-19T21:33:38.567+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="adf" /><category scheme="http://www.blogger.com/atom/ns#" term="adf taskflow" /><title>Find an UIComponent in an ADF Task Flow Region</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LJER9W4XEFDYG1QL8WcICDNJzkY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LJER9W4XEFDYG1QL8WcICDNJzkY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LJER9W4XEFDYG1QL8WcICDNJzkY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LJER9W4XEFDYG1QL8WcICDNJzkY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;When you want to find an UIComponent (like a Tree) inside an ADF Region you can not use findComponent on the ViewRoot because this will only search for the component in the JSF page and not in the JSF page fragments ( Task Flows). And off course you can use a backing bean to make a binding but I want to find the component by first searching for the right Region in the JSF page and then searching the component inside the Region. &lt;br /&gt;&lt;br /&gt;First I need to have some common methods. &lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;// find a jsf component inside the JSF page&lt;br /&gt;private UIComponent getUIComponent(String name) {&lt;br /&gt;     FacesContext facesCtx = FacesContext.getCurrentInstance();&lt;br /&gt;     return facesCtx.getViewRoot().findComponent(name) ;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// find a UIComponent inside a UIComponent &lt;br /&gt;private UIComponent getUIComponent(UIComponent component,String name ){&lt;br /&gt;  List&lt;UIComponent&gt; items = component.getChildren(); &lt;br /&gt;  for ( UIComponent item : items ) { &lt;br /&gt;     UIComponent found = getUIComponent(item,name);&lt;br /&gt;     if ( found != null ) {&lt;br /&gt;        return found; &lt;br /&gt;      }&lt;br /&gt;     if ( item.getId().equalsIgnoreCase(name)  ) { &lt;br /&gt;        return item;&lt;br /&gt;     } &lt;br /&gt;  }&lt;br /&gt;  return null;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;  &lt;br /&gt;&lt;br /&gt;Now we can find the right Region and then search inside the Region for the ADF Tree&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;// get the dymamic region of the main page&lt;br /&gt;RichRegion region = (RichRegion)getUIComponent("dynam1");&lt;br /&gt;&lt;br /&gt;if ( region != null) {&lt;br /&gt;  // find tree 2 &lt;br /&gt;  RichTree rt = (RichTree)getUIComponent(region,"t2");&lt;br /&gt;  if ( rt != null ) {&lt;br /&gt;  // do your thing&lt;br /&gt;  }   &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-7493333950186659765?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/7493333950186659765/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=7493333950186659765" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/7493333950186659765?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/7493333950186659765?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/-6zwLHkHe2o/find-uicomponent-in-adf-task-flow.html" title="Find an UIComponent in an ADF Task Flow Region" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/11/find-uicomponent-in-adf-task-flow.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYAQn87eyp7ImA9WxNbFEQ.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-5412685165399770482</id><published>2009-11-17T22:08:00.009+01:00</published><updated>2009-11-17T22:42:23.103+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-17T22:42:23.103+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g soa suite" /><title>Soa Suite 11g MDS deploy and removal ANT scripts</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/a5A49vkU8inNO5IeEUYBnaqvNJM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a5A49vkU8inNO5IeEUYBnaqvNJM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/a5A49vkU8inNO5IeEUYBnaqvNJM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a5A49vkU8inNO5IeEUYBnaqvNJM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;With the release of Soa Suite 11g R1 Patch Set 1 Oracle improved the standard ant scripts for MDS deployment and removal. Before PS1 we had an ant example of Clemens.&lt;br /&gt;Basically this is how my ANT scripts works.  First add your own metadata folders under the apps folder ( do this in jdeveloper\integration\seed\apps ).&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SwMVhykA9EI/AAAAAAAADHI/MQ5DD4hdBlA/s1600/mds_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 228px; height: 299px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SwMVhykA9EI/AAAAAAAADHI/MQ5DD4hdBlA/s400/mds_1.png" alt="" id="BLOGGER_PHOTO_ID_5405187648027423810" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;My ANT script will do the following steps for every metadata folder under apps&lt;br /&gt;&lt;ul&gt;&lt;li&gt;optionally remove the metadata folder from the remote Soa Suite Database MDS repository&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Make a zip file of the metadata files ( Local MDS file repository) .&lt;/li&gt;&lt;li&gt;Make a new Soa Bundle zip with this metadata zip&lt;/li&gt;&lt;li&gt;Deploy this soa bundle to the Soa Suite Server, The server will add this to the Database MDS&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;When you want to use the MDS files in your own project &lt;a href="http://biemond.blogspot.com/2009/07/using-shared-object-in-soa-suite-11g.html"&gt;read this blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To make this work copy the antcontrib jar to the jdeveloper\ant\lib folder ( because of the foreach and the propertycopy fucntion )&lt;br /&gt;Here is my build.properties&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&lt;br /&gt;# global&lt;br /&gt;wn.bea.home=C:/oracle/MiddlewareJdev11gR1PS1&lt;br /&gt;oracle.home=${wn.bea.home}/jdeveloper&lt;br /&gt;java.passed.home=${wn.bea.home}/jdk160_14_R27.6.5-32&lt;br /&gt;wl_home=${wn.bea.home}/wlserver_10.3&lt;br /&gt;&lt;br /&gt;# temp&lt;br /&gt;tmp.output.dir=c:/temp&lt;br /&gt;&lt;br /&gt;mds.reposistory=C:/oracle/MiddlewareJdev11gR1PS1/jdeveloper/integration/seed/apps/&lt;br /&gt;mds.applications=usarmy&lt;br /&gt;mds.undeploy=true&lt;br /&gt;&lt;br /&gt;deployment.plan.environment=dev&lt;br /&gt;&lt;br /&gt;# dev deployment server weblogic&lt;br /&gt;dev.serverURL=http://laptopedwin:8001&lt;br /&gt;dev.overwrite=true&lt;br /&gt;dev.user=weblogic&lt;br /&gt;dev.password=weblogic1&lt;br /&gt;dev.forceDefault=true&lt;br /&gt;&lt;br /&gt;# acceptance deployment server weblogic&lt;br /&gt;acc.serverURL=http://laptopedwin:8001&lt;br /&gt;acc.overwrite=true&lt;br /&gt;acc.user=weblogic&lt;br /&gt;acc.password=weblogic1&lt;br /&gt;acc.forceDefault=true&lt;br /&gt;&lt;/pre&gt;  &lt;br /&gt;&lt;br /&gt;The build.xml&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="iso-8859-1"?&amp;gt;&lt;br /&gt;&amp;lt;project name="soaDeployAll" default="deployMDS"&amp;gt;&lt;br /&gt;   &amp;lt;echo&amp;gt;basedir ${basedir}&amp;lt;/echo&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;property environment="env"/&amp;gt;&lt;br /&gt;   &amp;lt;echo&amp;gt;current folder ${env.CURRENT_FOLDER}&amp;lt;/echo&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;property file="${env.CURRENT_FOLDER}/build.properties"/&amp;gt; &lt;br /&gt;   &amp;lt;taskdef resource="net/sf/antcontrib/antcontrib.properties"/&amp;gt;&lt;br /&gt;   &amp;lt;import file="${basedir}/ant-sca-deploy.xml"/&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;target name="unDeployMDS"&amp;gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;undeploy MDS&amp;lt;/echo&amp;gt;&lt;br /&gt;       &amp;lt;foreach list="${mds.applications}" param="mds.application" target="undeployMDSApplication" inheritall="true" inheritrefs="false"/&amp;gt;&lt;br /&gt;   &amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;target name="deployMDS"&amp;gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;undeploy and deploy MDS&amp;lt;/echo&amp;gt;&lt;br /&gt;       &amp;lt;if&amp;gt;&lt;br /&gt;         &amp;lt;equals arg1="${mds.undeploy}" arg2="true"/&amp;gt;&lt;br /&gt;         &amp;lt;then&amp;gt;&lt;br /&gt;           &amp;lt;foreach list="${mds.applications}" param="mds.application" target="undeployMDSApplication" inheritall="true" inheritrefs="false"/&amp;gt;&lt;br /&gt;         &amp;lt;/then&amp;gt;&lt;br /&gt;       &amp;lt;/if&amp;gt;&lt;br /&gt;       &amp;lt;foreach list="${mds.applications}" param="mds.application" target="deployMDSApplication" inheritall="true" inheritrefs="false"/&amp;gt;&lt;br /&gt;   &amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;target name="deployMDSApplication"&amp;gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;deploy MDS application ${mds.application}&amp;lt;/echo&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;remove and create local MDS temp&amp;lt;/echo&amp;gt;&lt;br /&gt;       &amp;lt;property name="mds.deploy.dir" value="${tmp.output.dir}/${mds.application}"/&amp;gt;&lt;br /&gt;    &lt;br /&gt;       &amp;lt;delete dir="${mds.deploy.dir}"/&amp;gt;&lt;br /&gt;       &amp;lt;mkdir dir="${mds.deploy.dir}"/&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;create zip from file MDS store&amp;lt;/echo&amp;gt;&lt;br /&gt;      &amp;lt;zip destfile="${mds.deploy.dir}/${mds.application}_mds.jar" compress="false"&amp;gt;&lt;br /&gt;       &amp;lt;fileset dir="${mds.reposistory}" includes="${mds.application}/**"/&amp;gt;&lt;br /&gt;     &amp;lt;/zip&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;create zip with MDS jar&amp;lt;/echo&amp;gt;&lt;br /&gt;      &amp;lt;zip destfile="${mds.deploy.dir}/${mds.application}_mds.zip" compress="false"&amp;gt;&lt;br /&gt;       &amp;lt;fileset dir="${mds.deploy.dir}" includes="*.jar"/&amp;gt;&lt;br /&gt;     &amp;lt;/zip&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.serverURL"    from="${deployment.plan.environment}.serverURL"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.overwrite"    from="${deployment.plan.environment}.overwrite"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.user"         from="${deployment.plan.environment}.user"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.password"     from="${deployment.plan.environment}.password"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.forceDefault" from="${deployment.plan.environment}.forceDefault"/&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;deploy MDS app&amp;lt;/echo&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;deploy on ${deploy.serverURL} with user ${deploy.user}&amp;lt;/echo&amp;gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;deploy sarFile ${mds.deploy.dir}/${mds.application}_mds.zip&amp;lt;/echo&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;antcall target="deploy" inheritall="false"&amp;gt;&lt;br /&gt;            &amp;lt;param name="wl_home" value="${wl_home}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="oracle.home" value="${oracle.home}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="serverURL" value="${deploy.serverURL}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="user" value="${deploy.user}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="password" value="${deploy.password}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="overwrite" value="${deploy.overwrite}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="forceDefault" value="${deploy.forceDefault}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="sarLocation" value="${mds.deploy.dir}/${mds.application}_mds.zip"/&amp;gt;&lt;br /&gt;       &amp;lt;/antcall&amp;gt; &lt;br /&gt;   &amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;target name="undeployMDSApplication"&amp;gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;undeploy MDS application ${mds.application}&amp;lt;/echo&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.serverURL"    from="${deployment.plan.environment}.serverURL"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.overwrite"    from="${deployment.plan.environment}.overwrite"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.user"         from="${deployment.plan.environment}.user"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.password"     from="${deployment.plan.environment}.password"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.forceDefault" from="${deployment.plan.environment}.forceDefault"/&amp;gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;echo&amp;gt;undeploy MDS app folder apps/${mds.application} &amp;lt;/echo&amp;gt;&lt;br /&gt;        &amp;lt;antcall target="removeSharedData" inheritall="false"&amp;gt;&lt;br /&gt;             &amp;lt;param name="wl_home" value="${wl_home}"/&amp;gt;&lt;br /&gt;             &amp;lt;param name="oracle.home" value="${oracle.home}"/&amp;gt;&lt;br /&gt;             &amp;lt;param name="serverURL" value="${deploy.serverURL}"/&amp;gt;&lt;br /&gt;             &amp;lt;param name="user" value="${deploy.user}"/&amp;gt;&lt;br /&gt;             &amp;lt;param name="password" value="${deploy.password}"/&amp;gt;&lt;br /&gt;             &amp;lt;param name="folderName" value="${mds.application}"/&amp;gt;&lt;br /&gt;        &amp;lt;/antcall&amp;gt;&lt;br /&gt;   &amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/project&amp;gt;&lt;br /&gt;&lt;/pre&gt;  &lt;br /&gt;&lt;br /&gt;and at last the deployMDS.bat file&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;set ORACLE_HOME=C:\oracle\MiddlewareJdev11gR1PS1&lt;br /&gt;set ANT_HOME=%ORACLE_HOME%\jdeveloper\ant&lt;br /&gt;set PATH=%ANT_HOME%\bin;%PATH%&lt;br /&gt;set JAVA_HOME=%ORACLE_HOME%\jdk160_14_R27.6.5-32&lt;br /&gt;&lt;br /&gt;set CURRENT_FOLDER=%CD%&lt;br /&gt;&lt;br /&gt;ant -f build.xml deployMDS -Dbasedir=%ORACLE_HOME%\jdeveloper\bin&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-5412685165399770482?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/5412685165399770482/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=5412685165399770482" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/5412685165399770482?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/5412685165399770482?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/Yk-2DAF0azY/soa-suite-11g-mds-deploy-and-removal.html" title="Soa Suite 11g MDS deploy and removal ANT scripts" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_earSixbe3dw/SwMVhykA9EI/AAAAAAAADHI/MQ5DD4hdBlA/s72-c/mds_1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/11/soa-suite-11g-mds-deploy-and-removal.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MCR3k8fip7ImA9WxNbFEw.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-2938499456402098512</id><published>2009-11-16T22:09:00.011+01:00</published><updated>2009-11-16T23:44:26.776+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-16T23:44:26.776+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="Oracle Service Bus" /><title>Calling a Soa Suite Direct Binding Service from Java &amp; OSB</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Xcb5Dsa8yWeRHVMF4XL6Ru4VVcU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Xcb5Dsa8yWeRHVMF4XL6Ru4VVcU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Xcb5Dsa8yWeRHVMF4XL6Ru4VVcU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Xcb5Dsa8yWeRHVMF4XL6Ru4VVcU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;I was trying to connect Oracle Soa Suite 11G R1 PS1 with the OSB when I saw this  new Direct Binding Service in the Soa Suite 11G. This direct binding make it possible to start this RMI service from OSB or Java. In a &lt;a href="http://biemond.blogspot.com/2009/11/invoking-soa-suite-11g-service-from.html"&gt;previous blog&lt;/a&gt; I already called a Soa Service from Java using the ADF binding but this direct binding makes it also possible to call this also from OSB using the SB transport .  In this Blog I will call this RMI synchronous service from Java, I can not use this binding in OSB 10.3.1, probably in the next version of the OSB I can.&lt;br /&gt;&lt;br /&gt;First we add the Direct Binding Service to exposed Services side of the composite and use the WSDL of one of the other exposed services and add a Wire to the Component.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SwHB4WzxIiI/AAAAAAAADG4/FVRODSpjS0k/s1600/soa_rmi_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 282px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SwHB4WzxIiI/AAAAAAAADG4/FVRODSpjS0k/s400/soa_rmi_1.png" alt="" id="BLOGGER_PHOTO_ID_5404814201760850466" border="0" /&gt;&lt;/a&gt;In the source view of the composite xml you can see that this service uses the direct binding.&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;service name="RMIService" ui:wsdlLocation="BPELProcess1.wsdl"&amp;gt;&lt;br /&gt;&amp;lt;interface.wsdl interface="http://xmlns.oracle.com/HelloWorld/Helloworld/BPELProcess1#wsdl.interface(BPELProcess1)"/&amp;gt;&lt;br /&gt;&amp;lt;binding.direct/&amp;gt;&lt;br /&gt;&amp;lt;/service&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;To see the WSDL of this service go to http://localhost:8001/soa-infra/ and select your RMI service.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SwHVYRefnpI/AAAAAAAADHA/W91dXc8BI3U/s1600/soa_rmi_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 206px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SwHVYRefnpI/AAAAAAAADHA/W91dXc8BI3U/s400/soa_rmi_2.png" alt="" id="BLOGGER_PHOTO_ID_5404835640806186642" border="0" /&gt;&lt;/a&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.soa.client;&lt;br /&gt;&lt;br /&gt;import java.io.StringWriter;&lt;br /&gt;import java.io.StringReader;&lt;br /&gt;&lt;br /&gt;import java.util.Hashtable;&lt;br /&gt;import java.util.Map;&lt;br /&gt;import java.util.HashMap;&lt;br /&gt;&lt;br /&gt;import javax.naming.Context;&lt;br /&gt;&lt;br /&gt;import javax.xml.transform.Transformer;&lt;br /&gt;import javax.xml.transform.TransformerFactory;&lt;br /&gt;import javax.xml.transform.dom.DOMSource;&lt;br /&gt;import javax.xml.transform.stream.StreamResult;&lt;br /&gt;&lt;br /&gt;import oracle.soa.api.PayloadFactory;&lt;br /&gt;import oracle.soa.api.XMLMessageFactory;&lt;br /&gt;import oracle.soa.api.invocation.DirectConnection;&lt;br /&gt;import oracle.soa.api.message.Message;&lt;br /&gt;import oracle.soa.api.message.Payload;&lt;br /&gt;&lt;br /&gt;import oracle.soa.management.CompositeDN;&lt;br /&gt;import oracle.soa.management.facade.Locator;&lt;br /&gt;import oracle.soa.management.facade.LocatorFactory;&lt;br /&gt;&lt;br /&gt;import org.w3c.dom.Element;&lt;br /&gt;import org.w3c.dom.Node;&lt;br /&gt;import org.w3c.dom.Document;&lt;br /&gt;&lt;br /&gt;import javax.xml.parsers.DocumentBuilder;&lt;br /&gt;import javax.xml.parsers.DocumentBuilderFactory;&lt;br /&gt;&lt;br /&gt;import org.xml.sax.InputSource;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class StartRMIProcess {&lt;br /&gt;&lt;br /&gt; public StartRMIProcess() {&lt;br /&gt;     super();&lt;br /&gt;&lt;br /&gt;     Hashtable jndiProps = new Hashtable();&lt;br /&gt;     jndiProps.put(Context.PROVIDER_URL, "t3://localhost:8001/soa-infra");&lt;br /&gt;     jndiProps.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");&lt;br /&gt;     jndiProps.put(Context.SECURITY_PRINCIPAL, "weblogic");&lt;br /&gt;     jndiProps.put(Context.SECURITY_CREDENTIALS, "weblogic1");&lt;br /&gt;     jndiProps.put("dedicated.connection", "true");&lt;br /&gt;&lt;br /&gt;     Locator locator = null;&lt;br /&gt;     try {&lt;br /&gt;         // connect to the soa server&lt;br /&gt;         locator = LocatorFactory.createLocator(jndiProps);&lt;br /&gt;&lt;br /&gt;         // find composite  default domain,  Helloworld Composite, version 1.0&lt;br /&gt;         CompositeDN compositedn = new CompositeDN("default", "Helloworld", "1.0");&lt;br /&gt;&lt;br /&gt;         // call the direct binding of the Helloworld composite&lt;br /&gt;         DirectConnection conn = locator.createDirectConnection(compositedn,"RMIService");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;         String inputPayload =&lt;br /&gt;         "&amp;lt;client:process xmlns:client=\"http://xmlns.oracle.com/HelloWorld/Helloworld/BPELProcess1\"&amp;gt;\n" +&lt;br /&gt;         "   &amp;lt;client:input&amp;gt;hello&amp;lt;/client:input&amp;gt;\n" +&lt;br /&gt;         "&amp;lt;/client:process&amp;gt;\n" ;&lt;br /&gt;      &lt;br /&gt;         DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();&lt;br /&gt;         DocumentBuilder builder = docBuilderFactory.newDocumentBuilder();&lt;br /&gt;         Document doc =  builder.parse(new InputSource(new StringReader(inputPayload)));&lt;br /&gt;         Element  root = doc.getDocumentElement();&lt;br /&gt;&lt;br /&gt;         //&amp;lt;wsdl:message name="BPELProcess1RequestMessage"&amp;gt;&lt;br /&gt;         //        &amp;lt;wsdl:part name="payload" element="client:process"/&amp;gt;&lt;br /&gt;         //&amp;lt;/wsdl:message&amp;gt;&lt;br /&gt;&lt;br /&gt;         Map&amp;lt;String, Element&amp;gt; partData = new HashMap&amp;lt;String,Element&amp;gt;();&lt;br /&gt;         // have to use payload see BPELProcess1RequestMessage&lt;br /&gt;         partData.put("payload", root);&lt;br /&gt;&lt;br /&gt;         Payload&amp;lt;Element&amp;gt; payload = PayloadFactory.createXMLPayload(partData);&lt;br /&gt;&lt;br /&gt;         //Messages are created using the MessageFactory&lt;br /&gt;         Message&amp;lt;Element&amp;gt; request = XMLMessageFactory.getInstance().createMessage();&lt;br /&gt;         request.setPayload(payload);&lt;br /&gt;&lt;br /&gt;         //&amp;lt;wsdl:portType name="BPELProcess1"&amp;gt;&lt;br /&gt;         //        &amp;lt;wsdl:operation name="process"&amp;gt;&lt;br /&gt;         //                &amp;lt;wsdl:input  message="client:BPELProcess1RequestMessage" /&amp;gt;&lt;br /&gt;         //                &amp;lt;wsdl:output message="client:BPELProcess1ResponseMessage"/&amp;gt;&lt;br /&gt;         //        &amp;lt;/wsdl:operation&amp;gt;&lt;br /&gt;         //&amp;lt;/wsdl:portType&amp;gt;&lt;br /&gt;         // this is a request-reply service so we need to use conn.request else use conn.post&lt;br /&gt;         // need to provide operation name so we need to use process&lt;br /&gt;         Message&amp;lt;Element&amp;gt; response = conn.request("process", request);&lt;br /&gt;&lt;br /&gt;         TransformerFactory tFactory = TransformerFactory.newInstance();&lt;br /&gt;         Transformer transformer = tFactory.newTransformer();&lt;br /&gt;         transformer.setOutputProperty("indent", "yes");&lt;br /&gt;         StringWriter sw = new StringWriter();&lt;br /&gt;         StreamResult result = new StreamResult(sw);&lt;br /&gt;&lt;br /&gt;         //&amp;lt;wsdl:message name="BPELProcess1ResponseMessage"&amp;gt;&lt;br /&gt;         //        &amp;lt;wsdl:part name="payload" element="client:processResponse"/&amp;gt;&lt;br /&gt;         //&amp;lt;/wsdl:message&amp;gt;&lt;br /&gt;         // need to use payload again&lt;br /&gt;         DOMSource source =  new DOMSource((Node)response.getPayload().getData().get("payload"));&lt;br /&gt;&lt;br /&gt;         transformer.transform(source, result);&lt;br /&gt;         System.out.println("Result\n"+sw.toString());&lt;br /&gt;  &lt;br /&gt;     } catch (Exception e) {&lt;br /&gt;         e.printStackTrace();&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;     StartRMIProcess startRMIProcess = new StartRMIProcess();&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-2938499456402098512?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/2938499456402098512/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=2938499456402098512" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/2938499456402098512?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/2938499456402098512?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/_nfPUFlpins/calling-soa-suite-direct-binding.html" title="Calling a Soa Suite Direct Binding Service from Java &amp; OSB" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_earSixbe3dw/SwHB4WzxIiI/AAAAAAAADG4/FVRODSpjS0k/s72-c/soa_rmi_1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/11/calling-soa-suite-direct-binding.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4NRns7eip7ImA9WxNbEk0.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-2577291801514867621</id><published>2009-11-14T13:54:00.023+01:00</published><updated>2009-11-14T15:29:57.502+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-14T15:29:57.502+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="adf" /><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g" /><title>ADF Contextual Events in 11G R1 PS1</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/PiETZTTcZdukxVw9PyB0xnKqet0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PiETZTTcZdukxVw9PyB0xnKqet0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/PiETZTTcZdukxVw9PyB0xnKqet0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PiETZTTcZdukxVw9PyB0xnKqet0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;In a &lt;a href="http://biemond.blogspot.com/2009/01/passing-adf-events-between-task-flow.html"&gt;previous blog&lt;/a&gt; I already talked about ADF events and how you can use it in the Task Flow interaction communication.  With the new JDeveloper 11g Patch Set 1, Oracle really improved this event mechanism and the JDeveloper IDE support for these events.&lt;br /&gt;In this blog entry I will show you the new features and give you examples of a tree and table selection Event  and inputtext change Event.&lt;br /&gt;First we start by adding events to the ADF application.  The first way we can do it,  is by selecting an af:inputtext, af:tree or af:table component . Here an example of how you can add an event to an inputtext. Contextual Events is now part of the component property window.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/Sv6vMcdXTKI/AAAAAAAADFg/lL-ZVzbCM2M/s1600-h/adf_events_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 335px; height: 400px;" src="http://1.bp.blogspot.com/_earSixbe3dw/Sv6vMcdXTKI/AAAAAAAADFg/lL-ZVzbCM2M/s400/adf_events_1.png" alt="" id="BLOGGER_PHOTO_ID_5403949231223819426" border="0" /&gt;&lt;/a&gt;The second big difference is that you can change the payload of the event. You can return now what you want,  for example an binding or a backing bean method. In the previous release the payload was fixed ( return of the MethodAction or the new value of an attribute). If you don't  specify a payload then this is the default.&lt;br /&gt;And you can restrict the events by adding a condition to the event. In this case it only fires when the value is hello&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/Sv6wNdaKKeI/AAAAAAAADFo/e-WC8g6VPDU/s1600-h/adf_events_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 351px;" src="http://4.bp.blogspot.com/_earSixbe3dw/Sv6wNdaKKeI/AAAAAAAADFo/e-WC8g6VPDU/s400/adf_events_2.png" alt="" id="BLOGGER_PHOTO_ID_5403950348170308066" border="0" /&gt;&lt;/a&gt;The events are registered in the pagedef of the page or fragment. This is how it can looks like.&lt;br /&gt;In this case the attributeValue got a restricted event and in the bottom the default payload is changed for this event.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/Sv6yxl4tf5I/AAAAAAAADGA/wqkgx8oZwsg/s1600-h/adf_events_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 293px;" src="http://4.bp.blogspot.com/_earSixbe3dw/Sv6yxl4tf5I/AAAAAAAADGA/wqkgx8oZwsg/s400/adf_events_3.png" alt="" id="BLOGGER_PHOTO_ID_5403953167944482706" border="0" /&gt;&lt;/a&gt;The pagedef editor got a Contextual Events tab, where we can add producers or subscription to an event.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/Sv6yJdaSIKI/AAAAAAAADFw/B5mR3B597yU/s1600-h/adf_events_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 231px;" src="http://4.bp.blogspot.com/_earSixbe3dw/Sv6yJdaSIKI/AAAAAAAADFw/B5mR3B597yU/s400/adf_events_4.png" alt="" id="BLOGGER_PHOTO_ID_5403952478474608802" border="0" /&gt;&lt;/a&gt;Lets subscribe to this attribute event. First we need to add an MethodAction to a page or fragment. We can call this method and pass on the attribute payload. I made a java class with this method and generate a DataControl on this class.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/Sv61CRvVyvI/AAAAAAAADGQ/XhW3ST9d0KI/s1600-h/adf_events_5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 45px;" src="http://3.bp.blogspot.com/_earSixbe3dw/Sv61CRvVyvI/AAAAAAAADGQ/XhW3ST9d0KI/s400/adf_events_5.png" alt="" id="BLOGGER_PHOTO_ID_5403955653617502962" border="0" /&gt;&lt;/a&gt;Open the page definition and go the Subscribers tab where we add a new one subscription. We need to select the event and the publisher ( or use any ) and the handler, this is the ADF MethodAction which has 3 parameters. And we need to provide the required values for these parameters.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/Sv61CTSzxHI/AAAAAAAADGI/Vv3lnU97UqA/s1600-h/adf_events_6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 233px;" src="http://1.bp.blogspot.com/_earSixbe3dw/Sv61CTSzxHI/AAAAAAAADGI/Vv3lnU97UqA/s400/adf_events_6.png" alt="" id="BLOGGER_PHOTO_ID_5403955654034703474" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;That's all for the Inputtext. The value is now passed on to a other page fragment.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ADF Table selection Event&lt;/span&gt;&lt;br /&gt;We can do the same with the ADF Table component, just select the table and go to the Contextual Events part of the property window. You can now select a class and in my case is that the Department class.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/Sv63dRzP-mI/AAAAAAAADGY/J9druNM37RQ/s1600-h/adf_events_7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 354px; height: 400px;" src="http://1.bp.blogspot.com/_earSixbe3dw/Sv63dRzP-mI/AAAAAAAADGY/J9druNM37RQ/s400/adf_events_7.png" alt="" id="BLOGGER_PHOTO_ID_5403958316513622626" border="0" /&gt;&lt;/a&gt;To do something usefull with this Table selection event I add a method to the Java datacontrol and add this as a MethodAction to a pagedef of a page or fragment&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;public String tableEvent( Object payload) {&lt;br /&gt; if ( payload != null) {&lt;br /&gt;   System.out.println("handle tableEvent");&lt;br /&gt;   DCBindingContainerCurrencyChangeEvent event = (DCBindingContainerCurrencyChangeEvent)payload;&lt;br /&gt;   DCDataRow row = (DCDataRow)event.getRow();&lt;br /&gt;   if ( row.getDataProvider() instanceof Department ) {&lt;br /&gt;     // do department stuff like displaying the department task flow&lt;br /&gt;     Department dept = (Context.Department)row.getDataProvider();&lt;br /&gt;     return "handle tableEvent for Department "+dept.getName();&lt;br /&gt;   }&lt;br /&gt; } else {&lt;br /&gt;      return "empty payload tableEvent";&lt;br /&gt; }&lt;br /&gt; return null;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now we can add a subscription to this event and we call the above method as handler of this event.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/Sv65wK0o9SI/AAAAAAAADGg/ZWqUFnuAUoo/s1600-h/adf_events_8.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 203px;" src="http://1.bp.blogspot.com/_earSixbe3dw/Sv65wK0o9SI/AAAAAAAADGg/ZWqUFnuAUoo/s400/adf_events_8.png" alt="" id="BLOGGER_PHOTO_ID_5403960840081175842" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ADF Tree Selection Event&lt;/span&gt;&lt;br /&gt;This is almost the same as an ADF Table but now we can define more events because a tree can have different levels , In my case I made a department / employee example so I can have a department and employee event and do different things with this. For example show a department or employee Task Flow.&lt;br /&gt;Here you see two events in the property window of the ADF tree. One for the department selection and one for the employees&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/Sv67ST3l_AI/AAAAAAAADGw/cnCNZLksaRo/s1600-h/adf_events_9.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 118px;" src="http://3.bp.blogspot.com/_earSixbe3dw/Sv67ST3l_AI/AAAAAAAADGw/cnCNZLksaRo/s400/adf_events_9.png" alt="" id="BLOGGER_PHOTO_ID_5403962526136663042" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This is how it looks like  in the page defintion with an event on every level of the tree.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/Sv67SM6VV5I/AAAAAAAADGo/fEusIYLKMos/s1600-h/adf_events_10.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 325px;" src="http://2.bp.blogspot.com/_earSixbe3dw/Sv67SM6VV5I/AAAAAAAADGo/fEusIYLKMos/s400/adf_events_10.png" alt="" id="BLOGGER_PHOTO_ID_5403962524269107090" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Here is my &lt;a href="http://www.sbsframes.nl/jdeveloper/Events.zip"&gt;example workspace&lt;/a&gt; with Task Flows who produces these different event and the index page who pass the events on to the output Task Flow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-2577291801514867621?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/2577291801514867621/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=2577291801514867621" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/2577291801514867621?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/2577291801514867621?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/neKvqk6ek1o/adf-contextual-events-in-11g-r1-ps1.html" title="ADF Contextual Events in 11G R1 PS1" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_earSixbe3dw/Sv6vMcdXTKI/AAAAAAAADFg/lL-ZVzbCM2M/s72-c/adf_events_1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/11/adf-contextual-events-in-11g-r1-ps1.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYFRnc9eCp7ImA9WxNbE0w.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-485732256046671341</id><published>2009-11-12T19:48:00.008+01:00</published><updated>2009-11-15T21:15:17.960+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-15T21:15:17.960+01: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 11g" /><title>New features of the EJB Datatcontrol, Query panel and Range size</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/PHO0sDbIbrU_c2f9z24eB6qUi9E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PHO0sDbIbrU_c2f9z24eB6qUi9E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/PHO0sDbIbrU_c2f9z24eB6qUi9E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PHO0sDbIbrU_c2f9z24eB6qUi9E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;With Patch Set 1 of JDeveloper 11G R1 Oracle improved the ADF EJB Datacontrol with two important features. We can now use this EJB Datacontrol in a Querypanel, this makes searching with EJB's a lot easier and the second big improvement is the range size option, so you don't get all the rows in one time, this can improve the performance of your ADF application and will generate less network traffic.&lt;br /&gt;With JDeveloper you can generate an EJB datacontol on an EJB session bean and this Datacontol can be used in ADF. In this blog entry I will show you what the new features are and how you can do it yourself.&lt;br /&gt;&lt;br /&gt;First we start with an entity, this is a normal entity on the country table in the HR schema ( I use the eclipselink persistence implementation, which supported very well in JDeveloper )&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SvxZ5s0lhhI/AAAAAAAADFY/1nZzppvwsCA/s1600-h/ejb_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 343px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SvxZ5s0lhhI/AAAAAAAADFY/1nZzppvwsCA/s400/ejb_1.png" alt="" id="BLOGGER_PHOTO_ID_5403292500756891154" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Next step is to create a Session Bean where we add some  Facade Methods.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SvxZ5Y1JKjI/AAAAAAAADFQ/76kkfgU3Qj8/s1600-h/ejb_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SvxZ5Y1JKjI/AAAAAAAADFQ/76kkfgU3Qj8/s400/ejb_2.png" alt="" id="BLOGGER_PHOTO_ID_5403292495390517810" border="0" /&gt;&lt;/a&gt;Here you can see that JDeveloper adds a queryByRange Facade method which we be used by ADF for the range size option.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SvxZ5e1V-mI/AAAAAAAADFI/8dAmKrcL7X0/s1600-h/ejb_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 302px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SvxZ5e1V-mI/AAAAAAAADFI/8dAmKrcL7X0/s400/ejb_3.png" alt="" id="BLOGGER_PHOTO_ID_5403292497001970274" border="0" /&gt;&lt;/a&gt;Here you can see the Session Bean code with the queryByRange method&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SvxZ5NZaS7I/AAAAAAAADFA/c8AAdsnyzPE/s1600-h/ejb_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 319px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SvxZ5NZaS7I/AAAAAAAADFA/c8AAdsnyzPE/s400/ejb_4.png" alt="" id="BLOGGER_PHOTO_ID_5403292492321409970" border="0" /&gt;&lt;/a&gt;Generate a Datacontrol on this Session Bean,&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SvxZv9NRJ0I/AAAAAAAADE4/mIZjRnaohw0/s1600-h/ejb_5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 381px; height: 400px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SvxZv9NRJ0I/AAAAAAAADE4/mIZjRnaohw0/s400/ejb_5.png" alt="" id="BLOGGER_PHOTO_ID_5403292333356689218" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;If we now go the viewcontroller project we can use this Country EJB datacontrol ( add the EJB model project to the viewcontroller project dependency or add the EJB ADF library to the project) . In the Data Controls window you can see the Named Criteria folder in the countriesFindAll method. Drag the All Queriable Attributes on the JSF page and select the Query Panel option.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SvxZvq4lnTI/AAAAAAAADEw/PLkWtzvlrY8/s1600-h/ejb_6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 326px; height: 276px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SvxZvq4lnTI/AAAAAAAADEw/PLkWtzvlrY8/s400/ejb_6.png" alt="" id="BLOGGER_PHOTO_ID_5403292328438111538" border="0" /&gt;&lt;/a&gt;With this as result, a customizable search panel and when you configure MDS you can even save the user queries in the MDS repository.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SvxZvn2RsWI/AAAAAAAADEo/CJ5ktkeNMdU/s1600-h/ejb_7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 244px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SvxZvn2RsWI/AAAAAAAADEo/CJ5ktkeNMdU/s400/ejb_7.png" alt="" id="BLOGGER_PHOTO_ID_5403292327623111010" border="0" /&gt;&lt;/a&gt;The last feature of the EJB Datacontrol is the Range Set option. Default the ADF iterator get the data in set of 25 records ( this is a pagedef option on the iterator ).  When the ADF table on the JSF view is full with rows then it won't get the rest of the rows unles you use the scrollbar or use the Next Set Operation.  The Next and Previous Set are new options for the EJB Datacontrol.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SvxZveoE0mI/AAAAAAAADEg/fzEuLUk6xTI/s1600-h/ejb_8.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 314px; height: 351px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SvxZveoE0mI/AAAAAAAADEg/fzEuLUk6xTI/s400/ejb_8.png" alt="" id="BLOGGER_PHOTO_ID_5403292325147628130" border="0" /&gt;&lt;/a&gt;Use the scrollbar or the next / previous Set button to get all the rows.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SvxZvBw8AoI/AAAAAAAADEY/bV_e8T1w1RM/s1600-h/ejb_9.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 136px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SvxZvBw8AoI/AAAAAAAADEY/bV_e8T1w1RM/s400/ejb_9.png" alt="" id="BLOGGER_PHOTO_ID_5403292317400171138" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Here some eclipselink logging to let you see that is really works.&lt;br /&gt;&lt;br /&gt;[EL Fine]: 2009-11-12 14:03:47.375--ServerSession(22965561)--SELECT COUNT(COUNTRY_ID) FROM COUNTRIES&lt;br /&gt;&lt;br /&gt;[EL Fine]: 2009-11-12 14:03:47.39 --SELECT * FROM (SELECT /*+ FIRST_ROWS */ a.*, ROWNUM rnum  FROM (SELECT COUNTRY_ID AS COUNTRY_ID1&lt;br /&gt;, COUNTRY_NAME AS COUNTRY_NAME2, REGION_ID AS REGION_ID3 FROM COUNTRIES) a WHERE ROWNUM &lt;= ?) WHERE rnum &gt; ?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;bind =&gt; [5, 0]&lt;/span&gt;&lt;br /&gt;[EL Fine]: 2009-11-12 14:03:49.953 --SELECT * FROM (SELECT /*+ FIRST_ROWS */ a.*, ROWNUM rnum  FROM (SELECT COUNTRY_ID AS COUNTRY_ID1&lt;br /&gt;, COUNTRY_NAME AS COUNTRY_NAME2, REGION_ID AS REGION_ID3 FROM COUNTRIES) a WHERE ROWNUM &lt;= ?) WHERE rnum &gt; ?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;bind =&gt; [10, 5]&lt;/span&gt;&lt;br /&gt;[EL Fine]: 2009-11-12 14:04:39.281 --SELECT * FROM (SELECT /*+ FIRST_ROWS */ a.*, ROWNUM rnum  FROM (SELECT COUNTRY_ID AS COUNTRY_ID1&lt;br /&gt;, COUNTRY_NAME AS COUNTRY_NAME2, REGION_ID AS REGION_ID3 FROM COUNTRIES) a WHERE ROWNUM &lt;= ?) WHERE rnum &gt; ?&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;bind =&gt; [15, 10]&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-485732256046671341?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/485732256046671341/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=485732256046671341" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/485732256046671341?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/485732256046671341?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/Le9QUK9Ax3g/new-featues-of-ejb-datatcontrol-query.html" title="New features of the EJB Datatcontrol, Query panel and Range size" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_earSixbe3dw/SvxZ5s0lhhI/AAAAAAAADFY/1nZzppvwsCA/s72-c/ejb_1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/11/new-featues-of-ejb-datatcontrol-query.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUHRn45cCp7ImA9WxNUGE0.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-6247982031277750434</id><published>2009-11-06T20:28:00.010+01:00</published><updated>2009-11-09T21:57:17.028+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-09T21:57:17.028+01: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" /><title>Installing Soa Suite 10.1.3.5.1 on Weblogic</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/3cILEvaSmOirVeQ8R_nLAFSU55Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3cILEvaSmOirVeQ8R_nLAFSU55Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/3cILEvaSmOirVeQ8R_nLAFSU55Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3cILEvaSmOirVeQ8R_nLAFSU55Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Yesterday Oracle released Soa Suite 10.1.3.5.1, the version which you can install on Weblogic 10.3.1 ( FMW11g version ). This is a full version so you don't early versions or extra patches to makes this work.&lt;br /&gt;&lt;br /&gt;We need to download &lt;a href="http://www.oracle.com/technology/software/products/ias/htdocs/wls_main.html"&gt;Weblogic 10.3.1&lt;/a&gt; and &lt;a href="http://www.oracle.com/technology/software/products/ias/htdocs/101310.html"&gt;Soa Suite 10.1.3.5.1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;first step is to install Weblogic 10.3.1, I use C:\oracle\Soa10gWls as my wls middleware home folder&lt;br /&gt;&lt;br /&gt;Now we can go to the Soa suite part, first we need to create a bpel, esb and wsm repository.&lt;br /&gt;&lt;br /&gt;Extract the soa suite install zip and go to the rca folder located in ias_windows_x86_101351\Disk1\install\soa_schemas\irca&lt;br /&gt;&lt;br /&gt;We need to set a database home for the jdbc driver.&lt;br /&gt;set ORACLE_HOME=C:\oracle\product\11.1.0\db_1&lt;br /&gt;We can use the jdk of the new  weblogic install&lt;br /&gt;set JAVA_HOME=C:\oracle\Soa10gWls\jdk160_11&lt;br /&gt;&lt;br /&gt;Now we can start irca.bat&lt;br /&gt;&lt;br /&gt;After a succesfull install of the repository we can start the  soa suite installer in this folder ias_windows_x86_101351\Disk1&lt;br /&gt;&lt;br /&gt;Very important the destination path must be in a folder of the just created wls middleware home so I use C:\oracle\Soa10gWls\soa10g&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SvR5eMmm3dI/AAAAAAAADEQ/Q_73qQWXFFY/s1600-h/soa10g_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 319px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SvR5eMmm3dI/AAAAAAAADEQ/Q_73qQWXFFY/s400/soa10g_1.png" alt="" id="BLOGGER_PHOTO_ID_5401075412810259922" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;As weblogic home location use C:\oracle\Soa10gWls\wlserver_10.3&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SvR5d3q4keI/AAAAAAAADEI/7HpYBjYA-kI/s1600-h/soa10g_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 321px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SvR5d3q4keI/AAAAAAAADEI/7HpYBjYA-kI/s400/soa10g_2.png" alt="" id="BLOGGER_PHOTO_ID_5401075407191052770" border="0" /&gt;&lt;/a&gt;We are ready with the install&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SvR5WqdF_dI/AAAAAAAADEA/DHagN6-UQQM/s1600-h/soa10g_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 321px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SvR5WqdF_dI/AAAAAAAADEA/DHagN6-UQQM/s400/soa10g_3.png" alt="" id="BLOGGER_PHOTO_ID_5401075283384466898" border="0" /&gt;&lt;/a&gt;Now we to start script for wsm go to the  C:\oracle\Soa10gWls\soa10g\config\ folder and start&lt;br /&gt;configureSOA.bat&lt;br /&gt;&lt;br /&gt;Last step is to create a Soa domain just like Soa Suite 11g and select the Soa Suite 10.1.3.5.1 option&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SvR5WdNnUAI/AAAAAAAADD4/DN7NUfLj05Q/s1600-h/soa10g_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 288px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SvR5WdNnUAI/AAAAAAAADD4/DN7NUfLj05Q/s400/soa10g_4.png" alt="" id="BLOGGER_PHOTO_ID_5401075279829880834" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Provide the orabpel and oraesb schema passwords.&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SvR5WNNErDI/AAAAAAAADDo/tAUsG2zqamY/s1600-h/soa10g_6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 291px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SvR5WNNErDI/AAAAAAAADDo/tAUsG2zqamY/s400/soa10g_6.png" alt="" id="BLOGGER_PHOTO_ID_5401075275532643378" border="0" /&gt;&lt;/a&gt;Start the admin server and go to&lt;span style="font-weight: bold;"&gt; http://localhost:7001/console&lt;/span&gt; where we  can take a look at the server. The soa suite server is called soa10g_server1&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SvR5V_phdUI/AAAAAAAADDg/aXqk09KtyE4/s1600-h/soa10g_7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 66px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SvR5V_phdUI/AAAAAAAADDg/aXqk09KtyE4/s400/soa10g_7.png" alt="" id="BLOGGER_PHOTO_ID_5401075271893873986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;When we want to start the soa server we need to go the soa domain bin folder&lt;br /&gt;C:\oracle\Soa10gWls\user_projects\domains\soa1013_domain\bin&lt;br /&gt;and use "&lt;span style="font-weight: bold;"&gt;startManagedWebLogic.cmd soa10g_server1&lt;/span&gt;" to start the server.&lt;br /&gt;&lt;br /&gt;This are the default installation url's of the Soa Suite applications&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;http://localhost:9700/esb&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;http://localhost:9700/BPELConsole&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;http://localhost:9700/ccore&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And we need to use &lt;span style="font-weight: bold;"&gt;soaadmin &lt;/span&gt;as username to log in and use &lt;span style="font-weight: bold;"&gt;weblogic1 &lt;/span&gt;as password.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The issues that I had and luckily also solved.&lt;br /&gt;&lt;br /&gt;Asynchronous routing fails with this error oracle.tip.esb.server.common.exceptions.BusinessEventRetriableException: Failed to enqueue deferred event "oracle.tip.esb.server.dispatch.QueueHandlerException: Publisher not exist for system "{0}"&lt;br /&gt;&lt;br /&gt;Thanks to Juan Pablo&lt;br /&gt;&lt;br /&gt;change the ESB_PARAMETER table on ORAESB schema the following parameters:&lt;br /&gt;&lt;br /&gt;PROP_NAME_CONTROL_TCF_JNDI         OracleASjms/ControlTCF&lt;br /&gt;PROP_NAME_MONITOR_TCF_JNDI         OracleASjms/MonitorTCF&lt;br /&gt;PROP_NAME_ERROR_TCF_JNDI         OracleASjms/ErrorTCF&lt;br /&gt;PROP_NAME_ERROR_RETRY_TCF_JNDI OracleASjms/ErrorRetryTCF&lt;br /&gt;PROP_NAME_DEFERRED_TCF_JNDI OracleASjms/DeferredTCF&lt;br /&gt;PROP_NAME_ERROR_XATCF_JNDI         OracleASjms/ErrorTCF&lt;br /&gt;PROP_NAME_DEFERRED_XATCF_JNDI OracleASjms/DeferredTCF&lt;br /&gt;&lt;br /&gt;to&lt;br /&gt;&lt;br /&gt;PROP_NAME_CONTROL_TCF_JNDI         ESB_CONTROL&lt;br /&gt;PROP_NAME_MONITOR_TCF_JNDI         ESB_MONITOR&lt;br /&gt;PROP_NAME_ERROR_TCF_JNDI         ESB_ERROR&lt;br /&gt;PROP_NAME_ERROR_RETRY_TCF_JNDI ESB_ERROR_RETRY&lt;br /&gt;PROP_NAME_DEFERRED_TCF_JNDI ESB_JAVA_DEFERRED&lt;br /&gt;PROP_NAME_ERROR_XATCF_JNDI         ESB_ERROR&lt;br /&gt;PROP_NAME_DEFERRED_XATCF_JNDI ESB_JAVA_DEFERRED&lt;br /&gt;&lt;br /&gt;and in the ESB console change the Property of Topic Location of every system  to ESB_JAVA_DEFERRED&lt;br /&gt;&lt;br /&gt;and see the comments for more fixes&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-6247982031277750434?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/6247982031277750434/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=6247982031277750434" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6247982031277750434?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6247982031277750434?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/d_w2LrdEvrI/installing-soa-suite-101351-on-weblogic.html" title="Installing Soa Suite 10.1.3.5.1 on Weblogic" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_earSixbe3dw/SvR5eMmm3dI/AAAAAAAADEQ/Q_73qQWXFFY/s72-c/soa10g_1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/11/installing-soa-suite-101351-on-weblogic.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QNQ3kyfSp7ImA9WxNUE0o.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-6890026028788358903</id><published>2009-11-04T22:24:00.006+01:00</published><updated>2009-11-04T22:49:52.795+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-04T22:49:52.795+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g soa suite" /><title>Invoking Soa Suite 11g Service from java</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JY81JN_yrzBask-aOvkaWG82dUg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JY81JN_yrzBask-aOvkaWG82dUg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JY81JN_yrzBask-aOvkaWG82dUg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JY81JN_yrzBask-aOvkaWG82dUg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;In Soa Suite 11g we can not call the composite service directly from java. We need to copy the service in the composite, change its binding to adf and wire this service to the component. All the credits goes to &lt;a href="http://blogs.oracle.com/jaylee/2009/08/invoking_composite_from_javajs.html"&gt;Jay's Blog&lt;/a&gt;  and Clemens, Great work.&lt;br /&gt;&lt;br /&gt;The first step is to open the composite xml and find your service.&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" ?&amp;gt;&lt;br /&gt;&amp;lt;!-- Generated by Oracle SOA Modeler version 1.0 at [8/25/09 3:01 PM]. --&amp;gt;&lt;br /&gt;&amp;lt;composite name="Helloworld"&lt;br /&gt;          revision="1.0"&lt;br /&gt;          label="2009-08-25_15-01-51_078"&lt;br /&gt;          mode="active"&lt;br /&gt;          state="on"&lt;br /&gt;          xmlns="http://xmlns.oracle.com/sca/1.0"&lt;br /&gt;          xmlns:xs="http://www.w3.org/2001/XMLSchema"&lt;br /&gt;          xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"&lt;br /&gt;          xmlns:orawsp="http://schemas.oracle.com/ws/2006/01/policy"&lt;br /&gt;          xmlns:ui="http://xmlns.oracle.com/soa/designer/"&amp;gt;&lt;br /&gt; &amp;lt;import namespace="http://xmlns.oracle.com/HelloWorld/Helloworld/BPELProcess1"&lt;br /&gt;         location="BPELProcess1.wsdl" importType="wsdl"/&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;service name="bpelprocess1_client_ep" ui:wsdlLocation="BPELProcess1.wsdl"&amp;gt;&lt;br /&gt;    &amp;lt;interface.wsdl interface="http://xmlns.oracle.com/HelloWorld/Helloworld/BPELProcess1#wsdl.interface(BPELProcess1)"/&amp;gt;&lt;br /&gt;     &amp;lt;binding.ws port="http://xmlns.oracle.com/HelloWorld/Helloworld/BPELProcess1#wsdl.endpoint(bpelprocess1_client_ep/BPELProcess1_pt)"&amp;gt;&lt;br /&gt;     &amp;lt;/binding.ws&amp;gt;&lt;br /&gt;  &amp;lt;/service&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Copy this service and give it a unique name and now we need to add the binding.adf binding to this service instead of the binding.ws&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;  &amp;lt;service name="bpelprocess1_client_ep" ui:wsdlLocation="BPELProcess1.wsdl"&amp;gt;&lt;br /&gt;    &amp;lt;interface.wsdl interface="http://xmlns.oracle.com/HelloWorld/Helloworld/BPELProcess1#wsdl.interface(BPELProcess1)"/&amp;gt;&lt;br /&gt;     &amp;lt;binding.ws port="http://xmlns.oracle.com/HelloWorld/Helloworld/BPELProcess1#wsdl.endpoint(bpelprocess1_client_ep/BPELProcess1_pt)"&amp;gt;&lt;br /&gt;     &amp;lt;/binding.ws&amp;gt;&lt;br /&gt;  &amp;lt;/service&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;service name="bpelprocess1_client_ep2" ui:wsdlLocation="BPELProcess1.wsdl"&amp;gt;&lt;br /&gt;    &amp;lt;interface.wsdl interface="http://xmlns.oracle.com/HelloWorld/Helloworld/BPELProcess1#wsdl.interface(BPELProcess1)"/&amp;gt;&lt;br /&gt;   &amp;lt;binding.adf serviceName="{http://xmlns.oracle.com/HelloWorld/Helloworld/BPELProcess1}bpelprocess1_client_ep2"&lt;br /&gt;                registryName=""/&amp;gt;&lt;br /&gt;  &amp;lt;/service&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Go back to the design mode and open the new adf binding service and select the same wsdl as your other service ( this will correct the serviceName ) and at last we need to wire the new service to the component&lt;br /&gt;&lt;br /&gt;Now we only need to call this service from java&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.bpel.unit;&lt;br /&gt;&lt;br /&gt;import java.util.Hashtable;&lt;br /&gt;import java.util.UUID;&lt;br /&gt;import java.util.List;&lt;br /&gt;&lt;br /&gt;import javax.naming.Context;&lt;br /&gt;&lt;br /&gt;import oracle.soa.management.facade.Locator;&lt;br /&gt;import oracle.soa.management.facade.LocatorFactory;&lt;br /&gt;import oracle.soa.management.facade.Composite;&lt;br /&gt;import oracle.soa.management.facade.Service;&lt;br /&gt;import oracle.soa.management.facade.CompositeInstance;&lt;br /&gt;import oracle.soa.management.facade.ComponentInstance;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import oracle.fabric.common.NormalizedMessage;&lt;br /&gt;import oracle.fabric.common.NormalizedMessageImpl;&lt;br /&gt;&lt;br /&gt;import oracle.soa.management.util.CompositeInstanceFilter;&lt;br /&gt;import oracle.soa.management.util.ComponentInstanceFilter;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import java.util.Map;&lt;br /&gt;&lt;br /&gt;import javax.xml.transform.*;&lt;br /&gt;import javax.xml.transform.dom.*;&lt;br /&gt;import javax.xml.transform.stream.*;&lt;br /&gt;import org.w3c.dom.Element;&lt;br /&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class StartProcess {&lt;br /&gt;   public StartProcess() {&lt;br /&gt;       super();&lt;br /&gt;&lt;br /&gt;       Hashtable jndiProps = new Hashtable();&lt;br /&gt;       jndiProps.put(Context.PROVIDER_URL, "t3://localhost:8001/soa-infra");&lt;br /&gt;       jndiProps.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");&lt;br /&gt;       jndiProps.put(Context.SECURITY_PRINCIPAL, "weblogic");&lt;br /&gt;       jndiProps.put(Context.SECURITY_CREDENTIALS, "weblogic1");&lt;br /&gt;       jndiProps.put("dedicated.connection", "true");&lt;br /&gt;&lt;br /&gt;       String inputPayload =&lt;br /&gt;       "&amp;lt;process xmlns=\"http://xmlns.oracle.com/HelloWorld/Helloworld/BPELProcess1\"&amp;gt;\n" +&lt;br /&gt;       "   &amp;lt;input&amp;gt;hello&amp;lt;/input&amp;gt;\n" +&lt;br /&gt;       "&amp;lt;/process&amp;gt;\n" ;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;       Locator locator = null;&lt;br /&gt;       try {&lt;br /&gt;           // connect to the soa server&lt;br /&gt;           locator = LocatorFactory.createLocator(jndiProps);&lt;br /&gt;           String compositeDN = "default/Helloworld!1.0";&lt;br /&gt;&lt;br /&gt;           // find composite&lt;br /&gt;           Composite composite = locator.lookupComposite("default/Helloworld!1.0");&lt;br /&gt;           System.out.println("Got Composite : "+ composite.toString());&lt;br /&gt;&lt;br /&gt;           // find exposed service of the composite&lt;br /&gt;           Service service = composite.getService("bpelprocess1_client_ep2");&lt;br /&gt;           System.out.println("Got serviceName : "+ service.toString());&lt;br /&gt;&lt;br /&gt;           // make the input request and add this to a operation of the service&lt;br /&gt;           NormalizedMessage input = new NormalizedMessageImpl();&lt;br /&gt;           String uuid = "uuid:" + UUID.randomUUID();&lt;br /&gt;           input.addProperty(NormalizedMessage.PROPERTY_CONVERSATION_ID,uuid);&lt;br /&gt;&lt;br /&gt;           // payload is the partname of the process operation&lt;br /&gt;           input.getPayload().put("payload",inputPayload);&lt;br /&gt;&lt;br /&gt;           // process is the operation of the employee service&lt;br /&gt;           NormalizedMessage res = null;&lt;br /&gt;           try {&lt;br /&gt;              res = service.request("process", input);&lt;br /&gt;           } catch(Exception e) {&lt;br /&gt;              e.printStackTrace();&lt;br /&gt;           }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;           Map payload = res.getPayload();&lt;br /&gt;           Element element = (Element)payload.get("payload");&lt;br /&gt;&lt;br /&gt;           TransformerFactory tFactory = TransformerFactory.newInstance();&lt;br /&gt;           Transformer transformer = tFactory.newTransformer();&lt;br /&gt;           transformer.setOutputProperty("indent", "yes");&lt;br /&gt;           StringWriter sw = new StringWriter();&lt;br /&gt;           StreamResult result = new StreamResult(sw);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;           DOMSource source =  new DOMSource(element);&lt;br /&gt;&lt;br /&gt;           transformer.transform(source, result);&lt;br /&gt;           System.out.println("Result\n"+sw.toString());&lt;br /&gt;&lt;br /&gt;           System.out.println("instances");&lt;br /&gt;          &lt;br /&gt;          &lt;br /&gt;           CompositeInstanceFilter filter = new CompositeInstanceFilter();&lt;br /&gt;           filter.setMinCreationDate(new java.util.Date((System.currentTimeMillis() -  2000000)));&lt;br /&gt;           // get composite instances by filter ..&lt;br /&gt;           List&amp;lt;CompositeInstance&amp;gt; obInstances = composite.getInstances(filter);&lt;br /&gt;           // for each of the returned composite instances..&lt;br /&gt;           for (CompositeInstance instance : obInstances) {&lt;br /&gt;               System.out.println(" DN: " + instance.getCompositeDN() +&lt;br /&gt;                                  " Instance: " + instance.getId() +&lt;br /&gt;                                  " creation-date: " + instance.getCreationDate() +&lt;br /&gt;                                  " state (" + instance.getState() + "): " + getStateAsString(instance.getState())&lt;br /&gt;                                  );&lt;br /&gt;                                &lt;br /&gt;               // setup a component filter&lt;br /&gt;               ComponentInstanceFilter cInstanceFilter = new ComponentInstanceFilter();&lt;br /&gt;               // get child component instances ..&lt;br /&gt;               List&amp;lt;ComponentInstance&amp;gt; childComponentInstances = instance.getChildComponentInstances(cInstanceFilter);&lt;br /&gt;&lt;br /&gt;               // for each child component instance (e.g. a bpel process)&lt;br /&gt;               for (ComponentInstance cInstance : childComponentInstances) {&lt;br /&gt;                   System.out.println("  -&amp;gt; componentinstance: " + cInstance.getComponentName() +&lt;br /&gt;                                      " type: " + cInstance.getServiceEngine().getEngineType() +&lt;br /&gt;                                      " state: " +getStateAsString(cInstance.getState())&lt;br /&gt;                                      );&lt;br /&gt;                   System.out.println("State: "+cInstance.getNormalizedStateAsString()  );                &lt;br /&gt;               }&lt;br /&gt;           }&lt;br /&gt;&lt;br /&gt;       } catch (Exception e) {&lt;br /&gt;           e.printStackTrace();&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   private String getStateAsString(int state)&lt;br /&gt;   {&lt;br /&gt;       // note that this is dependent on wheter the composite state is captured or not&lt;br /&gt;       if (state == CompositeInstance.STATE_COMPLETED_SUCCESSFULLY)&lt;br /&gt;           return ("success");&lt;br /&gt;       else if (state == CompositeInstance.STATE_FAULTED)&lt;br /&gt;           return ("faulted");&lt;br /&gt;       else if (state == CompositeInstance.STATE_RECOVERY_REQUIRED)&lt;br /&gt;           return ("recovery required");&lt;br /&gt;       else if (state == CompositeInstance.STATE_RUNNING)&lt;br /&gt;           return ("running");&lt;br /&gt;       else if (state == CompositeInstance.STATE_STALE)&lt;br /&gt;           return ("stale");&lt;br /&gt;       else&lt;br /&gt;           return ("unknown");&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   public static void main(String[] args) {&lt;br /&gt;       StartProcess startUnitProcess = new StartProcess();&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-6890026028788358903?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/6890026028788358903/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=6890026028788358903" title="11 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6890026028788358903?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6890026028788358903?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/RlTGYNshDSE/invoking-soa-suite-11g-service-from.html" title="Invoking Soa Suite 11g Service from java" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">11</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/11/invoking-soa-suite-11g-service-from.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0cER38-fyp7ImA9WxNUEkU.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-5289862864993016081</id><published>2009-11-03T21:19:00.021+01:00</published><updated>2009-11-03T23:56:46.157+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-03T23:56:46.157+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="Tuscany" /><title>Working with Apache Tuscany, The Java SCA based platform part 1</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_iRLU1UFHOz9vwKjkuw_WJCGHU8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_iRLU1UFHOz9vwKjkuw_WJCGHU8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_iRLU1UFHOz9vwKjkuw_WJCGHU8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_iRLU1UFHOz9vwKjkuw_WJCGHU8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;In this blogpost and future blogposts I will try to give you a jumpstart with Apache Tuscany Java SCA. If you follow my blog you may already know that I also work and make blogsposts over an other Service Component Architecture (SCA)-based SOA platform ( Oracle Soa Suite 11g). Soa Suite 11g has a different SCA approach and has much better designer support.  But it is nice to take a look at Tuscany and see how this java SCA implementation works.&lt;br /&gt;&lt;br /&gt;I will explain how you can make some composite applications. In this blogpost  we start easy with building a composite application with&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Simple java Component&lt;/li&gt;&lt;li&gt;Jax-ws component&lt;/li&gt;&lt;li&gt;Component with references to other components ( wires )&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Service on a component&lt;/li&gt;&lt;li&gt;Using a second composite&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Here a overview of my test project.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SvC0IQlkblI/AAAAAAAADDY/JBkzpikXlRo/s1600-h/tus1_1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 302px; height: 400px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SvC0IQlkblI/AAAAAAAADDY/JBkzpikXlRo/s400/tus1_1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5400014007201721938" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First we need to download &lt;a href="http://tuscany.apache.org/sca-java-releases.html"&gt;Apache Tuscany Java SCA&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We start with a simple java component with its interface.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.tuscany.step1;&lt;br /&gt;&lt;br /&gt;public interface JavaService {&lt;br /&gt;    public String getData();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;package nl.whitehorses.tuscany.step1;&lt;br /&gt;&lt;br /&gt;public class JavaServiceImpl implements  JavaService {&lt;br /&gt;&lt;br /&gt;    public String getData()  {&lt;br /&gt;        return "Hello from java component";&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;We can add this component in the step1 composite file and provide the java implementation class. &lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;&amp;lt;composite xmlns=&amp;quot;http://www.osoa.org/xmlns/sca/1.0&amp;quot;&lt;br /&gt;     targetNamespace=&amp;quot;http://whitehorses&amp;quot; &lt;br /&gt;     name=&amp;quot;step1&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;component name=&amp;quot;JavaCp&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;implementation.java class=&amp;quot;nl.whitehorses.tuscany.step1.JavaServiceImpl&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;/component&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/composite&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Last part of step 1 is to run this composite application, now we have to load and test the composite application.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.tuscany.step1;&lt;br /&gt;&lt;br /&gt;import org.apache.tuscany.sca.host.embedded.SCADomain;&lt;br /&gt;&lt;br /&gt;public class ClientStep1 {&lt;br /&gt;&lt;br /&gt;    public final static void main(String[] args) throws Exception {&lt;br /&gt;&lt;br /&gt;        SCADomain scaDomain = SCADomain.newInstance("step1.composite");&lt;br /&gt;        JavaService javaService = scaDomain.getService(JavaService.class, "JavaCp");&lt;br /&gt;&lt;br /&gt;        System.out.println("java: " + javaService.getData());&lt;br /&gt;&lt;br /&gt;        scaDomain.close();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In step 2 we will call a jax-ws webservice. In this step we also need to add a reference to the component.&lt;br /&gt;&lt;br /&gt;To make this work I created first a jax-ws service and deploy this to an application server.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.soa.ws;&lt;br /&gt;&lt;br /&gt;import javax.jws.WebService;&lt;br /&gt;&lt;br /&gt;@WebService&lt;br /&gt;public class Helloworld {&lt;br /&gt;&lt;br /&gt;    public String getResponse( String message){&lt;br /&gt;      return message;&lt;br /&gt;    &lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In the tuscany client project we need to generate a webservice proxy client for this webservice.&lt;br /&gt;Create an implemention class for this ws proxy client. In this class we need to add a reference with the name jaxws and a setter. We will use this in the composite xml &lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.tuscany.step2;&lt;br /&gt;&lt;br /&gt;import nl.whitehorses.soa.ws.proxy.Helloworld;&lt;br /&gt;import org.osoa.sca.annotations.Reference;&lt;br /&gt;&lt;br /&gt;public class HelloworldServiceImpl implements Helloworld{&lt;br /&gt;&lt;br /&gt;        private Helloworld jaxws;&lt;br /&gt;    &lt;br /&gt;        @Reference &lt;br /&gt;        public void setJaxws(Helloworld jaxws) {&lt;br /&gt;            this.jaxws = jaxws;&lt;br /&gt;        }&lt;br /&gt;        &lt;br /&gt;        public String getResponse( String message){&lt;br /&gt;          return jaxws.getResponse(message);&lt;br /&gt;        &lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;create a new composite file where we will add this component and its reference. In the reference we need to provide the web service binding&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;&amp;lt;composite xmlns=&amp;quot;http://www.osoa.org/xmlns/sca/1.0&amp;quot;&lt;br /&gt;     targetNamespace=&amp;quot;http://whitehorses&amp;quot; &lt;br /&gt;     name=&amp;quot;step2&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;component name=&amp;quot;HelloworldCp&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;implementation.java class=&amp;quot;nl.whitehorses.tuscany.step2.HelloworldServiceImpl&amp;quot; /&amp;gt;&lt;br /&gt;        &amp;lt;reference name=&amp;quot;jaxws&amp;quot;&amp;gt;&lt;br /&gt;           &amp;lt;binding.ws wsdlElement=&amp;quot;http://ws.soa.whitehorses.nl/#wsdl.port(HelloworldService/HelloworldPort)&amp;quot; &lt;br /&gt;            uri=&amp;quot;http://localhost:7101/jaxws/HelloworldPort?wsdl#wsdl.interface(HelloworldService)&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;/reference&amp;gt;&lt;br /&gt;    &amp;lt;/component&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/composite&amp;gt;&lt;br /&gt;&lt;/pre&gt; &lt;br /&gt;And at last the test client&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.tuscany.step2;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import org.apache.tuscany.sca.host.embedded.SCADomain;&lt;br /&gt;import nl.whitehorses.soa.ws.proxy.Helloworld;&lt;br /&gt;&lt;br /&gt;public class ClientStep2 {&lt;br /&gt;&lt;br /&gt;    public final static void main(String[] args) throws Exception {&lt;br /&gt;&lt;br /&gt;        SCADomain scaDomain = SCADomain.newInstance("step2.composite");&lt;br /&gt;        Helloworld helloworld = scaDomain.getService(Helloworld.class, "HelloworldCp");&lt;br /&gt;&lt;br /&gt;        System.out.println("ws: " + helloworld.getResponse("hello"));&lt;br /&gt;&lt;br /&gt;        scaDomain.close();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt; &lt;br /&gt;In step 3 we will expose an component as a service. First step is to make an interface with the methods which we want to expose in this web service. We have to add Remotable annotation.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.tuscany.step3;&lt;br /&gt;&lt;br /&gt;import org.osoa.sca.annotations.Remotable;&lt;br /&gt;&lt;br /&gt;@Remotable&lt;br /&gt;public interface TuscanyService {&lt;br /&gt;&lt;br /&gt;    public String getJaxwsResponse( String message);&lt;br /&gt;&lt;br /&gt;    public String getJavaData();&lt;br /&gt;&lt;br /&gt;    public String getJavaData2();&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The implementatation of this component with the Service annotation and off course the references to the other components.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.tuscany.step3;&lt;br /&gt;&lt;br /&gt;import nl.whitehorses.soa.ws.proxy.Helloworld;&lt;br /&gt;&lt;br /&gt;import org.osoa.sca.annotations.Reference;&lt;br /&gt;import org.osoa.sca.annotations.Service;&lt;br /&gt;import nl.whitehorses.tuscany.step1.JavaService;&lt;br /&gt;&lt;br /&gt;@Service(TuscanyService.class)&lt;br /&gt;public class TuscanyServiceImpl implements TuscanyService {&lt;br /&gt;&lt;br /&gt;    private Helloworld helloworldComponent;&lt;br /&gt;    private JavaService javaComponent;&lt;br /&gt;    private JavaService javaComponent2;&lt;br /&gt;    &lt;br /&gt;    @Reference &lt;br /&gt;    public void setHelloworldComponent(Helloworld helloworldComponent) {&lt;br /&gt;        this.helloworldComponent = helloworldComponent;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @Reference &lt;br /&gt;    public void setJavaComponent(JavaService javaComponent) {&lt;br /&gt;        this.javaComponent = javaComponent;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @Reference &lt;br /&gt;    public void setJavaComponent2(JavaService javaComponent2) {&lt;br /&gt;        this.javaComponent2 = javaComponent2;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    public String getJaxwsResponse(String message) {&lt;br /&gt;        return helloworldComponent.getResponse(message) ;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getJavaData() {&lt;br /&gt;        return javaComponent.getData();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public String getJavaData2() {&lt;br /&gt;        return javaComponent2.getData();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The step3 composite file has a TuscanyServiceComponent with 3 references to the step 1 and 2 components and this component has also a service. In this service we have to provide the ws url. &lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;&amp;lt;composite xmlns=&amp;quot;http://www.osoa.org/xmlns/sca/1.0&amp;quot;&lt;br /&gt;     targetNamespace=&amp;quot;http://whitehorses&amp;quot; &lt;br /&gt;     name=&amp;quot;step3&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;component name=&amp;quot;TuscanyServiceComponent&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;implementation.java class=&amp;quot;nl.whitehorses.tuscany.step3.TuscanyServiceImpl&amp;quot; /&amp;gt;&lt;br /&gt;        &amp;lt;reference name=&amp;quot;helloworldComponent&amp;quot; target=&amp;quot;HelloworldCp&amp;quot; /&amp;gt;&lt;br /&gt;        &amp;lt;reference name=&amp;quot;javaComponent&amp;quot; target=&amp;quot;JavaCp&amp;quot; /&amp;gt;&lt;br /&gt;        &amp;lt;reference name=&amp;quot;javaComponent2&amp;quot; target=&amp;quot;JavaCp2&amp;quot; /&amp;gt;&lt;br /&gt;        &amp;lt;service name=&amp;quot;TuscanyService&amp;quot;&amp;gt;&lt;br /&gt;           &amp;lt;binding.ws uri=&amp;quot;http://localhost:8085/TuscanyService&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;/service&amp;gt;&lt;br /&gt;    &amp;lt;/component&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;component name=&amp;quot;JavaCp&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;implementation.java class=&amp;quot;nl.whitehorses.tuscany.step1.JavaServiceImpl&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;/component&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;component name=&amp;quot;JavaCp2&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;implementation.java class=&amp;quot;nl.whitehorses.tuscany.step1.JavaServiceImpl&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;/component&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;component name=&amp;quot;HelloworldCp&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;implementation.java class=&amp;quot;nl.whitehorses.tuscany.step2.HelloworldServiceImpl&amp;quot; /&amp;gt;&lt;br /&gt;        &amp;lt;reference name=&amp;quot;jaxws&amp;quot;&amp;gt;&lt;br /&gt;           &amp;lt;binding.ws wsdlElement=&amp;quot;http://ws.soa.whitehorses.nl/#wsdl.port(HelloworldService/HelloworldPort)&amp;quot; &lt;br /&gt;            uri=&amp;quot;http://localhost:7101/jaxws/HelloworldPort?wsdl#wsdl.interface(HelloworldService)&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;/reference&amp;gt;&lt;br /&gt;    &amp;lt;/component&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/composite&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The client code which tests the main component and start the service on this component&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.tuscany.step3;&lt;br /&gt;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;import org.apache.tuscany.sca.host.embedded.SCADomain;&lt;br /&gt;&lt;br /&gt;public class ClientStep3 {&lt;br /&gt;&lt;br /&gt;    public final static void main(String[] args) throws Exception {&lt;br /&gt;&lt;br /&gt;        SCADomain scaDomain = SCADomain.newInstance("step3.composite");&lt;br /&gt;        TuscanyService tuscanyService =  scaDomain.getService(TuscanyService.class, "TuscanyServiceComponent");&lt;br /&gt;&lt;br /&gt;        System.out.println("ws: "+tuscanyService.getJaxwsResponse("hello"));&lt;br /&gt;        System.out.println("java: "+tuscanyService.getJavaData());&lt;br /&gt;        System.out.println("java2: "+tuscanyService.getJavaData2());&lt;br /&gt;&lt;br /&gt;        try {&lt;br /&gt;             System.out.println("ws service started (press enter to shutdown)");&lt;br /&gt;             System.in.read();&lt;br /&gt;         } catch (IOException e) {&lt;br /&gt;             e.printStackTrace();&lt;br /&gt;         }&lt;br /&gt;&lt;br /&gt;        scaDomain.close();&lt;br /&gt;    }    &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now we can use soapui to test this web service.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SvC0IL92vVI/AAAAAAAADDQ/zJvqV6RlIc0/s1600-h/tus1_2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 162px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SvC0IL92vVI/AAAAAAAADDQ/zJvqV6RlIc0/s400/tus1_2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5400014005961407826" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the last step in this blog I will use a second composite which will be called by the first composite.&lt;br /&gt;First we create a new composite xml. We will copy a java component from the step3 composite to this composite. Give this composite a new name and target namespace. We will use these values to import this composite. This component needs a service else we can not call it from the main composite. &lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;&amp;lt;composite xmlns=&amp;quot;http://www.osoa.org/xmlns/sca/1.0&amp;quot;&lt;br /&gt;     targetNamespace=&amp;quot;http://whitehorses2&amp;quot; &lt;br /&gt;     name=&amp;quot;step4_2&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;service name=&amp;quot;JavaCpService&amp;quot; promote=&amp;quot;JavaCp&amp;quot;&amp;gt; &lt;br /&gt;        &amp;lt;interface.java interface=&amp;quot;nl.whitehorses.tuscany.step1.JavaService&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;/service&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;component name=&amp;quot;JavaCp&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;implementation.java class=&amp;quot;nl.whitehorses.tuscany.step1.JavaServiceImpl&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;/component&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/composite&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The main composite called step4_1 need the namespace of the second composite. The JavaCp2 component import the second composite by using the target namespace of the second composite and with its name. In the javaComponent2 reference of the TuscanyServiceComponent will call JavaCp2 component followed by the service name of the second composite.&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;&amp;lt;composite xmlns=&amp;quot;http://www.osoa.org/xmlns/sca/1.0&amp;quot;&lt;br /&gt;     targetNamespace=&amp;quot;http://whitehorses&amp;quot; &lt;br /&gt;     xmlns:whitehorses2=&amp;quot;http://whitehorses2&amp;quot;&lt;br /&gt;     name=&amp;quot;step4_1&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;component name=&amp;quot;TuscanyServiceComponent&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;implementation.java class=&amp;quot;nl.whitehorses.tuscany.step3.TuscanyServiceImpl&amp;quot; /&amp;gt;&lt;br /&gt;        &amp;lt;reference name=&amp;quot;helloworldComponent&amp;quot; target=&amp;quot;HelloworldCp&amp;quot; /&amp;gt;&lt;br /&gt;        &amp;lt;reference name=&amp;quot;javaComponent&amp;quot; target=&amp;quot;JavaCp&amp;quot; /&amp;gt;&lt;br /&gt;        &amp;lt;reference name=&amp;quot;javaComponent2&amp;quot; target=&amp;quot;JavaCp2/JavaCpService&amp;quot; /&amp;gt;&lt;br /&gt;        &amp;lt;service name=&amp;quot;TuscanyService&amp;quot;&amp;gt;&lt;br /&gt;           &amp;lt;binding.ws uri=&amp;quot;http://localhost:8085/TuscanyService&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;/service&amp;gt;&lt;br /&gt;    &amp;lt;/component&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;component name=&amp;quot;JavaCp&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;implementation.java class=&amp;quot;nl.whitehorses.tuscany.step1.JavaServiceImpl&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;/component&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;component name=&amp;quot;HelloworldCp&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;implementation.java class=&amp;quot;nl.whitehorses.tuscany.step2.HelloworldServiceImpl&amp;quot; /&amp;gt;&lt;br /&gt;        &amp;lt;reference name=&amp;quot;jaxws&amp;quot;&amp;gt;&lt;br /&gt;           &amp;lt;binding.ws wsdlElement=&amp;quot;http://ws.soa.whitehorses.nl/#wsdl.port(HelloworldService/HelloworldPort)&amp;quot; &lt;br /&gt;            uri=&amp;quot;http://localhost:7101/jaxws/HelloworldPort?wsdl#wsdl.interface(HelloworldService)&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;/reference&amp;gt;&lt;br /&gt;    &amp;lt;/component&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;component name=&amp;quot;JavaCp2&amp;quot;&amp;gt;&lt;br /&gt;        &amp;lt;implementation.composite name=&amp;quot;whitehorses2:step4_2&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;/component&amp;gt;&lt;br /&gt;&amp;lt;/composite&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and at last the step 4 test client.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.tuscany.step4;&lt;br /&gt;&lt;br /&gt;import nl.whitehorses.tuscany.step3.TuscanyService;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;import org.apache.tuscany.sca.host.embedded.SCADomain;&lt;br /&gt;&lt;br /&gt;public class ClientStep4 {&lt;br /&gt;&lt;br /&gt;    public final static void main(String[] args) throws Exception {&lt;br /&gt;&lt;br /&gt;        SCADomain scaDomain = SCADomain.newInstance("step4_1.composite");&lt;br /&gt;        TuscanyService tuscanyService =  scaDomain.getService(TuscanyService.class, "TuscanyServiceComponent");&lt;br /&gt;&lt;br /&gt;        System.out.println("ws: "+tuscanyService.getJaxwsResponse("hello"));&lt;br /&gt;        System.out.println("java: "+tuscanyService.getJavaData());&lt;br /&gt;        System.out.println("java2: "+tuscanyService.getJavaData2());&lt;br /&gt;&lt;br /&gt;        try {&lt;br /&gt;             System.out.println("ws service started (press enter to shutdown)");&lt;br /&gt;             System.in.read();&lt;br /&gt;         } catch (IOException e) {&lt;br /&gt;             e.printStackTrace();&lt;br /&gt;         }&lt;br /&gt;&lt;br /&gt;        scaDomain.close();&lt;br /&gt;    }    &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here you can&lt;a href="http://www.sbsframes.nl/jdeveloper/tuscany.zip"&gt; download my jdeveloper 11G&lt;/a&gt; test project.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-5289862864993016081?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/5289862864993016081/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=5289862864993016081" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/5289862864993016081?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/5289862864993016081?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/P0W4lrAouxg/working-with-apache-tuscany-java-sca.html" title="Working with Apache Tuscany, The Java SCA based platform part 1" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_earSixbe3dw/SvC0IQlkblI/AAAAAAAADDY/JBkzpikXlRo/s72-c/tus1_1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/11/working-with-apache-tuscany-java-sca.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYCQnk9fyp7ImA9WxNVGEg.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-7110844739227373604</id><published>2009-10-29T20:36:00.024+01:00</published><updated>2009-10-29T22:36:03.767+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-29T22:36:03.767+01: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" /><title>Securing Web Services with SAML Sender Vouches</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/zKqNgd0buiW_32iOOa947NVfXwc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zKqNgd0buiW_32iOOa947NVfXwc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/zKqNgd0buiW_32iOOa947NVfXwc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zKqNgd0buiW_32iOOa947NVfXwc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;After securing you web applications with SAML is the next step to secure your web services with SAML Sender Vouches ws-security policy, this can be complex because you need to know a lot over the weblogic server configuration and its java security frameworks. For example you need to configure two Weblogic servers, the first is the Web Service server and the second server is the Secure Token Service ( STS ). After that you need to add some client credential providers to the generated web service proxy client.  Thanks to Vishal Jain of Oracle who provided me a working example.&lt;span class="lHQn1d"&gt;&lt;img class=" f g8 " src="http://mail.google.com/mail/images/cleardot.gif" alt="" /&gt;&lt;/span&gt;&lt;br /&gt;This is how SAML Sender Vouches works and what we need to do in weblogic / java.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/Sunye6R5wpI/AAAAAAAADAA/TDxAZPJRtFU/s1600-h/saml+sender+vouches.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 265px;" src="http://4.bp.blogspot.com/_earSixbe3dw/Sunye6R5wpI/AAAAAAAADAA/TDxAZPJRtFU/s400/saml+sender+vouches.jpg" alt="" id="BLOGGER_PHOTO_ID_5398112241234592402" border="0" /&gt;&lt;/a&gt;The short version is, the web service proxy client call the STS server to get an SAML assertion on behalf of the User to call the Web Service.&lt;br /&gt;&lt;br /&gt;The long version, the user provides its credentials to the ws proxy client and the ws proxy client calls the STS server and provides the username / password of the user and the client key.&lt;br /&gt;The STS validates the user and the ws proxy client certificate and the STS returns the STS identity assertion to the ws proxy client.  The ws proxy client uses this STS assertion together with the ws client and ws server certificate to call the web service.&lt;br /&gt;&lt;br /&gt;First we need to have 3 certificates, the first is alice, this will be used in the ws proxy client and the second certificate is bob, this will be used in the Weblogic web service server and the last we use wssipsts certificate for the Weblogic STS server. Add these keys into a java keystore.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Setting up the Secure Token Service (STS)&lt;/span&gt;&lt;br /&gt;Create a new Weblogic 10.3.1 domain and start the admin server. First we need to enable SSL in the general tab of the server and then add our keystores in the keystore tab.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/Sun6at6w_yI/AAAAAAAADBI/OSOv-MsJUFI/s1600-h/sts_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 283px;" src="http://2.bp.blogspot.com/_earSixbe3dw/Sun6at6w_yI/AAAAAAAADBI/OSOv-MsJUFI/s400/sts_1.png" alt="" id="BLOGGER_PHOTO_ID_5398120965289869090" border="0" /&gt;&lt;/a&gt;Provide the STS certificate alias, in my case wssipprv&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/Sun6aYiQSHI/AAAAAAAADBA/mUFuHfgU8BI/s1600-h/sts_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 273px;" src="http://1.bp.blogspot.com/_earSixbe3dw/Sun6aYiQSHI/AAAAAAAADBA/mUFuHfgU8BI/s400/sts_2.png" alt="" id="BLOGGER_PHOTO_ID_5398120959549917298" border="0" /&gt;&lt;/a&gt;Go the myrealm security where we add the Alice user and provide a password, Very important the username must match with the CN of the Alice certificate. The user provides the credentials and must match with user in WLS and the ws proxy client provides the Alice certificate and this must match with the PKI Credential mapping.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/Sun6Zy3NSfI/AAAAAAAADA4/kRNLBmJg-3I/s1600-h/sts_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 228px;" src="http://4.bp.blogspot.com/_earSixbe3dw/Sun6Zy3NSfI/AAAAAAAADA4/kRNLBmJg-3I/s400/sts_3.png" alt="" id="BLOGGER_PHOTO_ID_5398120949437254130" border="0" /&gt;&lt;/a&gt;Go to the Credential mapping tab of the Provider tab and add a PKI Credential Mapping where we import the keystore and Add a  SAML Credential Mapping version 2 where we add the Web Service  URL.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/Sun6Z7lMJGI/AAAAAAAADAw/qpXAeN3tgE0/s1600-h/sts_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 199px;" src="http://3.bp.blogspot.com/_earSixbe3dw/Sun6Z7lMJGI/AAAAAAAADAw/qpXAeN3tgE0/s400/sts_4.png" alt="" id="BLOGGER_PHOTO_ID_5398120951777600610" border="0" /&gt;&lt;/a&gt;Open the just created PKI credential mapping and add the keystore.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/Sun6QC08W1I/AAAAAAAADAo/Pa_VbIWkMnI/s1600-h/sts_5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 275px;" src="http://4.bp.blogspot.com/_earSixbe3dw/Sun6QC08W1I/AAAAAAAADAo/Pa_VbIWkMnI/s400/sts_5.png" alt="" id="BLOGGER_PHOTO_ID_5398120781924031314" border="0" /&gt;&lt;/a&gt;Next we open the SAML Credential Mapping version 2 and provide the Issuer URL and Name Qualifier.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/Sun6P02Mv5I/AAAAAAAADAg/iEHPNx5M0Ok/s1600-h/sts_6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 306px;" src="http://3.bp.blogspot.com/_earSixbe3dw/Sun6P02Mv5I/AAAAAAAADAg/iEHPNx5M0Ok/s400/sts_6.png" alt="" id="BLOGGER_PHOTO_ID_5398120778171203474" border="0" /&gt;&lt;/a&gt;Add the public key of the wssipsts&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/Sun6PmiknPI/AAAAAAAADAY/0d5NCW-AgHU/s1600-h/sts_7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 213px;" src="http://2.bp.blogspot.com/_earSixbe3dw/Sun6PmiknPI/AAAAAAAADAY/0d5NCW-AgHU/s400/sts_7.png" alt="" id="BLOGGER_PHOTO_ID_5398120774330785010" border="0" /&gt;&lt;/a&gt;Add a WSS/Sender-Vouches Relying Party&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/Sun6PRPzjnI/AAAAAAAADAQ/ovddKHlWjQw/s1600-h/sts_8.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 238px;" src="http://4.bp.blogspot.com/_earSixbe3dw/Sun6PRPzjnI/AAAAAAAADAQ/ovddKHlWjQw/s400/sts_8.png" alt="" id="BLOGGER_PHOTO_ID_5398120768614927986" border="0" /&gt;&lt;/a&gt;Enable this and provide the target url of the Web Service Url and assign assertions and include key info&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/Sun6POm8s1I/AAAAAAAADAI/KnIp08MC1Bo/s1600-h/sts_9.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 397px;" src="http://4.bp.blogspot.com/_earSixbe3dw/Sun6POm8s1I/AAAAAAAADAI/KnIp08MC1Bo/s400/sts_9.png" alt="" id="BLOGGER_PHOTO_ID_5398120767906689874" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;That is all for the STS server and now we can deploy the STS web service.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.sts;&lt;br /&gt;&lt;br /&gt;import weblogic.jws.Policy;&lt;br /&gt;import weblogic.wsee.security.saml.SAMLTrustTokenProvider;&lt;br /&gt;import weblogic.wsee.security.wst.framework.TrustTokenProviderRegistry;&lt;br /&gt;&lt;br /&gt;import javax.jws.WebMethod;&lt;br /&gt;import javax.jws.WebService;&lt;br /&gt;&lt;br /&gt;@WebService&lt;br /&gt;@Policy(uri="policy:Wssp1.2-2007-Wssc1.3-Bootstrap-Https-UNT.xml")&lt;br /&gt;public class StsUnt {&lt;br /&gt;&lt;br /&gt;static {&lt;br /&gt;init();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@WebMethod&lt;br /&gt;@Policy(uri="policy:Wssp1.2-2007-SignBody.xml")&lt;br /&gt;public String dummyMethod(String s) {&lt;br /&gt;return s;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;static void init() {&lt;br /&gt;TrustTokenProviderRegistry reg = TrustTokenProviderRegistry.getInstance();&lt;br /&gt;SAMLTrustTokenProvider provider = new MySAMLTrustTokenProvider();&lt;br /&gt;reg.registerProvider("http://docs.oasis-open.org/wss/2004/01/oasis-2004-01-saml-token-profile-1.0#SAMLAssertionID", provider);&lt;br /&gt;reg.registerProvider("http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID", provider);&lt;br /&gt;reg.registerProvider("http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0",  provider);&lt;br /&gt;reg.registerProvider("http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.0",  provider);&lt;br /&gt;reg.registerProvider("http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1",  provider);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;static class MySAMLTrustTokenProvider extends SAMLTrustTokenProvider {&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Configure the Weblogic server for the Web Services&lt;/span&gt;&lt;br /&gt;Create  a new Weblogic domain and use the same keystore, we don't need to setup SSL on this server.&lt;br /&gt;&lt;br /&gt;Go the myrealm security and go to providers tab where we add a new PKI Credential Mapping in the credentials tab. ( Use the same setting as the STS server )&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SuoB2g534fI/AAAAAAAADBQ/IhN85KVikV0/s1600-h/ws_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 198px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SuoB2g534fI/AAAAAAAADBQ/IhN85KVikV0/s400/ws_1.png" alt="" id="BLOGGER_PHOTO_ID_5398129139414196722" border="0" /&gt;&lt;/a&gt;We need to add 2 authentication providers and change the 2 default providers.&lt;br /&gt;Create a SAML Authentication and  SAML Identity Assertion provider.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SuoEORuAauI/AAAAAAAADCY/0juvzsFq1lo/s1600-h/ws_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 204px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SuoEORuAauI/AAAAAAAADCY/0juvzsFq1lo/s400/ws_2.png" alt="" id="BLOGGER_PHOTO_ID_5398131746678008546" border="0" /&gt;&lt;/a&gt;Every authentication provider need to have the SUFFICIENT control flag.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SuoD5W0HCRI/AAAAAAAADCQ/oO1hfa8YPB8/s1600-h/ws_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 213px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SuoD5W0HCRI/AAAAAAAADCQ/oO1hfa8YPB8/s400/ws_3.png" alt="" id="BLOGGER_PHOTO_ID_5398131387268532498" border="0" /&gt;&lt;/a&gt;Change the SAML Identity Assertion by adding an asserting party and the STS public certificate&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SuoD5KZgqyI/AAAAAAAADCI/3iUN71uV5ek/s1600-h/ws_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 210px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SuoD5KZgqyI/AAAAAAAADCI/3iUN71uV5ek/s400/ws_4.png" alt="" id="BLOGGER_PHOTO_ID_5398131383935740706" border="0" /&gt;&lt;/a&gt;Import the  STS certificate&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SuoD45cyS4I/AAAAAAAADCA/TAbVVFhpD90/s1600-h/ws_5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 239px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SuoD45cyS4I/AAAAAAAADCA/TAbVVFhpD90/s400/ws_5.png" alt="" id="BLOGGER_PHOTO_ID_5398131379386076034" border="0" /&gt;&lt;/a&gt;Change the just create Sender-Vouches asserting party. Enable this and provide the target url of the web service and add the issuer url, signature required and expect the STS certificate and allow virtual user.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SuoDwSZXCiI/AAAAAAAADB4/tzQS3v4WMBE/s1600-h/ws_6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 347px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SuoDwSZXCiI/AAAAAAAADB4/tzQS3v4WMBE/s400/ws_6.png" alt="" id="BLOGGER_PHOTO_ID_5398131231463770658" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Change the defaultIdentityAsserter and add wsse:PasswordDigest and X.509 as active types.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SuoDwICjFOI/AAAAAAAADBw/maKuV5J_Fl4/s1600-h/ws_7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 309px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SuoDwICjFOI/AAAAAAAADBw/maKuV5J_Fl4/s400/ws_7.png" alt="" id="BLOGGER_PHOTO_ID_5398131228683736290" border="0" /&gt;&lt;/a&gt;In the provider specific tab we need to set CN in the Default User Name Mapper Attribute Type and enable Use Default User Name Mapper.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SuoDvwM3lPI/AAAAAAAADBo/F2Z8gUJCcBw/s1600-h/ws_8.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 349px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SuoDvwM3lPI/AAAAAAAADBo/F2Z8gUJCcBw/s400/ws_8.png" alt="" id="BLOGGER_PHOTO_ID_5398131222284571890" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In the &lt;span class="bclast"&gt;DefaultAuthenticator we need to set  control &lt;/span&gt;flag to SUFFICIENT&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SuoDv2qTvxI/AAAAAAAADBg/FbkCQ4lklLo/s1600-h/ws_9.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 245px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SuoDv2qTvxI/AAAAAAAADBg/FbkCQ4lklLo/s400/ws_9.png" alt="" id="BLOGGER_PHOTO_ID_5398131224018665234" border="0" /&gt;&lt;/a&gt;And in the provider specific tab. Enable Password Digests and Minimum Password Length to 1.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SuoDvtCBZ2I/AAAAAAAADBY/77CVUj5taX4/s1600-h/ws_10.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 312px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SuoDvtCBZ2I/AAAAAAAADBY/77CVUj5taX4/s400/ws_10.png" alt="" id="BLOGGER_PHOTO_ID_5398131221433771874" border="0" /&gt;&lt;/a&gt;That's all for the Web Service server. Now we can deploy the webservice.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.sts.ws;&lt;br /&gt;&lt;br /&gt;import weblogic.jws.Policies;&lt;br /&gt;import weblogic.jws.Policy;&lt;br /&gt;import javax.jws.WebService;&lt;br /&gt;&lt;br /&gt;@Policies(&lt;br /&gt;  {&lt;br /&gt;    @Policy(uri = "policy:Wssp1.2-2007-Saml1.1-SenderVouches-Wss1.0.xml"),&lt;br /&gt;    @Policy(uri = "policy:Wssp1.2-2007-SignBody.xml"),&lt;br /&gt;    @Policy(uri = "policy:Wssp1.2-2007-EncryptBody.xml")&lt;br /&gt;  }&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;@WebService&lt;br /&gt;public class EchoService {&lt;br /&gt;  public String echo( String hello){&lt;br /&gt;    return hello;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Generating the Web Service Proxy Client&lt;/span&gt;&lt;br /&gt;The last step we need to generate a web service proxy client and add the username and the client credentials mappings.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.sts.ws.client;&lt;br /&gt;&lt;br /&gt;import java.io.InputStream;&lt;br /&gt;import java.io.ByteArrayInputStream;&lt;br /&gt;&lt;br /&gt;import java.security.cert.X509Certificate;&lt;br /&gt;&lt;br /&gt;import java.util.ArrayList;&lt;br /&gt;import java.util.List;&lt;br /&gt;import java.util.Map;&lt;br /&gt;&lt;br /&gt;import java.net.URL;&lt;br /&gt;import javax.xml.namespace.QName;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import javax.xml.ws.BindingProvider;&lt;br /&gt;import javax.xml.ws.WebServiceRef;&lt;br /&gt;&lt;br /&gt;import weblogic.security.SSL.TrustManager;&lt;br /&gt;&lt;br /&gt;import weblogic.wsee.message.WlMessageContext;&lt;br /&gt;import weblogic.wsee.security.bst.ClientBSTCredentialProvider;&lt;br /&gt;import weblogic.wsee.security.saml.SAMLTrustCredentialProvider;&lt;br /&gt;import weblogic.wsee.security.unt.ClientUNTCredentialProvider;&lt;br /&gt;&lt;br /&gt;import weblogic.xml.crypto.wss.WSSecurityContext;&lt;br /&gt;import weblogic.xml.crypto.wss.provider.CredentialProvider;&lt;br /&gt;&lt;br /&gt;public class EchoServicePortClient&lt;br /&gt;{&lt;br /&gt; @WebServiceRef&lt;br /&gt; private static EchoServiceService echoServiceService;&lt;br /&gt;&lt;br /&gt;   private static String stsUntPolicy =&lt;br /&gt;   "&amp;lt;?xml version=\"1.0\"?&amp;gt;\n" +&lt;br /&gt;   "&amp;lt;wsp:Policy\n" +&lt;br /&gt;   "  xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\"\n" +&lt;br /&gt;   "  xmlns:sp=\"http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702\"\n" +&lt;br /&gt;   "  &amp;gt;\n" +&lt;br /&gt;   "  &amp;lt;sp:TransportBinding&amp;gt;\n" +&lt;br /&gt;   "    &amp;lt;wsp:Policy&amp;gt;\n" +&lt;br /&gt;   "      &amp;lt;sp:TransportToken&amp;gt;\n" +&lt;br /&gt;   "        &amp;lt;wsp:Policy&amp;gt;\n" +&lt;br /&gt;   "          &amp;lt;sp:HttpsToken/&amp;gt;\n" +&lt;br /&gt;   "        &amp;lt;/wsp:Policy&amp;gt;\n" +&lt;br /&gt;   "      &amp;lt;/sp:TransportToken&amp;gt;\n" +&lt;br /&gt;   "      &amp;lt;sp:AlgorithmSuite&amp;gt;\n" +&lt;br /&gt;   "        &amp;lt;wsp:Policy&amp;gt;\n" +&lt;br /&gt;   "          &amp;lt;sp:Basic256/&amp;gt;\n" +&lt;br /&gt;   "        &amp;lt;/wsp:Policy&amp;gt;\n" +&lt;br /&gt;   "      &amp;lt;/sp:AlgorithmSuite&amp;gt;\n" +&lt;br /&gt;   "      &amp;lt;sp:Layout&amp;gt;\n" +&lt;br /&gt;   "        &amp;lt;wsp:Policy&amp;gt;\n" +&lt;br /&gt;   "          &amp;lt;sp:Lax/&amp;gt;\n" +&lt;br /&gt;   "        &amp;lt;/wsp:Policy&amp;gt;\n" +&lt;br /&gt;   "      &amp;lt;/sp:Layout&amp;gt;\n" +&lt;br /&gt;   "      &amp;lt;sp:IncludeTimestamp/&amp;gt;\n" +&lt;br /&gt;   "    &amp;lt;/wsp:Policy&amp;gt;\n" +&lt;br /&gt;   "  &amp;lt;/sp:TransportBinding&amp;gt;\n" +&lt;br /&gt;   "  &amp;lt;sp:SupportingTokens&amp;gt;\n" +&lt;br /&gt;   "    &amp;lt;wsp:Policy&amp;gt;\n" +&lt;br /&gt;   "      &amp;lt;sp:UsernameToken\n" +&lt;br /&gt;   "        sp:IncludeToken=\"http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient\"&amp;gt;\n" +&lt;br /&gt;   "        &amp;lt;wsp:Policy&amp;gt;\n" +&lt;br /&gt;   "          &amp;lt;sp:WssUsernameToken10/&amp;gt;\n" +&lt;br /&gt;   "        &amp;lt;/wsp:Policy&amp;gt;\n" +&lt;br /&gt;   "      &amp;lt;/sp:UsernameToken&amp;gt;\n" +&lt;br /&gt;   "    &amp;lt;/wsp:Policy&amp;gt;\n" +&lt;br /&gt;   "  &amp;lt;/sp:SupportingTokens&amp;gt;\n" +&lt;br /&gt;   "&amp;lt;/wsp:Policy&amp;gt;";&lt;br /&gt;&lt;br /&gt;   public static void main(String[] args) {&lt;br /&gt;       System.setProperty("com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump", "true");&lt;br /&gt;       try {&lt;br /&gt;&lt;br /&gt;           String wsURL = "http://10.10.10.10:7011/saml-ws-context-root/EchoServicePort?WSDL";&lt;br /&gt;&lt;br /&gt;           echoServiceService = new EchoServiceService(    new URL(wsURL) &lt;br /&gt;                                                        ,  new QName("http://ws.sts.whitehorses.nl/", "EchoServiceService"));&lt;br /&gt;           EchoService echoService = echoServiceService.getEchoServicePort();&lt;br /&gt;&lt;br /&gt;           System.setProperty("javax.net.ssl.trustStore", "C:/projecten/workspace/11g_prod/saml1.1_ws/wsttest1/certs/cacerts");&lt;br /&gt;&lt;br /&gt;           Map&amp;lt;String, Object&amp;gt; requestContext = ((BindingProvider)echoService).getRequestContext();&lt;br /&gt;&lt;br /&gt;           List&amp;lt;CredentialProvider&amp;gt; credList = new ArrayList&amp;lt;CredentialProvider&amp;gt;();&lt;br /&gt;&lt;br /&gt;           // Add the necessary credential providers to the list&lt;br /&gt;           InputStream policy = new ByteArrayInputStream(stsUntPolicy.getBytes("UTF-8"));&lt;br /&gt;           requestContext.put(WlMessageContext.WST_BOOT_STRAP_POLICY, policy );&lt;br /&gt;&lt;br /&gt;           String stsURL = "https://localhost:7022/sts/StsUntPort";&lt;br /&gt;          &lt;br /&gt;          &lt;br /&gt;           requestContext.put(WlMessageContext.STS_ENDPOINT_ADDRESS_PROPERTY, stsURL);&lt;br /&gt;           requestContext.put(WSSecurityContext.TRUST_MANAGER,&lt;br /&gt;                              new TrustManager() {&lt;br /&gt;                                   public boolean certificateCallback(X509Certificate[] chain, int validateErr) {&lt;br /&gt;                                   // need to validate if the server cert can be trusted&lt;br /&gt;                                       return true;&lt;br /&gt;                                   }&lt;br /&gt;                               });&lt;br /&gt;&lt;br /&gt;           credList.add(new SAMLTrustCredentialProvider());&lt;br /&gt;&lt;br /&gt;           String username = "Alice";&lt;br /&gt;           String password = "weblogic1";&lt;br /&gt;           credList.add(new ClientUNTCredentialProvider(username.getBytes(), password.getBytes()));&lt;br /&gt;&lt;br /&gt;           // ClientBSTCredentialProvider&lt;br /&gt;           String defaultClientcert = "C:/projecten/workspace/11g_prod/saml1.1_ws/wsttest1/certs/Alice.cer";&lt;br /&gt;           String clientcert = System.getProperty("target.clientcert", defaultClientcert);&lt;br /&gt;           String defaultClientkey =  "C:/projecten/workspace/11g_prod/saml1.1_ws/wsttest1/certs/Alice.prv";&lt;br /&gt;           String clientkey = System.getProperty("target.clientkey", defaultClientkey);&lt;br /&gt;              &lt;br /&gt;           String defaultServerCert = "C:/projecten/workspace/11g_prod/saml1.1_ws/wsttest1/certs/Bob.cer";&lt;br /&gt;           String serverCert = System.getProperty("target.serverCert", defaultServerCert);&lt;br /&gt;&lt;br /&gt;           credList.add(new ClientBSTCredentialProvider(clientcert, clientkey, serverCert));&lt;br /&gt;&lt;br /&gt;           requestContext.put(WSSecurityContext.CREDENTIAL_PROVIDER_LIST, credList);&lt;br /&gt;&lt;br /&gt;           // Add your code to call the desired methods.&lt;br /&gt;           System.out.println(echoService.echo("Hello"));&lt;br /&gt;&lt;br /&gt;       } catch (Exception ex) {&lt;br /&gt;           ex.printStackTrace();&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   }&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-7110844739227373604?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/7110844739227373604/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=7110844739227373604" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/7110844739227373604?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/7110844739227373604?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/yZUAJPt-stY/securing-web-services-with-saml-sender.html" title="Securing Web Services with SAML Sender Vouches" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_earSixbe3dw/Sunye6R5wpI/AAAAAAAADAA/TDxAZPJRtFU/s72-c/saml+sender+vouches.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/10/securing-web-services-with-saml-sender.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8EQ30yfip7ImA9WxNVEEo.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-1360046153537708753</id><published>2009-10-20T23:05:00.010+02:00</published><updated>2009-10-21T00:13:22.396+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-21T00:13:22.396+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g soa suite" /><title>JMS Request Reply Interaction Pattern in Soa Suite 11g</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_uWljDEFjEcRqHmUBT3eF9Qonos/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_uWljDEFjEcRqHmUBT3eF9Qonos/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_uWljDEFjEcRqHmUBT3eF9Qonos/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_uWljDEFjEcRqHmUBT3eF9Qonos/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;In Soa Suite 11g the JMS adapter has support for request reply operations. You can use this operation in synchronous or asynchronous mode.  In this blog I will show you both modes. I start with a Asynchronous example and at the end I describe the synchronous mode.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Asynchronous Request / Reply&lt;/span&gt;&lt;br /&gt;First we start with a simple Asychronous request and reply JMS adapter. Add a JMS adapter to the references site of the composite.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/St4nFeWLooI/AAAAAAAAC9g/-XfzeqC7L-E/s1600-h/a_jms_rr_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 331px;" src="http://1.bp.blogspot.com/_earSixbe3dw/St4nFeWLooI/AAAAAAAAC9g/-XfzeqC7L-E/s400/a_jms_rr_1.png" alt="" id="BLOGGER_PHOTO_ID_5394792378635362946" border="0" /&gt;&lt;/a&gt;Choose Request/ Reply  and off course asynchronous&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/St4nElHA7BI/AAAAAAAAC9Y/MkX0TCYy9NU/s1600-h/a_jms_rr_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 334px;" src="http://3.bp.blogspot.com/_earSixbe3dw/St4nElHA7BI/AAAAAAAAC9Y/MkX0TCYy9NU/s400/a_jms_rr_2.png" alt="" id="BLOGGER_PHOTO_ID_5394792363270925330" border="0" /&gt;&lt;/a&gt;Select a request queue ( need to create this in the wls console )  and provide the jndi name of jms resource adapter ( define this in the jms resource adapter ) . Very important use a xa transacted jms connection factory in the jms resource adapter and  leave the rest as default.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/St4nD5L--NI/AAAAAAAAC9Q/5lHGfuEuiqI/s1600-h/a_jms_rr_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 335px;" src="http://2.bp.blogspot.com/_earSixbe3dw/St4nD5L--NI/AAAAAAAAC9Q/5lHGfuEuiqI/s400/a_jms_rr_3.png" alt="" id="BLOGGER_PHOTO_ID_5394792351480608978" border="0" /&gt;&lt;/a&gt;In the Reply we provide the response queue and use the same jms resource adapter jndi name of the request&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/St4ouzReikI/AAAAAAAAC9o/E4M9J-ZocZ0/s1600-h/a_jms_rr_3_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 328px;" src="http://2.bp.blogspot.com/_earSixbe3dw/St4ouzReikI/AAAAAAAAC9o/E4M9J-ZocZ0/s400/a_jms_rr_3_1.png" alt="" id="BLOGGER_PHOTO_ID_5394794188139039298" border="0" /&gt;&lt;/a&gt;Provide the request and response element.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/St4nDRXCWCI/AAAAAAAAC9I/JGiWdMfpsjE/s1600-h/a_jms_rr_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 331px;" src="http://4.bp.blogspot.com/_earSixbe3dw/St4nDRXCWCI/AAAAAAAAC9I/JGiWdMfpsjE/s400/a_jms_rr_4.png" alt="" id="BLOGGER_PHOTO_ID_5394792340789549090" border="0" /&gt;&lt;/a&gt;With this as result.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/St4nC4EO85I/AAAAAAAAC9A/0ZjT9lq4huE/s1600-h/a_jms_rr_5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 215px;" src="http://2.bp.blogspot.com/_earSixbe3dw/St4nC4EO85I/AAAAAAAAC9A/0ZjT9lq4huE/s400/a_jms_rr_5.png" alt="" id="BLOGGER_PHOTO_ID_5394792333999797138" border="0" /&gt;&lt;/a&gt;Now we can use this jms adapter in a asynchronous Mediator or in a synchronous BPEL process.&lt;br /&gt;First we start with the mediator. Add a Mediator with the same input and output as the jms adapter&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/St4sHzIa22I/AAAAAAAAC-A/r5ALwiZ2qV0/s1600-h/a_jms_rr_6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 295px;" src="http://2.bp.blogspot.com/_earSixbe3dw/St4sHzIa22I/AAAAAAAAC-A/r5ALwiZ2qV0/s400/a_jms_rr_6.png" alt="" id="BLOGGER_PHOTO_ID_5394797916132662114" border="0" /&gt;&lt;/a&gt;Wire the JMS adapter to this Mediator so we can define the routing rules.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/St4sHWffGFI/AAAAAAAAC94/No98qgd6bBM/s1600-h/a_jms_rr_7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 226px;" src="http://1.bp.blogspot.com/_earSixbe3dw/St4sHWffGFI/AAAAAAAAC94/No98qgd6bBM/s400/a_jms_rr_7.png" alt="" id="BLOGGER_PHOTO_ID_5394797908444780626" border="0" /&gt;&lt;/a&gt;With this as result.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/St4sGzL_d1I/AAAAAAAAC9w/yCYWCIXIZ3Q/s1600-h/a_jms_rr_8.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 278px;" src="http://3.bp.blogspot.com/_earSixbe3dw/St4sGzL_d1I/AAAAAAAAC9w/yCYWCIXIZ3Q/s400/a_jms_rr_8.png" alt="" id="BLOGGER_PHOTO_ID_5394797898967775058" border="0" /&gt;&lt;/a&gt;Because this asynchronous service is hard to test, so I will also make a synchronous BPEL process which calls this asynchronous jms adapter with a invoke and receive activity.&lt;br /&gt;Add a BPEL process with the same input and output as the jms adapter&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/St4tu1hMG2I/AAAAAAAAC-4/NIeVthHi2_8/s1600-h/a_jms_rr_9.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 273px;" src="http://4.bp.blogspot.com/_earSixbe3dw/St4tu1hMG2I/AAAAAAAAC-4/NIeVthHi2_8/s400/a_jms_rr_9.png" alt="" id="BLOGGER_PHOTO_ID_5394799686299949922" border="0" /&gt;&lt;/a&gt;Here an overview of the BPEL process with the invoke and receive activity&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/St4tur4xx2I/AAAAAAAAC-w/f-1Z6BMHCRk/s1600-h/a_jms_rr_10.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 241px;" src="http://4.bp.blogspot.com/_earSixbe3dw/St4tur4xx2I/AAAAAAAAC-w/f-1Z6BMHCRk/s400/a_jms_rr_10.png" alt="" id="BLOGGER_PHOTO_ID_5394799683714533218" border="0" /&gt;&lt;/a&gt;Picture of my test composite&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/St4tm0cwKjI/AAAAAAAAC-o/C-0nxZQki3M/s1600-h/a_jms_rr_11.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 285px;" src="http://4.bp.blogspot.com/_earSixbe3dw/St4tm0cwKjI/AAAAAAAAC-o/C-0nxZQki3M/s400/a_jms_rr_11.png" alt="" id="BLOGGER_PHOTO_ID_5394799548573952562" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;For testing we need to transfer the jms message from the request queue to the reply queue. So I add a mediator with a consume and produce jms adapter.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/St4tl_Y_zFI/AAAAAAAAC-g/q4yaAXniTCo/s1600-h/a_jms_rr_12.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 113px;" src="http://3.bp.blogspot.com/_earSixbe3dw/St4tl_Y_zFI/AAAAAAAAC-g/q4yaAXniTCo/s400/a_jms_rr_12.png" alt="" id="BLOGGER_PHOTO_ID_5394799534331120722" border="0" /&gt;&lt;/a&gt;Very important, we need to assign the message id of the jms message to the correlation id of the reply jms message. Do this in the assign of the routing rule.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/St4tlU6kKtI/AAAAAAAAC-Y/d0eNyd6f0lk/s1600-h/a_jms_rr_13.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 100px;" src="http://2.bp.blogspot.com/_earSixbe3dw/St4tlU6kKtI/AAAAAAAAC-Y/d0eNyd6f0lk/s400/a_jms_rr_13.png" alt="" id="BLOGGER_PHOTO_ID_5394799522929191634" border="0" /&gt;&lt;/a&gt;Last thing is to test the BPEL process in the enterprise manager&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/St4tkbxU__I/AAAAAAAAC-Q/6fqJ9n02TQ4/s1600-h/a_jms_rr_14.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 369px; height: 400px;" src="http://2.bp.blogspot.com/_earSixbe3dw/St4tkbxU__I/AAAAAAAAC-Q/6fqJ9n02TQ4/s400/a_jms_rr_14.png" alt="" id="BLOGGER_PHOTO_ID_5394799507589627890" border="0" /&gt;&lt;/a&gt;With this as result.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/St4tj_OXZ8I/AAAAAAAAC-I/pO1dvFlunGU/s1600-h/a_jms_rr_15.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 249px;" src="http://3.bp.blogspot.com/_earSixbe3dw/St4tj_OXZ8I/AAAAAAAAC-I/pO1dvFlunGU/s400/a_jms_rr_15.png" alt="" id="BLOGGER_PHOTO_ID_5394799499926792130" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:130%;"&gt;Synchronous Request / Reply&lt;/span&gt;&lt;br /&gt;The synchronous request reply jms adapter works a bit different then asynchronous.&lt;br /&gt;In step 6 we now select synchronous&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/St4wckhyP8I/AAAAAAAAC_Y/7iesCatFomY/s1600-h/a_jms_rr_15_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 335px;" src="http://1.bp.blogspot.com/_earSixbe3dw/St4wckhyP8I/AAAAAAAAC_Y/7iesCatFomY/s400/a_jms_rr_15_1.png" alt="" id="BLOGGER_PHOTO_ID_5394802671036284866" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In step 7 we can provide the request and reply queue. But very important we to provide the jndi name of a jms resource adapter which has transacted on true and use a jms connection factory which is not xa transacted.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/St4wcGiIOfI/AAAAAAAAC_Q/bFpM8fS5zDY/s1600-h/a_jms_rr_16.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 334px;" src="http://1.bp.blogspot.com/_earSixbe3dw/St4wcGiIOfI/AAAAAAAAC_Q/bFpM8fS5zDY/s400/a_jms_rr_16.png" alt="" id="BLOGGER_PHOTO_ID_5394802662984661490" border="0" /&gt;&lt;/a&gt;With synchronous jms adapter I had to switch the request and response element. Very strange ( is it a bug ).&lt;br /&gt;&lt;br /&gt;This synchronous jms message is a bit different, this message has the JCA_JMSReplyTo field which contains the reply queue name.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/St4wb26mlhI/AAAAAAAAC_I/mqYfp6X_uF4/s1600-h/a_jms_rr_17.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 170px;" src="http://2.bp.blogspot.com/_earSixbe3dw/St4wb26mlhI/AAAAAAAAC_I/mqYfp6X_uF4/s400/a_jms_rr_17.png" alt="" id="BLOGGER_PHOTO_ID_5394802658792347154" border="0" /&gt;&lt;/a&gt;Now for testing we also need to add an extra mediator with reads the request queue , set the correlation id and put the message in the reply queue.&lt;br /&gt;&lt;br /&gt;Add a synchronous mediator and wire  to the synchronous jms adapter, complete the routing rule and finally test this in the enterprise manager.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-1360046153537708753?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/1360046153537708753/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=1360046153537708753" title="28 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/1360046153537708753?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/1360046153537708753?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/SRDIeoNdxZM/jms-request-reply-interaction-pattern.html" title="JMS Request Reply Interaction Pattern in Soa Suite 11g" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_earSixbe3dw/St4nFeWLooI/AAAAAAAAC9g/-XfzeqC7L-E/s72-c/a_jms_rr_1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">28</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/10/jms-request-reply-interaction-pattern.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIDR3k-fyp7ImA9WxNWFko.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-4712380544904078230</id><published>2009-10-15T22:53:00.005+02:00</published><updated>2009-10-16T07:56:16.757+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-16T07:56:16.757+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" /><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g" /><title>Oracle OpenWorld 2009 Fusion middleware highlights</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/r7-S41kgtDmV6g_RQ5hE7tJ6x9w/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r7-S41kgtDmV6g_RQ5hE7tJ6x9w/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/r7-S41kgtDmV6g_RQ5hE7tJ6x9w/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r7-S41kgtDmV6g_RQ5hE7tJ6x9w/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;The most important news is that Oracle plans to release JDeveloper 11g R1 PS1 in November. This so called patch set is more a new release ( more then 550+ new features )   then a patch&lt;br /&gt;Here is my quick overview of the features and products I noticed at OOW.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;ADF&lt;/span&gt;&lt;br /&gt;- Oracle improved the ADF Event mechanism, so the Task Flow fragment regions can communicate much better, You can define the event on a JSF item and not manually in the pagedef, define your own payload. For example in an ADF tree with employees and departments you can send an event when the user select an item in the tree and this number will be passed on to the right task flow. And you even can fire events with drag and drop. For more info buy the coming book of Frank Nimphius, he wrote a whole chapter about this subject.&lt;br /&gt;- ADS active data services pushing the data to the page, Frank N. and Matthias W. made a great demo&lt;br /&gt;- Maybe Maven support.&lt;br /&gt;- Better EJB support in ADF&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ADF Mobile&lt;/span&gt;&lt;br /&gt;Build your web application just like a normal ADF web application on deploy this on weblogic server. These mobile jsf pages which work on every phone in the native look of the phone, the so called the browser version. With mobile you can also build native applications for blackberry and windows mobile ( just make the right deployment profile )  and this will work with the black berry and windows mobile services and these services will sync with the oracle lite server. So this technology makes it possible to make an offline ADF application, when there are enough customers who wants this feature then Oracle will build this. ADF mobile is now only supported with ADF BC and the next versions will have also have web services support. &lt;br /&gt;For more info see the &lt;a href="http://technology.amis.nl/blog/6338/and-they-call-that-a-patch-set-marvels-coming-up-in-adf-11gr1-ps-1#more-6338"&gt;Amis blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Soa Suite 11G&lt;/span&gt;&lt;br /&gt;-The soa suite is becoming more and more complete, the next version will have a spring context component, this component is in this version only available as technical preview.  But this is a good start and there are talks about supporting C code in the composite.&lt;br /&gt;- EDN Event Delivery Network now only works with AQ but there will be also a JMS implementation.&lt;br /&gt;For more info see the blog of &lt;a href="http://torstenwinterberg.blogspot.com/2009/10/oow-2009-oracle-soa-suite-11g.html"&gt;Torsten &lt;/a&gt;and &lt;a href="http://hajonormann.wordpress.com/2009/10/13/oow-soa-gems-sca-is-the-j2ee-of-soa/"&gt;Hajo&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;BPM 11G&lt;/span&gt;&lt;br /&gt;In one of the hands-on sessions we could play with BPM 11g and it is really great.  You can now use JDeveloper to configure it and BPM is an composite component in the Soa Suite. So you can take a look or change it at the BPM level or go to the composite level. BPM uses the human task flows components of the soa suite for the human interaction, Next we can import &lt;a href="http://biemond.blogspot.com/2007/12/adf-taskflow-based-on-human-task.html"&gt;this human task in jdeveloper&lt;/a&gt; to create an task flow which can be deployed in the worklist application. And BPM introduces the BPM composer which is a web application ( don't need jdeveloper )  where you can change your process. Oracle thinks to release it early 2010.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-4712380544904078230?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/4712380544904078230/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=4712380544904078230" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/4712380544904078230?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/4712380544904078230?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/vyZeOtFC-Tg/oracle-openworld-2009-fusion-middleware.html" title="Oracle OpenWorld 2009 Fusion middleware highlights" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/10/oracle-openworld-2009-fusion-middleware.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8CSHo-fSp7ImA9WxNXF08.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-8312722513884486578</id><published>2009-10-04T23:12:00.010+02:00</published><updated>2009-10-05T09:31:09.455+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-05T09:31:09.455+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="hudson" /><title>Continuous build with Soa Suite 11g and Hudson</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/UZGm7hDhgX8DdMrSUeeMrFNrtSI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UZGm7hDhgX8DdMrSUeeMrFNrtSI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/UZGm7hDhgX8DdMrSUeeMrFNrtSI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UZGm7hDhgX8DdMrSUeeMrFNrtSI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;With Soa Suite 11g we can add unit tests (test suites) to our composite applications and start these tests with the ant scripts provided by Oracle. The soa test ant script can start and generate an junit xml which can be read for the result of the test.  For more info see my previous blogpost about the&lt;a href="http://biemond.blogspot.com/2009/09/deploy-soa-suite-11g-composite.html"&gt; ant scripts&lt;/a&gt; and the &lt;a href="http://biemond.blogspot.com/2009/07/unit-test-your-composite-application.html"&gt;testsuite&lt;/a&gt; option in Soa Suite 11g.&lt;br /&gt;&lt;br /&gt;So the last step is to combine the test suite feature and the ant scripts of mine and Oracle so we can use it in a continuous build system. I will use &lt;a href="https://hudson.dev.java.net/"&gt;Hudson &lt;/a&gt;for this.&lt;br /&gt;&lt;br /&gt;We start by downloading the lastest hudson war.&lt;br /&gt;&lt;br /&gt;Start hudson by setting the java home and path&lt;br /&gt;set JAVA_HOME=c:\java\jdk160_05&lt;br /&gt;set PATH=%JAVA_HOME%\bin;%PATH&lt;br /&gt;java -jar hudson.war&lt;br /&gt;&lt;br /&gt;this will start Hudson and open a browser and go to http://localhost:8080.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SskRYzN0FTI/AAAAAAAAC8w/t2HsqagTQJ0/s1600-h/hudson_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 230px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SskRYzN0FTI/AAAAAAAAC8w/t2HsqagTQJ0/s400/hudson_1.png" alt="" id="BLOGGER_PHOTO_ID_5388857546888189234" border="0" /&gt;&lt;/a&gt;First we install Hudson as a windows service. Just provide the location. I will use c:\java\hudson&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SskRYh_7XRI/AAAAAAAAC8o/PqDSWVBcl3w/s1600-h/hudson_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 87px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SskRYh_7XRI/AAAAAAAAC8o/PqDSWVBcl3w/s400/hudson_2.png" alt="" id="BLOGGER_PHOTO_ID_5388857542266543378" border="0" /&gt;&lt;/a&gt;This will restart hudson. Now we can configure Hudson&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SskROWvZt2I/AAAAAAAAC8g/zwrBVq7U5U0/s1600-h/hudson_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 122px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SskROWvZt2I/AAAAAAAAC8g/zwrBVq7U5U0/s400/hudson_3.png" alt="" id="BLOGGER_PHOTO_ID_5388857367445747554" border="0" /&gt;&lt;/a&gt;Provide the ant and java location of the jdeveloper 11g R1 home.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SskROOfUMdI/AAAAAAAAC8Y/riI7My1yfZQ/s1600-h/hudson_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 184px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SskROOfUMdI/AAAAAAAAC8Y/riI7My1yfZQ/s400/hudson_4.png" alt="" id="BLOGGER_PHOTO_ID_5388857365230793170" border="0" /&gt;&lt;/a&gt;Put the soa projects and ant scripts in subversion, so Hudson can check this out&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SskRNuFf1AI/AAAAAAAAC8Q/Ew_T3YHL1CM/s1600-h/hudson_5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 330px; height: 194px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SskRNuFf1AI/AAAAAAAAC8Q/Ew_T3YHL1CM/s400/hudson_5.png" alt="" id="BLOGGER_PHOTO_ID_5388857356532569090" border="0" /&gt;&lt;/a&gt;This is how it looks.  Very important my ant scripts need this folder paths.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SskV__AW_NI/AAAAAAAAC84/Bkaxuf9WjHk/s1600-h/hudson_13.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 183px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SskV__AW_NI/AAAAAAAAC84/Bkaxuf9WjHk/s400/hudson_13.png" alt="" id="BLOGGER_PHOTO_ID_5388862618114391250" border="0" /&gt;&lt;/a&gt;Now we can create a new job.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SskRNZ5LPRI/AAAAAAAAC8I/hzA8cnjacHI/s1600-h/hudson_6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 250px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SskRNZ5LPRI/AAAAAAAAC8I/hzA8cnjacHI/s400/hudson_6.png" alt="" id="BLOGGER_PHOTO_ID_5388857351112178962" border="0" /&gt;&lt;/a&gt;Configure this new job. We start by adding the svn url.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SskRNKU77DI/AAAAAAAAC8A/gxhjiSMF_o4/s1600-h/hudson_7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 228px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SskRNKU77DI/AAAAAAAAC8A/gxhjiSMF_o4/s400/hudson_7.png" alt="" id="BLOGGER_PHOTO_ID_5388857346933648434" border="0" /&gt;&lt;/a&gt;Then add the ant script ( build.xml ) and fill the target ( deployAll)   and for the oracle ant scripts we need to set the basedir java parameter to the jdeveloper bin folder.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SskQ_-bO1zI/AAAAAAAAC74/LD2NYhyzQ1Y/s1600-h/hudson_8.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 187px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SskQ_-bO1zI/AAAAAAAAC74/LD2NYhyzQ1Y/s400/hudson_8.png" alt="" id="BLOGGER_PHOTO_ID_5388857120400529202" border="0" /&gt;&lt;/a&gt;And provide the location where Hudson can find the junit xml files.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SskQ_djCdSI/AAAAAAAAC7w/cdCQMNfJX3k/s1600-h/hudson_9.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 118px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SskQ_djCdSI/AAAAAAAAC7w/cdCQMNfJX3k/s400/hudson_9.png" alt="" id="BLOGGER_PHOTO_ID_5388857111574902050" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now we have to add ant-contrib-1.0XXXX.jar the to the  jdeveloper\ant\lib folder and add a environment variable to the ant.bat&lt;br /&gt;&lt;br /&gt;set CURRENT_FOLDER=%CD%&lt;br /&gt;&lt;br /&gt;I need this for the ant scripts so I can use relative paths.&lt;br /&gt;&lt;br /&gt;Let's press build now and look at the result. My example composite application contains two tests, in my case they are both succesfull.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SskQ_PAVipI/AAAAAAAAC7o/7WMBvrs4LHk/s1600-h/hudson_10.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 178px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SskQ_PAVipI/AAAAAAAAC7o/7WMBvrs4LHk/s400/hudson_10.png" alt="" id="BLOGGER_PHOTO_ID_5388857107671255698" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Look at the test.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SskQ-oAtlWI/AAAAAAAAC7g/tPF2bGj2750/s1600-h/hudson_11.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 128px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SskQ-oAtlWI/AAAAAAAAC7g/tPF2bGj2750/s400/hudson_11.png" alt="" id="BLOGGER_PHOTO_ID_5388857097203848546" border="0" /&gt;&lt;/a&gt;And the performance.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SskQ-U3PchI/AAAAAAAAC7Y/Gobg5JsfvXA/s1600-h/hudson_12.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 132px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SskQ-U3PchI/AAAAAAAAC7Y/Gobg5JsfvXA/s400/hudson_12.png" alt="" id="BLOGGER_PHOTO_ID_5388857092063851026" border="0" /&gt;&lt;/a&gt;That's all. This will save you a lot of testing time and off course Hudson can blame the person who checked in as last.&lt;br /&gt;Here is &lt;a href="http://www.sbsframes.nl/jdeveloper/hudson.zip"&gt;my test project and ant scripts&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-8312722513884486578?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/8312722513884486578/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=8312722513884486578" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/8312722513884486578?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/8312722513884486578?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/XrmVKUg8FNs/continious-build-with-soa-suite-11g-and.html" title="Continuous build with Soa Suite 11g and Hudson" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_earSixbe3dw/SskRYzN0FTI/AAAAAAAAC8w/t2HsqagTQJ0/s72-c/hudson_1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/10/continious-build-with-soa-suite-11g-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcDRHw9fSp7ImA9WxBTFUs.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-8583969221901211554</id><published>2009-09-26T13:06:00.021+02:00</published><updated>2009-12-11T22:14:35.265+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-11T22:14:35.265+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g soa suite" /><title>Deploy Soa Suite 11g composite applications with Ant scripts</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/SCWjFO_VdwKjnxedOE_pVDV7zxA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/SCWjFO_VdwKjnxedOE_pVDV7zxA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/SCWjFO_VdwKjnxedOE_pVDV7zxA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/SCWjFO_VdwKjnxedOE_pVDV7zxA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;With Soa Suite 11g you can deploy your composite applications from JDeveloper or with Ant.  In this blog I will do this with the soa 11g Ant scripts. These ant scripts can only deploy one project so I made an Ant script around the soa ant scripts which can deploy more composites applications to different Soa enviroments. So now you can use it to automate your deployment or use it in your build tool.  In my ant script I will deploy to the MDS,  compile, build and package the composite application and deploy this to the soa server, after this I use an ant script to start the &lt;a href="http://biemond.blogspot.com/2009/07/unit-test-your-composite-application.html"&gt;unit tests&lt;/a&gt; and generate a junit result xml and at last I can optional disable the composite.&lt;br /&gt;This junit xml can be used in your continious build system. You can easily extend this build script so you use it to manage the composite applications.&lt;br /&gt;For more info over ant deployment see the official &lt;a href="http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10224/sca_lifecycle.htm#CACDGDIG"&gt;deployment documentation&lt;/a&gt; .&lt;br /&gt;The official ant scripts are located in the jdeverloper\bin folder. Here is a summary what are and can do&lt;br /&gt;&lt;ul&gt;&lt;li&gt;ant-sca-test.xml,  This script can start the test suites of the composite and generates a juinit report and not Attaches, extracts, generates, and validates configuration plans for a SOA composite application, The official documentation description is not correct.&lt;/li&gt;&lt;li&gt;ant-sca-compile.xml, Compiles a SOA composite application ,this script is also called in the package scrip, so we don't need to call this directly.&lt;/li&gt;&lt;li&gt;ant-sca-package.xml, Packages a SOA composite application into a composite SAR file and also validates and build the composite application.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;ant-sca-deploy.xml, Deploys a SOA composite application.&lt;/li&gt;&lt;li&gt;ant-sca-mgmt.xml, Manages a SOA composite application, including starting, stopping, activating, retiring, assigning a default revision version, and listing deployed SOA composite applications.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Here is the main build.properties where you have to define the jdeveloper and your application home, which composite applications you want to deploy and to which environment dev or acc.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&lt;br /&gt;# global&lt;br /&gt;wn.bea.home=C:/oracle/MiddlewareJdev11gR1PS1&lt;br /&gt;oracle.home=${wn.bea.home}/jdeveloper&lt;br /&gt;java.passed.home=${wn.bea.home}/jdk160_14_R27.6.5-32&lt;br /&gt;wl_home=${wn.bea.home}/wlserver_10.3&lt;br /&gt;&lt;br /&gt;# temp&lt;br /&gt;tmp.output.dir=c:/temp&lt;br /&gt;junit.output.dir=../../&lt;br /&gt;&lt;br /&gt;applications.home=../../applications&lt;br /&gt;applications=HelloWorld&lt;br /&gt;&lt;br /&gt;mds.enabled=true&lt;br /&gt;mds.reposistory=C:/oracle/MiddlewareJdev11gR1PS1/jdeveloper/integration/seed/apps/&lt;br /&gt;mds.applications=Woningnet-Test&lt;br /&gt;mds.undeploy=true&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;deployment.plan.environment=dev&lt;br /&gt;&lt;br /&gt;# dev deployment server weblogic&lt;br /&gt;dev.serverURL=http://laptopedwin:8001&lt;br /&gt;dev.overwrite=true&lt;br /&gt;dev.user=weblogic&lt;br /&gt;dev.password=weblogic1&lt;br /&gt;dev.forceDefault=true&lt;br /&gt;dev.server=laptopedwin&lt;br /&gt;dev.port=8001&lt;br /&gt;&lt;br /&gt;# acceptance deployment server weblogic&lt;br /&gt;acc.serverURL=http://laptopedwin:8001&lt;br /&gt;acc.overwrite=true&lt;br /&gt;acc.user=weblogic&lt;br /&gt;acc.password=weblogic1&lt;br /&gt;acc.forceDefault=true&lt;br /&gt;acc.server=laptopedwin&lt;br /&gt;acc.port=8001&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Every application can have one or more soa projects so the main ant script will load the application properties file which contains all the project with its revision number.&lt;br /&gt;Here is a example of SoaEjbReference.properties file&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;projects=Helloworld&lt;br /&gt;&lt;br /&gt;Helloworld.revision=1.0&lt;br /&gt;Helloworld.enabled=false&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Because in my example I have two soa environments so I need to create two configuration plans. With this plan ( which look the &lt;a href="http://biemond.blogspot.com/2009/04/using-weblogic-deployment-plan-to.html"&gt;wls plan&lt;/a&gt; )  can change the url of endpoints so it matches with the environment.&lt;br /&gt;Select the composite application xml and generate  a configuration plan.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/Sr4FrHx_FyI/AAAAAAAAC5g/DJCoZrOI6MY/s1600-h/ant_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 267px; height: 400px;" src="http://4.bp.blogspot.com/_earSixbe3dw/Sr4FrHx_FyI/AAAAAAAAC5g/DJCoZrOI6MY/s400/ant_1.png" alt="" id="BLOGGER_PHOTO_ID_5385748442762909474" border="0" /&gt;&lt;/a&gt;Add the dev or acc extension to the file name.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/Sr4FreyCrvI/AAAAAAAAC5o/LUd5Y5qeG9g/s1600-h/ant_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 190px;" src="http://4.bp.blogspot.com/_earSixbe3dw/Sr4FreyCrvI/AAAAAAAAC5o/LUd5Y5qeG9g/s400/ant_2.png" alt="" id="BLOGGER_PHOTO_ID_5385748448937160434" border="0" /&gt;&lt;/a&gt;Here you see how the plan looks like.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/Sr4Fr830BHI/AAAAAAAAC5w/g7DMPudg-Zw/s1600-h/ant_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 259px;" src="http://4.bp.blogspot.com/_earSixbe3dw/Sr4Fr830BHI/AAAAAAAAC5w/g7DMPudg-Zw/s400/ant_3.png" alt="" id="BLOGGER_PHOTO_ID_5385748457014428786" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And here is the main ant build script which can do it all and calls the Oracle Ant scripts.&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="iso-8859-1"?&amp;gt;&lt;br /&gt;&amp;lt;project name="soaDeployAll" default="deployAll"&amp;gt;&lt;br /&gt;   &amp;lt;echo&amp;gt;basedir ${basedir}&amp;lt;/echo&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;property environment="env"/&amp;gt;&lt;br /&gt;   &amp;lt;echo&amp;gt;current folder ${env.CURRENT_FOLDER}&amp;lt;/echo&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;property file="${env.CURRENT_FOLDER}/build.properties"/&amp;gt; &lt;br /&gt;&lt;br /&gt;   &amp;lt;taskdef resource="net/sf/antcontrib/antcontrib.properties"/&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;import file="${basedir}/ant-sca-deploy.xml"/&amp;gt;&lt;br /&gt;   &amp;lt;import file="${basedir}/ant-sca-package.xml"/&amp;gt;&lt;br /&gt;   &amp;lt;import file="${basedir}/ant-sca-test.xml"/&amp;gt;&lt;br /&gt;   &amp;lt;import file="${basedir}/ant-sca-test.xml"/&amp;gt;&lt;br /&gt;   &amp;lt;import file="${basedir}/ant-sca-mgmt.xml"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;target name="deployAll"&amp;gt;&lt;br /&gt;     &amp;lt;if&amp;gt;&lt;br /&gt;         &amp;lt;equals arg1="${mds.enabled}" arg2="true"/&amp;gt;&lt;br /&gt;         &amp;lt;then&amp;gt;&lt;br /&gt;            &amp;lt;antcall target="deployMDS" inheritall="true"/&amp;gt;&lt;br /&gt;         &amp;lt;/then&amp;gt;&lt;br /&gt;     &amp;lt;/if&amp;gt;     &lt;br /&gt;     &amp;lt;foreach list="${applications}" param="application" target="deployApplication" inheritall="true" inheritrefs="false"/&amp;gt;&lt;br /&gt;   &amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;target name="unDeployMDS"&amp;gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;undeploy MDS&amp;lt;/echo&amp;gt;&lt;br /&gt;       &amp;lt;foreach list="${mds.applications}" param="mds.application" target="undeployMDSApplication" inheritall="true" inheritrefs="false"/&amp;gt;&lt;br /&gt;   &amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;target name="deployMDS"&amp;gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;undeploy and deploy MDS&amp;lt;/echo&amp;gt;&lt;br /&gt;       &amp;lt;if&amp;gt;&lt;br /&gt;         &amp;lt;equals arg1="${mds.undeploy}" arg2="true"/&amp;gt;&lt;br /&gt;         &amp;lt;then&amp;gt;&lt;br /&gt;           &amp;lt;foreach list="${mds.applications}" param="mds.application" target="undeployMDSApplication" inheritall="true" inheritrefs="false"/&amp;gt;&lt;br /&gt;         &amp;lt;/then&amp;gt;&lt;br /&gt;       &amp;lt;/if&amp;gt;&lt;br /&gt;       &amp;lt;foreach list="${mds.applications}" param="mds.application" target="deployMDSApplication" inheritall="true" inheritrefs="false"/&amp;gt;&lt;br /&gt;   &amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;target name="deployMDSApplication"&amp;gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;deploy MDS application ${mds.application}&amp;lt;/echo&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;remove and create local MDS temp&amp;lt;/echo&amp;gt;&lt;br /&gt;       &amp;lt;property name="mds.deploy.dir" value="${tmp.output.dir}/${mds.application}"/&amp;gt;&lt;br /&gt;    &lt;br /&gt;       &amp;lt;delete dir="${mds.deploy.dir}"/&amp;gt;&lt;br /&gt;       &amp;lt;mkdir dir="${mds.deploy.dir}"/&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;create zip from file MDS store&amp;lt;/echo&amp;gt;&lt;br /&gt;      &amp;lt;zip destfile="${mds.deploy.dir}/${mds.application}_mds.jar" compress="false"&amp;gt;&lt;br /&gt;       &amp;lt;fileset dir="${mds.reposistory}" includes="${mds.application}/**"/&amp;gt;&lt;br /&gt;     &amp;lt;/zip&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;create zip with MDS jar&amp;lt;/echo&amp;gt;&lt;br /&gt;      &amp;lt;zip destfile="${mds.deploy.dir}/${mds.application}_mds.zip" compress="false"&amp;gt;&lt;br /&gt;       &amp;lt;fileset dir="${mds.deploy.dir}" includes="*.jar"/&amp;gt;&lt;br /&gt;     &amp;lt;/zip&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.serverURL"    from="${deployment.plan.environment}.serverURL"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.overwrite"    from="${deployment.plan.environment}.overwrite"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.user"         from="${deployment.plan.environment}.user"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.password"     from="${deployment.plan.environment}.password"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.forceDefault" from="${deployment.plan.environment}.forceDefault"/&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;deploy MDS app&amp;lt;/echo&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;deploy on ${deploy.serverURL} with user ${deploy.user}&amp;lt;/echo&amp;gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;deploy sarFile ${mds.deploy.dir}/${mds.application}_mds.zip&amp;lt;/echo&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;antcall target="deploy" inheritall="false"&amp;gt;&lt;br /&gt;            &amp;lt;param name="wl_home" value="${wl_home}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="oracle.home" value="${oracle.home}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="serverURL" value="${deploy.serverURL}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="user" value="${deploy.user}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="password" value="${deploy.password}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="overwrite" value="${deploy.overwrite}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="forceDefault" value="${deploy.forceDefault}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="sarLocation" value="${mds.deploy.dir}/${mds.application}_mds.zip"/&amp;gt;&lt;br /&gt;       &amp;lt;/antcall&amp;gt; &lt;br /&gt;   &amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;target name="undeployMDSApplication"&amp;gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;undeploy MDS application ${mds.application}&amp;lt;/echo&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.serverURL"    from="${deployment.plan.environment}.serverURL"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.overwrite"    from="${deployment.plan.environment}.overwrite"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.user"         from="${deployment.plan.environment}.user"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.password"     from="${deployment.plan.environment}.password"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.forceDefault" from="${deployment.plan.environment}.forceDefault"/&amp;gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;echo&amp;gt;undeploy MDS app folder apps/${mds.application} &amp;lt;/echo&amp;gt;&lt;br /&gt;        &amp;lt;antcall target="removeSharedData" inheritall="false"&amp;gt;&lt;br /&gt;             &amp;lt;param name="wl_home" value="${wl_home}"/&amp;gt;&lt;br /&gt;             &amp;lt;param name="oracle.home" value="${oracle.home}"/&amp;gt;&lt;br /&gt;             &amp;lt;param name="serverURL" value="${deploy.serverURL}"/&amp;gt;&lt;br /&gt;             &amp;lt;param name="user" value="${deploy.user}"/&amp;gt;&lt;br /&gt;             &amp;lt;param name="password" value="${deploy.password}"/&amp;gt;&lt;br /&gt;             &amp;lt;param name="folderName" value="${mds.application}"/&amp;gt;&lt;br /&gt;        &amp;lt;/antcall&amp;gt;&lt;br /&gt;   &amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;target name="deployApplication"&amp;gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;deploy application ${application}&amp;lt;/echo&amp;gt;&lt;br /&gt;       &amp;lt;property file="${env.CURRENT_FOLDER}/${applications.home}/${application}/build.properties"/&amp;gt;  &lt;br /&gt;       &amp;lt;foreach list="${projects}" param="project" target="deployProject" inheritall="true" inheritrefs="false"/&amp;gt;&lt;br /&gt;   &amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;target name="deployProject"&amp;gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;deploy project ${project} for  environment ${deployment.plan.environment}&amp;lt;/echo&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;property name="proj.compositeName" value="${project}"/&amp;gt;&lt;br /&gt;       &amp;lt;property name="proj.compositeDir" value="${env.CURRENT_FOLDER}/${applications.home}/${application}"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="proj.revision" from="${project}.revision"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="proj.enabled" from="${project}.enabled"/&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;deploy compositeName ${proj.compositeName}&amp;lt;/echo&amp;gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;deploy compositeDir ${proj.compositeDir}&amp;lt;/echo&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;antcall target="package" inheritall="false"&amp;gt;&lt;br /&gt;            &amp;lt;param name="compositeDir" value="${proj.compositeDir}/${project}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="compositeName" value="${proj.compositeName}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="revision" value="${proj.revision}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="oracle.home" value="${oracle.home}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="java.passed.home" value="${java.passed.home}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="wl_home" value="${wl_home}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="sca.application.home" value="${proj.compositeDir}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="scac.application.home" value="${proj.compositeDir}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="scac.input" value="${proj.compositeDir}/${proj.compositeName}/composite.xml"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="scac.output" value="${tmp.output.dir}/${proj.compositeName}.xml"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="scac.error" value="${tmp.output.dir}/${proj.compositeName}.err"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="scac.displayLevel" value="3"/&amp;gt;&lt;br /&gt;       &amp;lt;/antcall&amp;gt; &lt;br /&gt;&lt;br /&gt;       &amp;lt;property name="deploy.sarLocation" value="${proj.compositeDir}/${proj.compositeName}/deploy/sca_${proj.compositeName}_rev${proj.revision}.jar"/&amp;gt;&lt;br /&gt;       &amp;lt;property name="deploy.configplan"  value="${proj.compositeDir}/${proj.compositeName}/${proj.compositeName}_cfgplan_${deployment.plan.environment}.xml"/&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.serverURL"    from="${deployment.plan.environment}.serverURL"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.overwrite"    from="${deployment.plan.environment}.overwrite"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.user"         from="${deployment.plan.environment}.user"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.password"     from="${deployment.plan.environment}.password"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.forceDefault" from="${deployment.plan.environment}.forceDefault"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.server"       from="${deployment.plan.environment}.server"/&amp;gt;&lt;br /&gt;       &amp;lt;propertycopy name="deploy.port"         from="${deployment.plan.environment}.port"/&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;deploy on ${deploy.serverURL} with user ${deploy.user}&amp;lt;/echo&amp;gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;deploy sarFile ${deploy.sarLocation}&amp;lt;/echo&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;antcall target="deploy" inheritall="false"&amp;gt;&lt;br /&gt;            &amp;lt;param name="wl_home" value="${wl_home}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="oracle.home" value="${oracle.home}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="serverURL" value="${deploy.serverURL}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="user" value="${deploy.user}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="password" value="${deploy.password}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="overwrite" value="${deploy.overwrite}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="forceDefault" value="${deploy.forceDefault}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="sarLocation" value="${deploy.sarLocation}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="configplan" value="${deploy.configplan}"/&amp;gt;&lt;br /&gt;       &amp;lt;/antcall&amp;gt; &lt;br /&gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;unit test sarFile ${proj.compositeName} &amp;lt;/echo&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;antcall target="test" inheritall="false"&amp;gt;&lt;br /&gt;            &amp;lt;param name="scatest.input" value="${project}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="scatest.format" value="junit"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="scatest.result" value="${env.CURRENT_FOLDER}/${junit.output.dir}"/&amp;gt;&lt;br /&gt;            &amp;lt;param name="jndi.properties.input" value="${deployment.plan.environment}.jndi.properties"/&amp;gt;&lt;br /&gt;       &amp;lt;/antcall&amp;gt;&lt;br /&gt;&lt;br /&gt;       &amp;lt;echo&amp;gt;disable composite ${proj.compositeName} &amp;lt;/echo&amp;gt;&lt;br /&gt;          &lt;br /&gt;       &amp;lt;if&amp;gt;&lt;br /&gt;         &amp;lt;equals arg1="${proj.enabled}" arg2="false"/&amp;gt;&lt;br /&gt;         &amp;lt;then&amp;gt;&lt;br /&gt;           &amp;lt;antcall target="stopComposite" inheritall="false"&amp;gt;&lt;br /&gt;                 &amp;lt;param name="host" value="${deploy.server}"/&amp;gt;&lt;br /&gt;                 &amp;lt;param name="port" value="${deploy.port}"/&amp;gt;&lt;br /&gt;                 &amp;lt;param name="user" value="${deploy.user}"/&amp;gt;&lt;br /&gt;                 &amp;lt;param name="password" value="${deploy.password}"/&amp;gt;&lt;br /&gt;                 &amp;lt;param name="compositeName" value="${proj.compositeName}"/&amp;gt;&lt;br /&gt;                 &amp;lt;param name="revision" value="${proj.revision}"/&amp;gt;&lt;br /&gt;            &amp;lt;/antcall&amp;gt; &lt;br /&gt;&lt;br /&gt;         &amp;lt;/then&amp;gt;&lt;br /&gt;       &amp;lt;/if&amp;gt;&lt;br /&gt;      &lt;br /&gt;      &lt;br /&gt;       &lt;br /&gt;   &amp;lt;/target&amp;gt;&lt;br /&gt;&amp;lt;/project&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;For development testing environment I need to have dev.jndi.properties&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory&lt;br /&gt;java.naming.provider.url=t3://localhost:8001/soa-infra&lt;br /&gt;java.naming.security.principal=weblogic&lt;br /&gt;java.naming.security.credentials=weblogic1&lt;br /&gt;dedicated.connection=true&lt;br /&gt;dedicated.rmicontext=true&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And finally the cmd script to run this ant script. To make this work we need the ant-contrib libray and put this in the classpath.&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;set ORACLE_HOME=C:\oracle\MiddlewareJdev11gR1PS1&lt;br /&gt;set ANT_HOME=%ORACLE_HOME%\jdeveloper\ant&lt;br /&gt;set PATH=%ANT_HOME%\bin;%PATH%&lt;br /&gt;set JAVA_HOME=%ORACLE_HOME%\jdk160_14_R27.6.5-32&lt;br /&gt;&lt;br /&gt;set CURRENT_FOLDER=%CD%&lt;br /&gt;&lt;br /&gt;ant -f build.xml deployAll -Dbasedir=%ORACLE_HOME%\jdeveloper\bin&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Here is the &lt;a href="http://www.sbsframes.nl/jdeveloper/soa11g_ant.zip"&gt;zip&lt;/a&gt; with all the files and extract this and put this all in the jdeveloper/bin folder.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-8583969221901211554?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/8583969221901211554/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=8583969221901211554" title="31 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/8583969221901211554?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/8583969221901211554?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/oItPdiud3I0/deploy-soa-suite-11g-composite.html" title="Deploy Soa Suite 11g composite applications with Ant scripts" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_earSixbe3dw/Sr4FrHx_FyI/AAAAAAAAC5g/DJCoZrOI6MY/s72-c/ant_1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">31</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/09/deploy-soa-suite-11g-composite.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkEMRn0-cCp7ImA9WxNQFkg.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-1004848973245745232</id><published>2009-09-22T21:30:00.007+02:00</published><updated>2009-09-22T22:18:07.358+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-22T22:18:07.358+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" /><title>Job scheduling in Weblogic</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Wr5UQY2Tu0699UO4g4xj3QESYgw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Wr5UQY2Tu0699UO4g4xj3QESYgw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Wr5UQY2Tu0699UO4g4xj3QESYgw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Wr5UQY2Tu0699UO4g4xj3QESYgw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;This blog is about how you can run a batchjob on a specific time in the Weblogic application server and as extra, I made an ADF page in which you can stop or start the jobs. This job schedular can start for example some Soa processes at a specific time.&lt;br /&gt;The scheduling is done with the help of the CommonJ API which is standard in Weblogic. This example works perfectly in a managed node but if you want to do the same in a Weblogic Cluster then you should not read this blog and go the &lt;a href="http://blogs.oracle.com/jamesbayer/2009/04/a_simple_job_scheduler_example.html"&gt;James Bayer's blog&lt;/a&gt; . And for more information about Timer API see the official &lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/e13733/toc.htm"&gt;Weblogic documentation&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Very important,  this job scheduling only works within in a web application.&lt;br /&gt;First we start by adding the TimerManager to the web.xml&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt; &amp;lt;resource-ref&amp;gt;&lt;br /&gt;   &amp;lt;res-ref-name&amp;gt;tm/TimerManager&amp;lt;/res-ref-name&amp;gt;&lt;br /&gt;   &amp;lt;res-type&amp;gt;commonj.timers.TimerManager&amp;lt;/res-type&amp;gt;&lt;br /&gt;   &amp;lt;res-auth&amp;gt;Container&amp;lt;/res-auth&amp;gt;&lt;br /&gt;   &amp;lt;res-sharing-scope&amp;gt;Unshareable&amp;lt;/res-sharing-scope&amp;gt;&lt;br /&gt; &amp;lt;/resource-ref&amp;gt;&lt;br /&gt;&amp;lt;/web-app&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now we done this we can add a servlet which start this TimerManager and its jobs. Important that the servlet is automatically started when the webapp is started.&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt; &amp;lt;servlet&amp;gt;&lt;br /&gt;   &amp;lt;display-name&amp;gt;timer&amp;lt;/display-name&amp;gt;&lt;br /&gt;   &amp;lt;servlet-name&amp;gt;timer&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;   &amp;lt;servlet-class&amp;gt;nl.whitehorses.wls.schedular.TimerServlet&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;   &amp;lt;load-on-startup&amp;gt;100&amp;lt;/load-on-startup&amp;gt;&lt;br /&gt; &amp;lt;/servlet&amp;gt;&lt;br /&gt; &amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;   &amp;lt;servlet-name&amp;gt;timer&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;   &amp;lt;url-pattern&amp;gt;/timer&amp;lt;/url-pattern&amp;gt;&lt;br /&gt; &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then the servlet code which start the TimeManager and the two example batches. In this example the job is started again when it is finished after 30 seconds. If you want to do this at a specific time then use scheduleAtFixedRate &lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.wls.schedular;&lt;br /&gt;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;import java.io.PrintWriter;&lt;br /&gt;import javax.servlet.http.HttpServlet;&lt;br /&gt;import javax.servlet.http.HttpServletRequest;&lt;br /&gt;import javax.servlet.http.HttpServletResponse;&lt;br /&gt;import javax.servlet.ServletConfig;&lt;br /&gt;import javax.servlet.ServletException;&lt;br /&gt;import javax.naming.InitialContext;&lt;br /&gt;import javax.naming.NamingException;&lt;br /&gt;import commonj.timers.*;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* TimerServlet demonstrates a simple use of commonj timers&lt;br /&gt;*/&lt;br /&gt;public class TimerServlet extends HttpServlet {&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;   public void init(ServletConfig config) throws ServletException {&lt;br /&gt;&lt;br /&gt;       super.init(config);&lt;br /&gt;       System.out.println("timer servlet is initialized  ");&lt;br /&gt;       try {&lt;br /&gt;           InitialContext ic = new InitialContext();&lt;br /&gt;           TimerManager tm = (TimerManager)ic.lookup("java:comp/env/tm/TimerManager");&lt;br /&gt;&lt;br /&gt;           Timer batchRun1Timer = null;&lt;br /&gt;           Boolean batchRun1TimerIsRunning = false;&lt;br /&gt;           Timer batchRun2Timer = null;&lt;br /&gt;           Boolean batchRun2TimerIsRunning = false;&lt;br /&gt;&lt;br /&gt;           // Execute timer every 30 seconds starting immediately&lt;br /&gt;           batchRun1Timer = tm.schedule(new Batch1(), 0, 30 * 1000);&lt;br /&gt;           batchRun1TimerIsRunning = true;&lt;br /&gt;&lt;br /&gt;           batchRun2Timer = tm.schedule(new Batch2(), 0, 30 * 1000);&lt;br /&gt;           batchRun2TimerIsRunning = true;&lt;br /&gt;&lt;br /&gt;           config.getServletContext().setAttribute("batch1",batchRun1Timer);&lt;br /&gt;           config.getServletContext().setAttribute("batch2",batchRun2Timer);&lt;br /&gt;           config.getServletContext().setAttribute("batch1Running",batchRun1TimerIsRunning);&lt;br /&gt;           config.getServletContext().setAttribute("batch2Running",batchRun2TimerIsRunning);&lt;br /&gt;&lt;br /&gt;       } catch (NamingException ne) {&lt;br /&gt;           ne.printStackTrace();&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public void service(HttpServletRequest req,  HttpServletResponse res) throws IOException {&lt;br /&gt;      res.setContentType("text/html");&lt;br /&gt;       PrintWriter out = res.getWriter();&lt;br /&gt;       out.println("Timer servlet is working!");&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here is an example of a batch job. The timerExpired method is fired every time when the job time has passed. Here you can put in your own code and when the job is canceled then the TimerCancel method is fired.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.wls.schedular;&lt;br /&gt;&lt;br /&gt;import commonj.timers.*;&lt;br /&gt;import java.io.Serializable;&lt;br /&gt;&lt;br /&gt;public class Batch1 implements Serializable, TimerListener, CancelTimerListener {&lt;br /&gt;&lt;br /&gt;   public void timerExpired(Timer timer) {&lt;br /&gt;       System.out.println("Batch1 timer expired called on " + timer);&lt;br /&gt;   }&lt;br /&gt;   public  void timerCancel(Timer timer) {&lt;br /&gt;       System.out.println("Batch1 timer cancelled called on " + timer);&lt;br /&gt;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And finally the JSF page with its backing bean to control the jobs.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SrkwCFWtM4I/AAAAAAAAC5Y/dsV0EY1yZRc/s1600-h/schedular.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 84px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SrkwCFWtM4I/AAAAAAAAC5Y/dsV0EY1yZRc/s400/schedular.png" alt="" id="BLOGGER_PHOTO_ID_5384387641853424514" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;?xml version='1.0' encoding='windows-1252'?&amp;gt;&lt;br /&gt;&amp;lt;jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"&lt;br /&gt;         xmlns:f="http://java.sun.com/jsf/core"&lt;br /&gt;         xmlns:af="http://xmlns.oracle.com/adf/faces/rich"&amp;gt;&lt;br /&gt; &amp;lt;jsp:directive.page contentType="text/html;charset=windows-1252"/&amp;gt;&lt;br /&gt; &amp;lt;f:view&amp;gt;&lt;br /&gt;   &amp;lt;af:document id="d1"&amp;gt;&lt;br /&gt;     &amp;lt;af:form id="f1"&amp;gt;&lt;br /&gt;       &amp;lt;af:panelHeader text="Timers" id="ph1"&amp;gt;&lt;br /&gt;         &amp;lt;af:panelFormLayout id="pfl1"&amp;gt;&lt;br /&gt;           &amp;lt;af:panelGroupLayout id="pgl6" layout="horizontal"&amp;gt;&lt;br /&gt;             &amp;lt;af:panelGroupLayout id="pgl8" layout="vertical"&amp;gt;&lt;br /&gt;               &amp;lt;af:poll id="poll1"&amp;gt;&lt;br /&gt;                 &amp;lt;af:panelGroupLayout id="pgl5" layout="vertical"&amp;gt;&lt;br /&gt;                   &amp;lt;af:outputLabel value="#{TimerBean.tmStatus}" id="ol4"&lt;br /&gt;                                   partialTriggers="poll1"/&amp;gt;&lt;br /&gt;                   &amp;lt;af:outputLabel value="#{TimerBean.batch1Status}" id="o22"&lt;br /&gt;                                   partialTriggers="poll1"/&amp;gt;&lt;br /&gt;                   &amp;lt;af:outputLabel value="#{TimerBean.batch2Status}" id="o23"&lt;br /&gt;                                   partialTriggers="poll1"/&amp;gt;&lt;br /&gt;                 &amp;lt;/af:panelGroupLayout&amp;gt;&lt;br /&gt;               &amp;lt;/af:poll&amp;gt;&lt;br /&gt;             &amp;lt;/af:panelGroupLayout&amp;gt;&lt;br /&gt;             &amp;lt;af:panelGroupLayout id="pgl7" layout="vertical"&amp;gt;&lt;br /&gt;               &amp;lt;af:commandButton text="Time Manager On / Off" id="cb1"&lt;br /&gt;                                 actionListener="#{TimerBean.timerManager}"/&amp;gt;&lt;br /&gt;               &amp;lt;af:commandButton text="Batch 1 On / Off" id="cb2"&lt;br /&gt;                                 actionListener="#{TimerBean.Batch1}"/&amp;gt;&lt;br /&gt;               &amp;lt;af:commandButton text="Batch 2 On / Off" id="cb3"&lt;br /&gt;                                 actionListener="#{TimerBean.Batch2}"/&amp;gt;&lt;br /&gt;             &amp;lt;/af:panelGroupLayout&amp;gt;&lt;br /&gt;           &amp;lt;/af:panelGroupLayout&amp;gt;&lt;br /&gt;         &amp;lt;/af:panelFormLayout&amp;gt;&lt;br /&gt;       &amp;lt;/af:panelHeader&amp;gt;&lt;br /&gt;     &amp;lt;/af:form&amp;gt;&lt;br /&gt;   &amp;lt;/af:document&amp;gt;&lt;br /&gt; &amp;lt;/f:view&amp;gt;&lt;br /&gt;&amp;lt;/jsp:root&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.wls.backing;&lt;br /&gt;&lt;br /&gt;import commonj.timers.Timer;&lt;br /&gt;import commonj.timers.TimerManager;&lt;br /&gt;&lt;br /&gt;import javax.faces.event.ActionEvent;&lt;br /&gt;import javax.naming.InitialContext;&lt;br /&gt;import javax.naming.NamingException;&lt;br /&gt;&lt;br /&gt;import nl.whitehorses.wls.schedular.Batch1;&lt;br /&gt;import nl.whitehorses.wls.schedular.Batch2;&lt;br /&gt;&lt;br /&gt;import javax.faces.context.FacesContext; &lt;br /&gt;import javax.servlet.ServletContext;&lt;br /&gt;&lt;br /&gt;public class TimerBean {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   private InitialContext ic = null;&lt;br /&gt;   private TimerManager tm = null;&lt;br /&gt;&lt;br /&gt;   private Timer batchRun1Timer = null;&lt;br /&gt;   public Boolean batchRun1TimerIsRunning = false;&lt;br /&gt;   private Timer batchRun2Timer = null;&lt;br /&gt;   public Boolean batchRun2TimerIsRunning = false;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   public TimerBean() {&lt;br /&gt;       try {&lt;br /&gt;           ic = new InitialContext();&lt;br /&gt;           tm = (TimerManager)ic.lookup("java:comp/env/tm/TimerManager");&lt;br /&gt;&lt;br /&gt;          FacesContext ctx = FacesContext.getCurrentInstance();&lt;br /&gt;          ServletContext servletContext = (ServletContext) ctx.getExternalContext().getContext();&lt;br /&gt;        &lt;br /&gt;          batchRun1Timer = (Timer)servletContext.getAttribute("batch1");&lt;br /&gt;          batchRun2Timer = (Timer)servletContext.getAttribute("batch2");&lt;br /&gt;          batchRun1TimerIsRunning = (Boolean)servletContext.getAttribute("batch1Running");&lt;br /&gt;          batchRun2TimerIsRunning = (Boolean)servletContext.getAttribute("batch2Running");&lt;br /&gt;          System.out.println("init end");&lt;br /&gt;&lt;br /&gt;      } catch (NamingException e) {&lt;br /&gt;           e.printStackTrace();&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public void timerManager(ActionEvent actionEvent) {&lt;br /&gt;       // Add event code here...&lt;br /&gt;       if ( tm.isSuspended() ) {&lt;br /&gt;           tm.resume();       &lt;br /&gt;       } else {&lt;br /&gt;           tm.suspend();&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public void Batch1(ActionEvent actionEvent) {&lt;br /&gt;       // Add event code here...&lt;br /&gt;       if (  batchRun1TimerIsRunning ) {&lt;br /&gt;             batchRun1Timer.cancel();&lt;br /&gt;             batchRun1TimerIsRunning = false;&lt;br /&gt;       } else {&lt;br /&gt;              batchRun1Timer = tm.schedule(new Batch1(), 0, 10 * 1000);&lt;br /&gt;              batchRun1TimerIsRunning = true;&lt;br /&gt;       }&lt;br /&gt;      &lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public void Batch2(ActionEvent actionEvent) {&lt;br /&gt;       // Add event code here...&lt;br /&gt;       if (  batchRun2TimerIsRunning ) {&lt;br /&gt;             batchRun2Timer.cancel();&lt;br /&gt;             batchRun2TimerIsRunning = false;&lt;br /&gt;       } else {&lt;br /&gt;              batchRun2Timer = tm.schedule(new Batch2(), 0, 10 * 1000);&lt;br /&gt;              batchRun2TimerIsRunning = true;&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;  &lt;br /&gt;   public String getTmStatus () {&lt;br /&gt;       if ( tm.isSuspended() ) {&lt;br /&gt;          return "TimerManager is stopped";       &lt;br /&gt;       } else {&lt;br /&gt;          return "TimerManager is running";       &lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public String getBatch1Status () {&lt;br /&gt;      Long time = batchRun1Timer.getScheduledExecutionTime();&lt;br /&gt;      java.util.Date date = new  java.util.Date(time);&lt;br /&gt;      if ( batchRun1TimerIsRunning ) {&lt;br /&gt;        return "Batch1 scheduled time "+date.toString();&lt;br /&gt;      } {&lt;br /&gt;        return "Batch1 stopped";&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;  &lt;br /&gt;   public String getBatch2Status () {&lt;br /&gt;      Long time = batchRun2Timer.getScheduledExecutionTime();&lt;br /&gt;      java.util.Date date = new  java.util.Date(time);&lt;br /&gt;       if ( batchRun2TimerIsRunning ) {&lt;br /&gt;         return "Batch2 scheduled time "+date.toString();&lt;br /&gt;       } {&lt;br /&gt;         return "Batch2 stopped";&lt;br /&gt;       }   &lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   public Timer getBatchRun1Timer(){&lt;br /&gt;     return batchRun1Timer;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public void setBatchRun1Timer(Timer batchRun1Timer ){&lt;br /&gt;     this.batchRun1Timer = batchRun1Timer;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public Timer getBatchRun2Timer(){&lt;br /&gt;     return batchRun2Timer;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public void setBatchRun2timer(Timer batchRun2Timer ){&lt;br /&gt;     this.batchRun2Timer = batchRun2Timer;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Here is the &lt;a href="http://www.sbsframes.nl/jdeveloper/WlsSchedular.zip"&gt;example workspace&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-1004848973245745232?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/1004848973245745232/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=1004848973245745232" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/1004848973245745232?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/1004848973245745232?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/Sf_eKECx000/job-scheduling-in-weblogic.html" title="Job scheduling in Weblogic" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_earSixbe3dw/SrkwCFWtM4I/AAAAAAAAC5Y/dsV0EY1yZRc/s72-c/schedular.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/09/job-scheduling-in-weblogic.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YGSHczeip7ImA9WxNQEU4.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-7853226339776540080</id><published>2009-09-16T23:12:00.011+02:00</published><updated>2009-09-17T00:12:09.982+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-17T00:12:09.982+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="jdeveloper 11g" /><title>WSM in Fusion Middleware 11G</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/aio2hyzB7YZL0y6b30PDBGGwIdU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aio2hyzB7YZL0y6b30PDBGGwIdU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/aio2hyzB7YZL0y6b30PDBGGwIdU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aio2hyzB7YZL0y6b30PDBGGwIdU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Probably you already knew the Web Service Manager of Soa Suite 10.1.3, The 10.1.3 version was mainly used in combination with Soa Suite because this was the only way to secure the BPEL and ESB Services. In FMW 11g Oracle changed WSM so it is fully integrated in all the Fusion Middleware components. Now you can use WSM in ADF, in the Services and References of Soa Suite and in the jax-ws services or proxy clients.&lt;br /&gt;In FMW 11G you can also define your own ws-security policies ( just use a wizard in the EM website) or use the standard policies, So it can always comply to your security requirements.&lt;br /&gt;&lt;br /&gt;In this blog entry I will show you how to setup FMW on Weblogic and define security on a BPEL service, call this service with an ADF Web Service Datacontol and a java web service proxy client.&lt;br /&gt;&lt;br /&gt;Special thanks to Vishal Jain of Oracle who helped to solve the issues and explained how WSM works with keystores.&lt;br /&gt;&lt;br /&gt;First we need to generate a keystore with a self signed certificate. Somehow certificates with generated with OpenSSL fails in FMW.&lt;br /&gt;keytool -genkey -keyalg RSA -keystore C:\test_keystore.jks -storepass password -alias client_key -keypass password -dname "CN=Client, OU=WEB AGE, C=US" -keysize 1024 -validity 1460&lt;br /&gt;&lt;br /&gt;Now here comes the trick , copy this keystore to fmwconfig folder ( domain_name/config ) of the soa suite domain&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SrFVNXaPl4I/AAAAAAAAC4g/Z81xSRjbYpg/s1600-h/wsm_7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 210px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SrFVNXaPl4I/AAAAAAAAC4g/Z81xSRjbYpg/s400/wsm_7.png" alt="" id="BLOGGER_PHOTO_ID_5382176717795202946" border="0" /&gt;&lt;/a&gt;Go the Enterprise Manager Website where we can configure the just created keystore. We have to select the weblogic domain and go to the security menu / credentials.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SrFVXN9P8EI/AAAAAAAAC5Q/RVt17NziN2Y/s1600-h/wsm_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 284px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SrFVXN9P8EI/AAAAAAAAC5Q/RVt17NziN2Y/s400/wsm_1.png" alt="" id="BLOGGER_PHOTO_ID_5382176887056363586" border="0" /&gt;&lt;/a&gt;Here we can change maps or passwords which will be stored in the cwallet.sso file. If you see the oracle.wsm.security map then you can delete this map. This map contains the keystore password.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SrFVW3T8BkI/AAAAAAAAC5I/6hv3dU0yevE/s1600-h/wsm_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 181px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SrFVW3T8BkI/AAAAAAAAC5I/6hv3dU0yevE/s400/wsm_2.png" alt="" id="BLOGGER_PHOTO_ID_5382176880977512002" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Go the Security Provider Configuration menu item in the security menu where we will add the keystore to FMW&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SrFVWje5lNI/AAAAAAAAC5A/tW-2pgbGaws/s1600-h/wsm_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 266px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SrFVWje5lNI/AAAAAAAAC5A/tW-2pgbGaws/s400/wsm_3.png" alt="" id="BLOGGER_PHOTO_ID_5382176875654780114" border="0" /&gt;&lt;/a&gt;Press the Configure button in the keystore part of the screen.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SrFVOrSNrVI/AAAAAAAAC44/GcHfYoVa2-s/s1600-h/wsm_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 304px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SrFVOrSNrVI/AAAAAAAAC44/GcHfYoVa2-s/s400/wsm_4.png" alt="" id="BLOGGER_PHOTO_ID_5382176740310101330" border="0" /&gt;&lt;/a&gt;Here we can add the keystore details.  Use ./ as keystore path. This will fill the oracle.wsm.security map in the credentials menu.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SrFVOA69DJI/AAAAAAAAC4w/U4DvWF-3gQQ/s1600-h/wsm_5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 144px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SrFVOA69DJI/AAAAAAAAC4w/U4DvWF-3gQQ/s400/wsm_5.png" alt="" id="BLOGGER_PHOTO_ID_5382176728938253458" border="0" /&gt;&lt;/a&gt;Go back to the Credentials where we will add an extra entry in the wsm map. Create a new key basic.credentials with as username weblogic and with password weblogic1&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SrFVN4li18I/AAAAAAAAC4o/0QpbPsKoAaY/s1600-h/wsm_6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 330px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SrFVN4li18I/AAAAAAAAC4o/0QpbPsKoAaY/s400/wsm_6.png" alt="" id="BLOGGER_PHOTO_ID_5382176726700971970" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Restart the Weblogic server.&lt;br /&gt;&lt;br /&gt;Next part is to add a wsm policy to a BPEL Service.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SrFVNJF1szI/AAAAAAAAC4Y/p4EpjrMIiL0/s1600-h/wsm_8.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 288px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SrFVNJF1szI/AAAAAAAAC4Y/p4EpjrMIiL0/s400/wsm_8.png" alt="" id="BLOGGER_PHOTO_ID_5382176713951523634" border="0" /&gt;&lt;/a&gt;Select the server policy you like to use and deploy this to the soa suite server.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SrFVBMGLypI/AAAAAAAAC4Q/-h2L8SnWYIM/s1600-h/wsm_9.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 356px; height: 400px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SrFVBMGLypI/AAAAAAAAC4Q/-h2L8SnWYIM/s400/wsm_9.png" alt="" id="BLOGGER_PHOTO_ID_5382176508599847570" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now we can make a jax-ws proxy client  so we can test the policy. In this client we will use the matching client policy. If this fails check your libraries.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.wsclient;&lt;br /&gt;&lt;br /&gt;import java.util.Map;&lt;br /&gt;&lt;br /&gt;import javax.xml.ws.BindingProvider;&lt;br /&gt;import javax.xml.ws.WebServiceRef;&lt;br /&gt;&lt;br /&gt;import oracle.webservices.ClientConstants;&lt;br /&gt;&lt;br /&gt;import weblogic.wsee.jws.jaxws.owsm.SecurityPolicyFeature;&lt;br /&gt;&lt;br /&gt;public class BPELProcess1_ptClient&lt;br /&gt;{&lt;br /&gt; @WebServiceRef&lt;br /&gt; private static Bpelprocess1_client_ep bpelprocess1_client_ep;&lt;br /&gt;&lt;br /&gt; public static void main(String [] args)&lt;br /&gt; {&lt;br /&gt;   bpelprocess1_client_ep = new Bpelprocess1_client_ep();&lt;br /&gt;  &lt;br /&gt;     SecurityPolicyFeature[] securityFeature = new SecurityPolicyFeature[] {&lt;br /&gt;                      new SecurityPolicyFeature("oracle/wss10_message_protection_client_policy") };&lt;br /&gt;&lt;br /&gt;     BPELProcess1 port = bpelprocess1_client_ep.getBPELProcess1_pt(securityFeature);&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;     Map&lt;string, object=""&gt; reqContext = ((BindingProvider) port).getRequestContext();&lt;br /&gt;     reqContext.put(ClientConstants.WSSEC_KEYSTORE_TYPE, "JKS");&lt;br /&gt;     reqContext.put(ClientConstants.WSSEC_KEYSTORE_LOCATION, "C:\\test_keystore.jks");&lt;br /&gt;     reqContext.put(ClientConstants.WSSEC_KEYSTORE_PASSWORD, "password");&lt;br /&gt;     reqContext.put(ClientConstants.WSSEC_SIG_KEY_ALIAS, "client_key");&lt;br /&gt;     reqContext.put(ClientConstants.WSSEC_SIG_KEY_PASSWORD, "password");&lt;br /&gt;     reqContext.put(ClientConstants.WSSEC_ENC_KEY_ALIAS, "client_key");&lt;br /&gt;     reqContext.put(ClientConstants.WSSEC_ENC_KEY_PASSWORD, "password");&lt;br /&gt;     reqContext.put(ClientConstants.WSSEC_RECIPIENT_KEY_ALIAS, "client_key");&lt;br /&gt;     System.out.println("output = " + port.process("aaaa"));&lt;br /&gt; &lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/string,&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If all went well then we can do same with a ADF Web Service Datacontrol.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SrFVAhoyFnI/AAAAAAAAC4I/9eg-FJQk2-M/s1600-h/wsm_10.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 295px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SrFVAhoyFnI/AAAAAAAAC4I/9eg-FJQk2-M/s400/wsm_10.png" alt="" id="BLOGGER_PHOTO_ID_5382176497202239090" border="0" /&gt;&lt;/a&gt;To add the client policy select the DataControls.dcx and go to the structure window.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SrFVAR-BhGI/AAAAAAAAC4A/ff-CnSnZu8I/s1600-h/wsm_11.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 325px; height: 400px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SrFVAR-BhGI/AAAAAAAAC4A/ff-CnSnZu8I/s400/wsm_11.png" alt="" id="BLOGGER_PHOTO_ID_5382176492996363362" border="0" /&gt;&lt;/a&gt;Here we can define web service security&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SrFVAKsApDI/AAAAAAAAC34/1ONS8aTCBxE/s1600-h/wsm_12.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 368px; height: 400px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SrFVAKsApDI/AAAAAAAAC34/1ONS8aTCBxE/s400/wsm_12.png" alt="" id="BLOGGER_PHOTO_ID_5382176491041760306" border="0" /&gt;&lt;/a&gt;Select the right client policy and in this case we need to override properties, press the button and fill in the recipient with your key alias. Else you will get a orakey error.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SrFU_l-t_ZI/AAAAAAAAC3w/e7bHGLt9Ilk/s1600-h/wsm_13.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 328px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SrFU_l-t_ZI/AAAAAAAAC3w/e7bHGLt9Ilk/s400/wsm_13.png" alt="" id="BLOGGER_PHOTO_ID_5382176481188117906" border="0" /&gt;&lt;/a&gt;And at last deploy this webapplication with a ear profile to the Soa Suite server and test your webapp.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-7853226339776540080?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/7853226339776540080/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=7853226339776540080" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/7853226339776540080?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/7853226339776540080?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/LMyiPW1YK94/wsm-in-fusion-middleware-11g.html" title="WSM in Fusion Middleware 11G" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_earSixbe3dw/SrFVNXaPl4I/AAAAAAAAC4g/Z81xSRjbYpg/s72-c/wsm_7.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/09/wsm-in-fusion-middleware-11g.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkIMQn4-eip7ImA9WxNRGEU.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-1488972572260677282</id><published>2009-09-14T00:42:00.008+02:00</published><updated>2009-09-14T01:29:43.052+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-14T01:29:43.052+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>SSO with WebLogic 10.3.1 and SAML2</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/hXOsQP7KQfN-xaguAiC7nOdpKW4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hXOsQP7KQfN-xaguAiC7nOdpKW4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/hXOsQP7KQfN-xaguAiC7nOdpKW4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hXOsQP7KQfN-xaguAiC7nOdpKW4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;In a &lt;a href="http://biemond.blogspot.com/2009/05/sso-with-weblogic-103-and-saml.html"&gt;previous blog entry&lt;/a&gt; I already explained how to setup Single Sign On (SSO) with SAML1.1. In this blogpost I do the same but then with SAML version 2 or SAML2 in Weblogic 10.3.1 server.&lt;br /&gt;First we start with the SAML2 Identity Provider,  in SAML1.1 this is called the source site. Because we can't do anything in the federation tab of the serve, we need to create a Credential Mapping Provider ( go to myrealm security,   Providers , Credential Mappings. )&lt;br /&gt;and choose the SAML2 credential mapping.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/Sq13HjaoiyI/AAAAAAAAC3o/Er3IIYsytRU/s1600-h/saml2_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 180px;" src="http://2.bp.blogspot.com/_earSixbe3dw/Sq13HjaoiyI/AAAAAAAAC3o/Er3IIYsytRU/s400/saml2_1.png" alt="" id="BLOGGER_PHOTO_ID_5381088101427350306" border="0" /&gt;&lt;/a&gt;Fill the provider specific details and use the demoidentity keystore ( this is default)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/Sq13Ha9cFbI/AAAAAAAAC3g/2hzrmu5ux-o/s1600-h/saml2_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 313px;" src="http://1.bp.blogspot.com/_earSixbe3dw/Sq13Ha9cFbI/AAAAAAAAC3g/2hzrmu5ux-o/s400/saml2_2.png" alt="" id="BLOGGER_PHOTO_ID_5381088099157415346" border="0" /&gt;&lt;/a&gt;Now we can go the Federation Services tab of the server configuration and create a SAML2 profile for this server, We need to save this to a file and import this later in the other SAML2 Service Providers.&lt;br /&gt;The published site url is very important , choose url of this server , use http or https and add saml2 to this url. SAML needs this url to communicate with the other SAML services.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/Sq1295VxPdI/AAAAAAAAC3Y/i0ar3apfuuc/s1600-h/saml2_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 399px;" src="http://4.bp.blogspot.com/_earSixbe3dw/Sq1295VxPdI/AAAAAAAAC3Y/i0ar3apfuuc/s400/saml2_3.png" alt="" id="BLOGGER_PHOTO_ID_5381087935513837010" border="0" /&gt;&lt;/a&gt;Second part of the SAML2 profile&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/Sq129e65YyI/AAAAAAAAC3Q/RvNf1wsahF8/s1600-h/saml2_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 270px;" src="http://2.bp.blogspot.com/_earSixbe3dw/Sq129e65YyI/AAAAAAAAC3Q/RvNf1wsahF8/s400/saml2_4.png" alt="" id="BLOGGER_PHOTO_ID_5381087928421802786" border="0" /&gt;&lt;/a&gt;Save this profile to a xml&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/Sq129JARWqI/AAAAAAAAC3I/CGZ2GoApIyU/s1600-h/saml2_5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 307px;" src="http://1.bp.blogspot.com/_earSixbe3dw/Sq129JARWqI/AAAAAAAAC3I/CGZ2GoApIyU/s400/saml2_5.png" alt="" id="BLOGGER_PHOTO_ID_5381087922538764962" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Go the Identity provider tab and fill in these fields&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/Sq128zyLoVI/AAAAAAAAC3A/2nLbNLpiLMM/s1600-h/saml2_6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 290px;" src="http://2.bp.blogspot.com/_earSixbe3dw/Sq128zyLoVI/AAAAAAAAC3A/2nLbNLpiLMM/s400/saml2_6.png" alt="" id="BLOGGER_PHOTO_ID_5381087916842525010" border="0" /&gt;&lt;/a&gt;Go to the second Weblogic server, this is called the Service provider or in SAML1.1 the destination. Here we need to create a new SAML2 Authentication provider ( Go to the myrealm Security realm , Providers and then Authentication )  &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/Sq128ocCplI/AAAAAAAAC24/vXO7j8M5tJY/s1600-h/saml2_7_wls2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 206px;" src="http://4.bp.blogspot.com/_earSixbe3dw/Sq128ocCplI/AAAAAAAAC24/vXO7j8M5tJY/s400/saml2_7_wls2.png" alt="" id="BLOGGER_PHOTO_ID_5381087913796871762" border="0" /&gt;&lt;/a&gt;Now we done this we can go the Federation Services Tab of this weblogic server and fill in this SAML2 profile. The published url is very important and it must match with the server url and have to end with saml2&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/Sq12ti_GSbI/AAAAAAAAC2w/E3mu6Ny71EA/s1600-h/saml2_8_wls2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 390px; height: 400px;" src="http://4.bp.blogspot.com/_earSixbe3dw/Sq12ti_GSbI/AAAAAAAAC2w/E3mu6Ny71EA/s400/saml2_8_wls2.png" alt="" id="BLOGGER_PHOTO_ID_5381087654635260338" border="0" /&gt;&lt;/a&gt;Second part of this SAML profile&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/Sq12tTlYLrI/AAAAAAAAC2o/du4_V2zBGTM/s1600-h/saml2_9_wls2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 276px;" src="http://1.bp.blogspot.com/_earSixbe3dw/Sq12tTlYLrI/AAAAAAAAC2o/du4_V2zBGTM/s400/saml2_9_wls2.png" alt="" id="BLOGGER_PHOTO_ID_5381087650500849330" border="0" /&gt;&lt;/a&gt;Save this metadata to a xml. This needs to be imported in the Credential Mapping Provider of the Identity Provider ( the first weblogic server).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/Sq12tABkr_I/AAAAAAAAC2g/6RI2YIDgGLk/s1600-h/saml2_10_wls2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 313px;" src="http://4.bp.blogspot.com/_earSixbe3dw/Sq12tABkr_I/AAAAAAAAC2g/6RI2YIDgGLk/s400/saml2_10_wls2.png" alt="" id="BLOGGER_PHOTO_ID_5381087645250400242" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Next step is to go the SAML2 Service Provider tab.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/Sq12spFHc8I/AAAAAAAAC2Y/HcJpRnJz09I/s1600-h/saml2_11_wls2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 345px;" src="http://1.bp.blogspot.com/_earSixbe3dw/Sq12spFHc8I/AAAAAAAAC2Y/HcJpRnJz09I/s400/saml2_11_wls2.png" alt="" id="BLOGGER_PHOTO_ID_5381087639091246018" border="0" /&gt;&lt;/a&gt;Go back to the SAML2 authentication provider where we will import the identity provider metadata xml.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/Sq12scUAzAI/AAAAAAAAC2Q/ChpgrOhnCbk/s1600-h/saml2_12_wls2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 264px;" src="http://1.bp.blogspot.com/_earSixbe3dw/Sq12scUAzAI/AAAAAAAAC2Q/ChpgrOhnCbk/s400/saml2_12_wls2.png" alt="" id="BLOGGER_PHOTO_ID_5381087635664063490" border="0" /&gt;&lt;/a&gt;Select the identity metadata xml.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/Sq12c-lZl0I/AAAAAAAAC2I/fq44lDpyykg/s1600-h/saml2_13_wls2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 322px;" src="http://4.bp.blogspot.com/_earSixbe3dw/Sq12c-lZl0I/AAAAAAAAC2I/fq44lDpyykg/s400/saml2_13_wls2.png" alt="" id="BLOGGER_PHOTO_ID_5381087369985890114" border="0" /&gt;&lt;/a&gt;You have to enable this and most important, fill in all the url's of your applications who needs SAML authentication.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/Sq12cYLqdlI/AAAAAAAAC2A/PznYfEvcmA8/s1600-h/saml2_14_wls2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 348px;" src="http://3.bp.blogspot.com/_earSixbe3dw/Sq12cYLqdlI/AAAAAAAAC2A/PznYfEvcmA8/s400/saml2_14_wls2.png" alt="" id="BLOGGER_PHOTO_ID_5381087359677396562" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now we do the same for metadata xml of the service provider, We need to import this in the Credential Mapper provider of the Identity Provider&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/Sq12cEpagiI/AAAAAAAAC14/04dBfPsd2o8/s1600-h/saml2_15.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 247px;" src="http://2.bp.blogspot.com/_earSixbe3dw/Sq12cEpagiI/AAAAAAAAC14/04dBfPsd2o8/s400/saml2_15.png" alt="" id="BLOGGER_PHOTO_ID_5381087354433471010" border="0" /&gt;&lt;/a&gt;Select the Service Provider metadata xml&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/Sq12blt84oI/AAAAAAAAC1w/_1F_1-Ytuqo/s1600-h/saml2_16.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 306px;" src="http://2.bp.blogspot.com/_earSixbe3dw/Sq12blt84oI/AAAAAAAAC1w/_1F_1-Ytuqo/s400/saml2_16.png" alt="" id="BLOGGER_PHOTO_ID_5381087346131001986" border="0" /&gt;&lt;/a&gt;enable this Service Provider.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/Sq12bR2lL9I/AAAAAAAAC1o/YeWB99sflCE/s1600-h/saml2_17.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 358px;" src="http://2.bp.blogspot.com/_earSixbe3dw/Sq12bR2lL9I/AAAAAAAAC1o/YeWB99sflCE/s400/saml2_17.png" alt="" id="BLOGGER_PHOTO_ID_5381087340798488530" border="0" /&gt;&lt;/a&gt;That's all&lt;br /&gt;&lt;br /&gt;In this example I use http but it shoud also work with https  and when it fails, please check your url's , don't mix localhost or pc name. Same for the domain name.&lt;br /&gt;&lt;br /&gt;For more debug information in your server.log and set these java parameters in your setDomainEnv&lt;br /&gt;set EXTRA_JAVA_PROPERTIES=-Dweblogic.debug.DebugSecuritySAMLAtn=true -Dweblogic.debug.DebugSecuritySAMLLib=true -Dweblogic.debug.DebugSecuritySAML2Service=true -Dweblogic.debug.DebugSecuritySAML2CredMap=true -Dweblogic.debug.DebugSecuritySAML2Atn=true %EXTRA_JAVA_PROPERTIES%&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-1488972572260677282?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/1488972572260677282/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=1488972572260677282" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/1488972572260677282?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/1488972572260677282?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/2PWqjTjLgM4/sso-with-weblogic-1031-and-saml2.html" title="SSO with WebLogic 10.3.1 and SAML2" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_earSixbe3dw/Sq13HjaoiyI/AAAAAAAAC3o/Er3IIYsytRU/s72-c/saml2_1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/09/sso-with-weblogic-1031-and-saml2.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C04GQXw5cCp7ImA9WxNSEk4.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-6806855448234439221</id><published>2009-08-25T21:51:00.005+02:00</published><updated>2009-08-25T22:25:20.228+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-25T22:25:20.228+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g soa suite" /><title>Starting  SOA Suite Testcases from java</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/HI-A3NVyxDs_uQKI4Ol125MsGMk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HI-A3NVyxDs_uQKI4Ol125MsGMk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/HI-A3NVyxDs_uQKI4Ol125MsGMk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HI-A3NVyxDs_uQKI4Ol125MsGMk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;In a&lt;a href="http://biemond.blogspot.com/2009/07/unit-test-your-composite-application.html"&gt; previous blog&lt;/a&gt; I already explained how to unit test a Soa Suite 11g composite application. In that blog entry I create a Test Suite with a testcase but I had to start this testcase and watch the results of the test in the Enterprise Manager Website. In this blog I will start the TestSuite with the Testcases from the Soa Suite java API. This can be handy when you have a continious build system like Hudson or Apache Continuum. Now you can build your test in JDeveloper and run the test in the Continious Build System.&lt;br /&gt;In this test I made a simple Test Suite with two testcases and deployed this to the Soa Suite Server.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SpRDLIp8M4I/AAAAAAAAC1Y/pKI2vsR9SwA/s1600-h/api_2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 147px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SpRDLIp8M4I/AAAAAAAAC1Y/pKI2vsR9SwA/s320/api_2.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5373994113940861826" /&gt;&lt;/a&gt;Create a test project with the following libraries&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SpRDLUl8rEI/AAAAAAAAC1g/Q2sDPQGUPcc/s1600-h/api_1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 213px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SpRDLUl8rEI/AAAAAAAAC1g/Q2sDPQGUPcc/s320/api_1.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5373994117145340994" /&gt;&lt;/a&gt;And create a java class like this example class.&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.bpel.unit;&lt;br /&gt;&lt;br /&gt;import java.util.Hashtable;&lt;br /&gt;import java.util.List;&lt;br /&gt;&lt;br /&gt;import javax.naming.Context;&lt;br /&gt;&lt;br /&gt;import oracle.soa.management.facade.Locator;&lt;br /&gt;import oracle.soa.management.facade.LocatorFactory;&lt;br /&gt;&lt;br /&gt;import oracle.soa.management.util.TestSuiteFilter;&lt;br /&gt;import oracle.soa.management.util.TestRunOptions;&lt;br /&gt;&lt;br /&gt;import oracle.soa.management.facade.tst.TestSuite;&lt;br /&gt;import oracle.soa.management.facade.tst.TestCase;&lt;br /&gt;import oracle.soa.management.facade.tst.TestRunResults;&lt;br /&gt;import oracle.soa.management.facade.tst.TestSuiteResult;&lt;br /&gt;import oracle.soa.management.facade.tst.TestCaseResult;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class StartUnitProcess {&lt;br /&gt; public StartUnitProcess() {&lt;br /&gt;     super();&lt;br /&gt;&lt;br /&gt;     Hashtable jndiProps = new Hashtable();&lt;br /&gt;     jndiProps.put(Context.PROVIDER_URL, "t3://localhost:8001/soa-infra");&lt;br /&gt;     jndiProps.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");&lt;br /&gt;     jndiProps.put(Context.SECURITY_PRINCIPAL, "weblogic");&lt;br /&gt;     jndiProps.put(Context.SECURITY_CREDENTIALS, "weblogic1");&lt;br /&gt;     jndiProps.put("dedicated.connection", "true");&lt;br /&gt;&lt;br /&gt;     Locator locator = null;&lt;br /&gt;     try {&lt;br /&gt;         // connect to the soa server&lt;br /&gt;         locator = LocatorFactory.createLocator(jndiProps);&lt;br /&gt;&lt;br /&gt;         TestSuiteFilter testFilter = new TestSuiteFilter();&lt;br /&gt;         testFilter.addSuiteName("HelloTest");&lt;br /&gt;         String compositeDN = "default/Helloworld!1.0";&lt;br /&gt;         List&lt;testsuite&gt; testSuites = locator.getTestSuites(compositeDN,testFilter);&lt;br /&gt;      &lt;br /&gt;         for (TestSuite testSuite : testSuites) {&lt;br /&gt;             System.out.println("Found TestSuite name: "+testSuite.getName()+" description: "+testSuite.getDescription());&lt;br /&gt;          &lt;br /&gt;             List&lt;testcase&gt; testcases = testSuite.getTestCases();&lt;br /&gt;             System.out.println("Total TestCases: " +testcases.size());&lt;br /&gt;         &lt;br /&gt;             for (TestCase testCase : testcases) {&lt;br /&gt;                 System.out.println("Contains TestCase: " +testCase.getName());&lt;br /&gt;             }&lt;br /&gt;          &lt;br /&gt;             TestRunOptions testRunOptions = new TestRunOptions();&lt;br /&gt;             testRunOptions.setTestRunId("123");&lt;br /&gt;             testRunOptions.setTestRunName("name123");&lt;br /&gt;          &lt;br /&gt;             TestRunResults result =  locator.executeTestCases(compositeDN,testRunOptions,testcases);&lt;br /&gt;             System.out.println("total errors: "+ result.getNumErrors() +&lt;br /&gt;                                " status: "+ result.getStatus());&lt;br /&gt;&lt;br /&gt;             List&lt;testsuiteresult&gt; testSuiteResults = result.getTestSuiteResults() ;&lt;br /&gt;             for (TestSuiteResult testSuiteResult : testSuiteResults) {&lt;br /&gt;                 System.out.println("TestSuite name: "+testSuiteResult.getSuiteName()+&lt;br /&gt;                                    " success: "+testSuiteResult.getNumSuccesses()  +&lt;br /&gt;                                    " errors: "+ testSuiteResult.getNumErrors() );&lt;br /&gt;                 List&lt;testcaseresult&gt; testCaseResults = testSuiteResult.getTestResults() ;&lt;br /&gt;                 for (TestCaseResult testCaseResult : testCaseResults) {&lt;br /&gt;                     System.out.println("TestCase name: "+testCaseResult.getTestName()+&lt;br /&gt;                                        " status: "+testCaseResult.getStatus()   );&lt;br /&gt;                 }                 &lt;br /&gt;             }             &lt;br /&gt;         }&lt;br /&gt;     } catch (Exception e) {&lt;br /&gt;         e.printStackTrace();&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;     StartUnitProcess startUnitProcess = new StartUnitProcess();&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/testcaseresult&gt;&lt;/testsuiteresult&gt;&lt;/testcase&gt;&lt;/testsuite&gt;&lt;/pre&gt;&lt;br /&gt;Here is an example of the result of invoking the TestSuite in java&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SpRDK4ukE1I/AAAAAAAAC1Q/fi9dddqdEAo/s1600-h/api_3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 139px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SpRDK4ukE1I/AAAAAAAAC1Q/fi9dddqdEAo/s320/api_3.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5373994109665284946" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-6806855448234439221?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/6806855448234439221/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=6806855448234439221" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6806855448234439221?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6806855448234439221?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/MOj0gTlv5jQ/starting-soa-suite-testcases-from-java.html" title="Starting  SOA Suite Testcases from java" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_earSixbe3dw/SpRDLIp8M4I/AAAAAAAAC1Y/pKI2vsR9SwA/s72-c/api_2.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/08/starting-soa-suite-testcases-from-java.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MFQno8eip7ImA9WxNTFUk.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-7767710180420421995</id><published>2009-08-17T23:08:00.023+02:00</published><updated>2009-08-17T23:43:33.472+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-17T23:43:33.472+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="android" /><title>HTC Hero ( Android ) Thetering</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/O4-Hx1RK73U_Qub6q9wpknWhqXA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/O4-Hx1RK73U_Qub6q9wpknWhqXA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/O4-Hx1RK73U_Qub6q9wpknWhqXA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/O4-Hx1RK73U_Qub6q9wpknWhqXA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;This blog is about how to setup your PC and HTC Hero android phone, so you can use your phone as a proxy server. This is called Thetering.&lt;br /&gt;&lt;br /&gt;First we need to download the latest HTC Sync Software. Use &lt;a href="http://www.htc.com/www/SupportViewNews.aspx?dl_id=631&amp;amp;news_id=222"&gt;this url&lt;/a&gt;.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SonIScjsDvI/AAAAAAAAC0U/CHSEkrXPC6A/s1600-h/and_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 290px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SonIScjsDvI/AAAAAAAAC0U/CHSEkrXPC6A/s320/and_1.png" alt="" id="BLOGGER_PHOTO_ID_5371044249845108466" border="0" /&gt;&lt;/a&gt;Now we can open the HTC Sync on your PC. You will see that the buttons are not enabled even when you connect your phone with an USB cable.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SonIR7CCddI/AAAAAAAAC0M/WIl7JzrrJiY/s1600-h/and_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 230px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SonIR7CCddI/AAAAAAAAC0M/WIl7JzrrJiY/s320/and_2.png" alt="" id="BLOGGER_PHOTO_ID_5371044240845600210" border="0" /&gt;&lt;/a&gt;Connect your the USB cable so the HTC Hero and your PC are connected.&lt;br /&gt;&lt;br /&gt;Open the status bar of your phone  and press HTC Sync and watch how the buttons are accessible in your HTC Sync PC application.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SonIRYfnJ1I/AAAAAAAAC0E/WNGvXfcUL0c/s1600-h/and_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 230px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SonIRYfnJ1I/AAAAAAAAC0E/WNGvXfcUL0c/s320/and_4.png" alt="" id="BLOGGER_PHOTO_ID_5371044231574398802" border="0" /&gt;&lt;/a&gt;When you take a look at your hardware then you will see an Android USB Device.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SonIQxukS-I/AAAAAAAACz8/YaUGQ0T_oqo/s1600-h/and_5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 172px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SonIQxukS-I/AAAAAAAACz8/YaUGQ0T_oqo/s320/and_5.png" alt="" id="BLOGGER_PHOTO_ID_5371044221168143330" border="0" /&gt;&lt;/a&gt;Download Proxoid for free from the Market ( on your HTC Hero ) and install this app on your phone.&lt;br /&gt;&lt;br /&gt;Download the android utilities for your PC :&lt;br /&gt;for 32 bits : &lt;a href="http://www.baroukh.com/proxoid/proxoid-adb.zip"&gt;http://www.baroukh.com/proxoid/proxoid-adb.zip&lt;/a&gt;&lt;br /&gt;for 64 bits : &lt;a href="http://www.baroukh.com/proxoid/proxoid-adb64.zip"&gt;http://www.baroukh.com/proxoid/proxoid-adb64.zip&lt;/a&gt;&lt;br /&gt;and save it on your disk and unpack this in a folder.&lt;br /&gt;&lt;br /&gt;Go to this folder&lt;br /&gt;&lt;br /&gt;open check.bat or   adb.exe devices to see the connected devices&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SonLVKHBuLI/AAAAAAAAC0s/wj4w1Bw-RK4/s1600-h/and_8.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 119px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SonLVKHBuLI/AAAAAAAAC0s/wj4w1Bw-RK4/s320/and_8.png" alt="" id="BLOGGER_PHOTO_ID_5371047594967546034" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;open start-tunnel.bat or adb.exe forward tcp:8080 tcp:8080&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SonLUUs5RXI/AAAAAAAAC0k/BHQC8E3CJmg/s1600-h/and_9.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 53px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SonLUUs5RXI/AAAAAAAAC0k/BHQC8E3CJmg/s320/and_9.png" alt="" id="BLOGGER_PHOTO_ID_5371047580630861170" border="0" /&gt;&lt;/a&gt;open Proxoid on your phone and start Proxoid.&lt;br /&gt;&lt;br /&gt;and set the proxy server in your favorite browser&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SonLUJzlQdI/AAAAAAAAC0c/dxtf4UF14oM/s1600-h/and_10.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 300px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SonLUJzlQdI/AAAAAAAAC0c/dxtf4UF14oM/s320/and_10.png" alt="" id="BLOGGER_PHOTO_ID_5371047577706119634" border="0" /&gt;&lt;/a&gt;that's all, happy browsing&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-7767710180420421995?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/7767710180420421995/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=7767710180420421995" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/7767710180420421995?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/7767710180420421995?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/zOG8WkWVJ50/htc-hero-android-thetering.html" title="HTC Hero ( Android ) Thetering" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_earSixbe3dw/SonIScjsDvI/AAAAAAAAC0U/CHSEkrXPC6A/s72-c/and_1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/08/htc-hero-android-thetering.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcARnw7fyp7ImA9WxNTEUU.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-5050956574950999718</id><published>2009-08-13T17:56:00.009+02:00</published><updated>2009-08-13T19:04:07.207+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-13T19:04:07.207+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 bc (bc4j)" /><title>CRUD operations with a Bind Entity  variable in BPEL</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/al3vzHGfhwkxhPngxuzUbjwdLck/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/al3vzHGfhwkxhPngxuzUbjwdLck/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/al3vzHGfhwkxhPngxuzUbjwdLck/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/al3vzHGfhwkxhPngxuzUbjwdLck/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;With Soa Suite 11G ( FMW 11G R1)  you can now use the Bind Entity activity in a BPEL process, which can do your CRUD operations for you. This Bind Entity is connected to a web service reference, this WS has to have SDO types just like an ADF BC SDO service interface.  Now you can use an normal Assign activity to retrieve or update data from the Entity variable instead of an invoking a lot of Partner Links. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First we need to make a SDO web service. For more details then this short description, see my &lt;a href="http://biemond.blogspot.com/2008/05/using-sdo-web-services-with-service.html"&gt;previous blog&lt;/a&gt; or this &lt;a href="http://andrejusb.blogspot.com/2009/08/service-enabled-entity-objects-in.html"&gt;blog of Andrejus&lt;/a&gt; .&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I made an simple ADF BC Model project with an Employee viewobject based on the employees table in the HR sample schema.   &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SoQ42gJZO8I/AAAAAAAACz0/zMx2-yXWMmA/s1600-h/bind_ent_1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 225px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SoQ42gJZO8I/AAAAAAAACz0/zMx2-yXWMmA/s320/bind_ent_1.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369479164725902274" /&gt;&lt;/a&gt;Create a Service Interface on this Employees Viewobject and select all the basic operations.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SoQ42Xe2O0I/AAAAAAAACzs/w_VpdYtOspk/s1600-h/bind_ent_2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 258px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SoQ42Xe2O0I/AAAAAAAACzs/w_VpdYtOspk/s320/bind_ent_2.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369479162399963970" /&gt;&lt;/a&gt;JDeveloper 11G generates SDO types on this employees viewobject and generates a Web Service on this Application Module. We will use this WS in the BPEL process.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SoQ42B6mfuI/AAAAAAAACzk/RsAbElGIZXQ/s1600-h/bind_ent_3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 302px; height: 320px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SoQ42B6mfuI/AAAAAAAACzk/RsAbElGIZXQ/s320/bind_ent_3.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369479156610793186" /&gt;&lt;/a&gt;Create a new Service Interface deployment profile&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SoQ41qAKEfI/AAAAAAAACzc/EUOrcyjmlW4/s1600-h/bind_ent_4.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 190px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SoQ41qAKEfI/AAAAAAAACzc/EUOrcyjmlW4/s320/bind_ent_4.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369479150191645170" /&gt;&lt;/a&gt;Deploy this to a Weblogic Server&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SoQ4sUtrzGI/AAAAAAAACzU/xezV7Y1q10U/s1600-h/bind_ent_5.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 192px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SoQ4sUtrzGI/AAAAAAAACzU/xezV7Y1q10U/s320/bind_ent_5.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369478989858196578" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Web Service is ready and we can create a new SOA Project.  I use a XSD with a simple request and response. The input will be the EmployeeId and the BPEL process returns the lastname&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SoQ4sO5wQnI/AAAAAAAACzM/4nY-Jjzo1LE/s1600-h/bind_ent_6.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 135px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SoQ4sO5wQnI/AAAAAAAACzM/4nY-Jjzo1LE/s320/bind_ent_6.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369478988298207858" /&gt;&lt;/a&gt;We don't need use the ADF-BC service adapter, just add the Web Service Adapter to the Composite. Use the WSDL of the Employee WS in the WS Reference adapter&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SoQ4rmk-Q1I/AAAAAAAACzE/HcqQYWcJfYo/s1600-h/bind_ent_7.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 290px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SoQ4rmk-Q1I/AAAAAAAACzE/HcqQYWcJfYo/s320/bind_ent_7.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369478977473626962" /&gt;&lt;/a&gt;&lt;br /&gt;Wire the WS adapter reference to the BPEL process&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SoQ4rfYUCEI/AAAAAAAACy8/P8aeY2Wf0AY/s1600-h/bind_ent_8.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 206px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SoQ4rfYUCEI/AAAAAAAACy8/P8aeY2Wf0AY/s320/bind_ent_8.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369478975541479490" /&gt;&lt;/a&gt;Open the BPEL process and add a new variable&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SoQ4q1hheEI/AAAAAAAACy0/Y7xKHYYazZ8/s1600-h/bind_ent_9.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 175px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SoQ4q1hheEI/AAAAAAAACy0/Y7xKHYYazZ8/s320/bind_ent_9.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369478964305819714" /&gt;&lt;/a&gt;&lt;br /&gt;Select the partnerlink in the entity variable.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SoQ4fCB95rI/AAAAAAAACyo/8ZqZUGgtel8/s1600-h/bind_ent_10.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 299px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SoQ4fCB95rI/AAAAAAAACyo/8ZqZUGgtel8/s320/bind_ent_10.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369478761504695986" /&gt;&lt;/a&gt;&lt;br /&gt;Select the Employee WS&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SoQ4ea2WezI/AAAAAAAACyc/AXEm6MfovqY/s1600-h/bind_ent_11.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 318px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SoQ4ea2WezI/AAAAAAAACyc/AXEm6MfovqY/s320/bind_ent_11.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369478750986992434" /&gt;&lt;/a&gt;Now we need to define the element in this variable. Select the Employees SDO element&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SoQ4dn8O8rI/AAAAAAAACyQ/F0eki8rY8MY/s1600-h/bind_ent_12.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 292px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SoQ4dn8O8rI/AAAAAAAACyQ/F0eki8rY8MY/s320/bind_ent_12.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369478737321456306" /&gt;&lt;/a&gt;&lt;br /&gt;Add the Bind Entity activity to the BPEL process, This will map the Primary Key on the just created variable.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SoQ4c_9eSSI/AAAAAAAACyE/wd4VPH2_OPI/s1600-h/bind_ent_13.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 173px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SoQ4c_9eSSI/AAAAAAAACyE/wd4VPH2_OPI/s320/bind_ent_13.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369478726589237538" /&gt;&lt;/a&gt;&lt;br /&gt;Select the just created employee variable&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SoQ4ceDX3qI/AAAAAAAACx8/0A1GotQdT80/s1600-h/bind_ent_14.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 288px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SoQ4ceDX3qI/AAAAAAAACx8/0A1GotQdT80/s320/bind_ent_14.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369478717487177378" /&gt;&lt;/a&gt;Select the Primary Key Element of the Employee XSD. In my case is this EmployeeId&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SoQ4M8CwgbI/AAAAAAAACx0/wxVWAD6qrAQ/s1600-h/bind_ent_15.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 225px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SoQ4M8CwgbI/AAAAAAAACx0/wxVWAD6qrAQ/s320/bind_ent_15.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369478450659754418" /&gt;&lt;/a&gt;And use the BPEL request (input)  variable as value to this PK column. This will lookup the right employee&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SoQ4MSg7NzI/AAAAAAAACxs/pdy8KgPBYSY/s1600-h/bind_ent_16.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 212px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SoQ4MSg7NzI/AAAAAAAACxs/pdy8KgPBYSY/s320/bind_ent_16.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369478439511996210" /&gt;&lt;/a&gt;We are ready with the configuration of the Bind Entity. We can now use  Assign Activities to retrieve or update the Employee record. In my case I will get the lastname of the employee and return this as response&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SoQ4Ly1jkmI/AAAAAAAACxk/r5E7R-UVMDE/s1600-h/bind_ent_17.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 278px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SoQ4Ly1jkmI/AAAAAAAACxk/r5E7R-UVMDE/s320/bind_ent_17.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369478431008592482" /&gt;&lt;/a&gt;that's all , just deploy this to the Soa Server and test this in the EM website. Use for example 199&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SoQ4Lel2c_I/AAAAAAAACxc/YMN4cxfFaFA/s1600-h/bind_ent_18.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 230px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SoQ4Lel2c_I/AAAAAAAACxc/YMN4cxfFaFA/s320/bind_ent_18.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369478425574011890" /&gt;&lt;/a&gt;This returns Grant as lastname&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SoQ4LCPwX2I/AAAAAAAACxU/q_hoW-PUnkI/s1600-h/bind_ent_19.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 190px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SoQ4LCPwX2I/AAAAAAAACxU/q_hoW-PUnkI/s320/bind_ent_19.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5369478417965145954" /&gt;&lt;/a&gt;Here you can download the test &lt;a href="http://www.sbsframes.nl/jdeveloper/SoaBindEntity.zip"&gt;workspace&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-5050956574950999718?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/5050956574950999718/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=5050956574950999718" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/5050956574950999718?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/5050956574950999718?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/6fCycJV8g5s/crud-operations-with-bind-entity.html" title="CRUD operations with a Bind Entity  variable in BPEL" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_earSixbe3dw/SoQ42gJZO8I/AAAAAAAACz0/zMx2-yXWMmA/s72-c/bind_ent_1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/08/crud-operations-with-bind-entity.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkYEQXk6fip7ImA9WxJaEkw.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-2360711423285212434</id><published>2009-08-02T14:10:00.007+02:00</published><updated>2009-08-02T15:01:40.716+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-02T15:01:40.716+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="jdeveloper 11g" /><title>JDeveloper 11G improvements for the Mediator component</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Gzz7obTbgGNhH_h8C73qN6PcZvI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Gzz7obTbgGNhH_h8C73qN6PcZvI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Gzz7obTbgGNhH_h8C73qN6PcZvI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Gzz7obTbgGNhH_h8C73qN6PcZvI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;With JDeveloper 11G FMW R1 Oracle made life a little bit easier when you are working with the Mediator component. In 10.1.3 the ESB Router can do a lot but you didn't have IDE support to configure this.&lt;br /&gt;The first big change is the Assign option in the routing rules. In 10.1.3 you can change the header properties of a adapter by setting these values in the XSLT transformation of a routing. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SnWDkjXZKaI/AAAAAAAACxM/_wtQ2OjfixI/s1600-h/mediator_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 142px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SnWDkjXZKaI/AAAAAAAACxM/_wtQ2OjfixI/s320/mediator_1.png" alt="" id="BLOGGER_PHOTO_ID_5365339195073702306" border="0" /&gt;&lt;/a&gt;In 11G you can't set a adapter property in a routing rule transformation. You need to do this in the assign option. This is a great feature, the transformation doesn't contain any hidden logica. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SnWDkhDWTEI/AAAAAAAACxE/rlNM6mlMutE/s1600-h/mediator_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 306px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SnWDkhDWTEI/AAAAAAAACxE/rlNM6mlMutE/s320/mediator_2.png" alt="" id="BLOGGER_PHOTO_ID_5365339194452757570" border="0" /&gt;&lt;/a&gt;This assign wizard summarize all the possible header properties you can set. In 10.1.3 you have to search the internet what properties you can use.&lt;br /&gt;&lt;br /&gt;The ESB XSLT header functions are now being replaced by the Mediator Get Functions. The Set functions are replaced by the Assign option.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SnWDfPhAVmI/AAAAAAAACw8/O84t0OXJSsQ/s1600-h/mediator_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 255px; height: 320px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SnWDfPhAVmI/AAAAAAAACw8/O84t0OXJSsQ/s320/mediator_3.png" alt="" id="BLOGGER_PHOTO_ID_5365339103845963362" border="0" /&gt;&lt;/a&gt;In 11G you can create a Domain Value Map in JDeveloper. In 10.1.3 we had to do this in the ESB console, this is great for the DVM lookup XSLT function. You can use the looking glass button to select the right values.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SnWDezo1F2I/AAAAAAAACw0/bviiLuXl9A0/s1600-h/mediator_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 224px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SnWDezo1F2I/AAAAAAAACw0/bviiLuXl9A0/s320/mediator_4.png" alt="" id="BLOGGER_PHOTO_ID_5365339096362588002" border="0" /&gt;&lt;/a&gt;The XSLT GetProperty function also summaries all the adapter properties.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SnWDemX4nqI/AAAAAAAACws/FJdsKKkOTEE/s1600-h/mediator_5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 299px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SnWDemX4nqI/AAAAAAAACws/FJdsKKkOTEE/s320/mediator_5.png" alt="" id="BLOGGER_PHOTO_ID_5365339092801855138" border="0" /&gt;&lt;/a&gt;In 10.1.3 we have a ESB request parameter to see the original request in the reply transformation. In 10.1.3 we have to do this all manually with  JDeveloper 11G  you have now an Include Request option in the reply Transformation. &lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SnWDesfYwpI/AAAAAAAACwk/iGvtaxr79Y4/s1600-h/mediator_8.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 104px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SnWDesfYwpI/AAAAAAAACwk/iGvtaxr79Y4/s320/mediator_8.png" alt="" id="BLOGGER_PHOTO_ID_5365339094443934354" border="0" /&gt;&lt;/a&gt;In the XSLT editor you can use the request values in your reply transformation.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SnWDeP0ha_I/AAAAAAAACwc/l7mjYGdA-BE/s1600-h/mediator_9.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 178px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SnWDeP0ha_I/AAAAAAAACwc/l7mjYGdA-BE/s320/mediator_9.png" alt="" id="BLOGGER_PHOTO_ID_5365339086747954162" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-2360711423285212434?l=biemond.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/2360711423285212434/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=2360711423285212434" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/2360711423285212434?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/2360711423285212434?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/kP8JT3MQZAw/jdeveloper-11g-improvments-for-mediator.html" title="JDeveloper 11G improvements for the Mediator component" /><author><name>Edwin Biemond</name><uri>http://www.blogger.com/profile/02338716126881111629</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="07399857093931558248" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_earSixbe3dw/SnWDkjXZKaI/AAAAAAAACxM/_wtQ2OjfixI/s72-c/mediator_1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/08/jdeveloper-11g-improvments-for-mediator.html</feedburner:origLink></entry></feed>
