<?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;DEYNQXs6fip7ImA9WxNUGUU.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047</id><updated>2009-11-12T01:36:30.516+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>194</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><geo:lat>52.259167</geo:lat><geo:long>5.606944</geo:long><link rel="self" href="http://feeds.feedburner.com/Java/OracleSoaBlog" type="application/atom+xml" /><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;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/vmHW9wklmHkGplUyFcWG-xFAh80/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vmHW9wklmHkGplUyFcWG-xFAh80/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/vmHW9wklmHkGplUyFcWG-xFAh80/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vmHW9wklmHkGplUyFcWG-xFAh80/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'/&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/yOwG30-hYQUi4RP-LASomMzs5KA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yOwG30-hYQUi4RP-LASomMzs5KA/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/yOwG30-hYQUi4RP-LASomMzs5KA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yOwG30-hYQUi4RP-LASomMzs5KA/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'/&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="6 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">6</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/HWXI9RjLZS_AXiSUitnaiU-IDA0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HWXI9RjLZS_AXiSUitnaiU-IDA0/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/HWXI9RjLZS_AXiSUitnaiU-IDA0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HWXI9RjLZS_AXiSUitnaiU-IDA0/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'/&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/3pY2Ob9iKXiRjKkD7kKIAjS8Frk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3pY2Ob9iKXiRjKkD7kKIAjS8Frk/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/3pY2Ob9iKXiRjKkD7kKIAjS8Frk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3pY2Ob9iKXiRjKkD7kKIAjS8Frk/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'/&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/CNSW9dKObjh2bVnb-vLcAE21UY4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CNSW9dKObjh2bVnb-vLcAE21UY4/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/CNSW9dKObjh2bVnb-vLcAE21UY4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CNSW9dKObjh2bVnb-vLcAE21UY4/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'/&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="13 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">13</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/LeGGhNadjP8wNYOM9rrCzPX_FPg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LeGGhNadjP8wNYOM9rrCzPX_FPg/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/LeGGhNadjP8wNYOM9rrCzPX_FPg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LeGGhNadjP8wNYOM9rrCzPX_FPg/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'/&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/inLOquPB0dmopRKHh6COTT46c-E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/inLOquPB0dmopRKHh6COTT46c-E/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/inLOquPB0dmopRKHh6COTT46c-E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/inLOquPB0dmopRKHh6COTT46c-E/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'/&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="0 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">0</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;CUcMRH85eSp7ImA9WxNXEkg.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-8583969221901211554</id><published>2009-09-26T13:06:00.019+02:00</published><updated>2009-09-29T21:38:05.121+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-09-29T21:38:05.121+02: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/pTFQxkoRO3kRnhdlSn02DB-DXbc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pTFQxkoRO3kRnhdlSn02DB-DXbc/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/pTFQxkoRO3kRnhdlSn02DB-DXbc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pTFQxkoRO3kRnhdlSn02DB-DXbc/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 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. 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;# global&lt;br /&gt;wn.bea.home=C:/oracle/MiddlewareJdev11gR1&lt;br /&gt;oracle.home=${wn.bea.home}/jdeveloper&lt;br /&gt;java.passed.home=${wn.bea.home}/jdk160_11&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;applications.home=C:/projecten/workspace/11g_prod&lt;br /&gt;applications=HelloWorld,SoaEjbReference&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;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=SoaEjb,SoaEjb2&lt;br /&gt;SoaEjb.revision=1.0&lt;br /&gt;SoaEjb2.revision=1.1&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=&amp;quot;1.0&amp;quot; encoding=&amp;quot;iso-8859-1&amp;quot;?&amp;gt;&lt;br /&gt;&amp;lt;project name=&amp;quot;soaDeployAll&amp;quot; default=&amp;quot;deployAll&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;property file=&amp;quot;build.properties&amp;quot;/&amp;gt;  &lt;br /&gt;    &amp;lt;property environment=&amp;quot;env&amp;quot;/&amp;gt; &lt;br /&gt;&lt;br /&gt;    &amp;lt;taskdef resource=&amp;quot;net/sf/antcontrib/antcontrib.properties&amp;quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;import file=&amp;quot;${basedir}/ant-sca-deploy.xml&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;import file=&amp;quot;${basedir}/ant-sca-package.xml&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;import file=&amp;quot;${basedir}/ant-sca-test.xml&amp;quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;target name=&amp;quot;deployAll&amp;quot;&amp;gt; &lt;br /&gt;     &amp;lt;foreach list=&amp;quot;${applications}&amp;quot; param=&amp;quot;application&amp;quot; target=&amp;quot;deployApplication&amp;quot; inheritall=&amp;quot;true&amp;quot; inheritrefs=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;   &amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;target name=&amp;quot;deployApplication&amp;quot;&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=&amp;quot;${application}.properties&amp;quot;/&amp;gt;   &lt;br /&gt;        &amp;lt;foreach list=&amp;quot;${projects}&amp;quot; param=&amp;quot;project&amp;quot; target=&amp;quot;deployProject&amp;quot; inheritall=&amp;quot;true&amp;quot; inheritrefs=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;target name=&amp;quot;deployProject&amp;quot;&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=&amp;quot;proj.compositeName&amp;quot; value=&amp;quot;${project}&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;property name=&amp;quot;proj.compositeDir&amp;quot; value=&amp;quot;${applications.home}/${application}&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;propertycopy name=&amp;quot;proj.revision&amp;quot; from=&amp;quot;${project}.revision&amp;quot;/&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=&amp;quot;package&amp;quot; inheritall=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;compositeDir&amp;quot; value=&amp;quot;${proj.compositeDir}/${project}&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;compositeName&amp;quot; value=&amp;quot;${proj.compositeName}&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;revision&amp;quot; value=&amp;quot;${proj.revision}&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;oracle.home&amp;quot; value=&amp;quot;${oracle.home}&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;java.passed.home&amp;quot; value=&amp;quot;${java.passed.home}&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;wl_home&amp;quot; value=&amp;quot;${wl_home}&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;sca.application.home&amp;quot; value=&amp;quot;${proj.compositeDir}&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;scac.application.home&amp;quot; value=&amp;quot;${proj.compositeDir}&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;scac.input&amp;quot; value=&amp;quot;${proj.compositeDir}/${proj.compositeName}/composite.xml&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;scac.output&amp;quot; value=&amp;quot;${tmp.output.dir}/${proj.compositeName}.xml&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;scac.error&amp;quot; value=&amp;quot;${tmp.output.dir}/${proj.compositeName}.err&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;scac.displayLevel&amp;quot; value=&amp;quot;3&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;/antcall&amp;gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;property name=&amp;quot;deploy.sarLocation&amp;quot; value=&amp;quot;${proj.compositeDir}/${proj.compositeName}/deploy/sca_${proj.compositeName}_rev${proj.revision}.jar&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;property name=&amp;quot;deploy.configplan&amp;quot;  value=&amp;quot;${proj.compositeDir}/${proj.compositeName}/${proj.compositeName}_cfgplan_${deployment.plan.environment}.xml&amp;quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt;        &amp;lt;propertycopy name=&amp;quot;deploy.serverURL&amp;quot;    from=&amp;quot;${deployment.plan.environment}.serverURL&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;propertycopy name=&amp;quot;deploy.overwrite&amp;quot;    from=&amp;quot;${deployment.plan.environment}.overwrite&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;propertycopy name=&amp;quot;deploy.user&amp;quot;         from=&amp;quot;${deployment.plan.environment}.user&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;propertycopy name=&amp;quot;deploy.password&amp;quot;     from=&amp;quot;${deployment.plan.environment}.password&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;propertycopy name=&amp;quot;deploy.forceDefault&amp;quot; from=&amp;quot;${deployment.plan.environment}.forceDefault&amp;quot;/&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=&amp;quot;deploy&amp;quot; inheritall=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;wl_home&amp;quot; value=&amp;quot;${wl_home}&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;oracle.home&amp;quot; value=&amp;quot;${oracle.home}&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;serverURL&amp;quot; value=&amp;quot;${deploy.serverURL}&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;user&amp;quot; value=&amp;quot;${deploy.user}&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;password&amp;quot; value=&amp;quot;${deploy.password}&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;overwrite&amp;quot; value=&amp;quot;${deploy.overwrite}&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;forceDefault&amp;quot; value=&amp;quot;${deploy.forceDefault}&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;sarLocation&amp;quot; value=&amp;quot;${deploy.sarLocation}&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;configplan&amp;quot; value=&amp;quot;${deploy.configplan}&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;/antcall&amp;gt;  &lt;br /&gt;&lt;br /&gt;        &amp;lt;antcall target=&amp;quot;test&amp;quot; inheritall=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;scatest.input&amp;quot; value=&amp;quot;${project}&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;scatest.format&amp;quot; value=&amp;quot;junit&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;scatest.result&amp;quot; value=&amp;quot;${tmp.output.dir}&amp;quot;/&amp;gt;&lt;br /&gt;             &amp;lt;param name=&amp;quot;jndi.properties.input&amp;quot; value=&amp;quot;${deployment.plan.environment}.jndi.properties&amp;quot;/&amp;gt;&lt;br /&gt;        &amp;lt;/antcall&amp;gt;  &lt;br /&gt;&lt;br /&gt;        &lt;br /&gt;    &amp;lt;/target&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/project&amp;gt;&lt;br /&gt;&lt;/pre&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\MiddlewareJdev11gR1&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_11&lt;br /&gt;&lt;br /&gt;set ANT_CONTRIB=ant-contrib-1.0b3.jar&lt;br /&gt;set CLASSPATH=%CLASSPATH%;%ANT_CONTRIB%&lt;br /&gt;&lt;br /&gt;ant -f build.xml deployAll&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'/&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="7 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">7</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/PQZS2fSpF9zcnxwLn94jSDDhOeY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PQZS2fSpF9zcnxwLn94jSDDhOeY/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/PQZS2fSpF9zcnxwLn94jSDDhOeY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PQZS2fSpF9zcnxwLn94jSDDhOeY/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'/&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="1 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">1</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/emGf_D-hq-pzNBV1YhsvbGm2C7g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/emGf_D-hq-pzNBV1YhsvbGm2C7g/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/emGf_D-hq-pzNBV1YhsvbGm2C7g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/emGf_D-hq-pzNBV1YhsvbGm2C7g/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'/&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/Gdt_9YYQNFzbN0OJG21oaUu-Cyg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Gdt_9YYQNFzbN0OJG21oaUu-Cyg/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/Gdt_9YYQNFzbN0OJG21oaUu-Cyg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Gdt_9YYQNFzbN0OJG21oaUu-Cyg/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'/&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/ZWoyza_514dOydRiuC2NtX_WwiM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZWoyza_514dOydRiuC2NtX_WwiM/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/ZWoyza_514dOydRiuC2NtX_WwiM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZWoyza_514dOydRiuC2NtX_WwiM/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'/&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/FKM-mzlCsmXgokaEbH5Gm_tAim0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FKM-mzlCsmXgokaEbH5Gm_tAim0/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/FKM-mzlCsmXgokaEbH5Gm_tAim0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FKM-mzlCsmXgokaEbH5Gm_tAim0/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'/&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/QmDM_Ai3qNjgkX9sM3pbdWkgxSA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QmDM_Ai3qNjgkX9sM3pbdWkgxSA/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/QmDM_Ai3qNjgkX9sM3pbdWkgxSA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QmDM_Ai3qNjgkX9sM3pbdWkgxSA/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'/&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/XtvK23GKJPniAa8QZg7Or6l5peE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XtvK23GKJPniAa8QZg7Or6l5peE/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/XtvK23GKJPniAa8QZg7Or6l5peE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XtvK23GKJPniAa8QZg7Or6l5peE/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'/&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><entry gd:etag="W/&quot;D0cBSXk9fip7ImA9WxJbE0k.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-2852896442051654415</id><published>2009-07-22T23:41:00.023+02:00</published><updated>2009-07-23T12:30:58.766+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-23T12:30:58.766+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="MDS" /><title>Using Shared Object in Soa Suite 11g with MDS</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Z0XByQufxrujg7bqSjOQ_OSEKqs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Z0XByQufxrujg7bqSjOQ_OSEKqs/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/Z0XByQufxrujg7bqSjOQ_OSEKqs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Z0XByQufxrujg7bqSjOQ_OSEKqs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Inspired by &lt;a href="http://eelzinga.wordpress.com/"&gt;Eric Elzinga&lt;/a&gt; , who was wondering  how MDS can work in Soa Suite 11g , I made some screenshots how you can use a XSD from a central MDS repository in your composite application. &lt;a href="http://blogs.oracle.com/soabpm/2009/07/reusing_common_metadata_wsdl_x.html"&gt;Clemens&lt;/a&gt; already blogged about re-using common metadata and he made a &lt;a href="http://blogs.oracle.com/soabpm/2009/07/mds_sharing_and_common_tools_p.html"&gt;great ant utility&lt;/a&gt; to import or delete MDS files.&lt;br /&gt;First I make a local MDS repository. If you install the Soa plugin you already have a seed folder in the integration folder. Under this folder create an new folder called apps. ( this have has to be apps else you will get a permission denied error ) .  Under this apps folder we can create our own definitions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/Smgz7OvxTHI/AAAAAAAACwU/87PRv4jGCjI/s1600-h/soa_mds_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 307px; height: 290px;" src="http://4.bp.blogspot.com/_earSixbe3dw/Smgz7OvxTHI/AAAAAAAACwU/87PRv4jGCjI/s320/soa_mds_1.png" alt="" id="BLOGGER_PHOTO_ID_5361592449048333426" border="0" /&gt;&lt;/a&gt;To use my local SOA-MDS repository I create a new MDS File Connection&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/Smgz69vITiI/AAAAAAAACwM/bTX6KnN-HCY/s1600-h/soa_mds_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 215px;" src="http://2.bp.blogspot.com/_earSixbe3dw/Smgz69vITiI/AAAAAAAACwM/bTX6KnN-HCY/s320/soa_mds_2.png" alt="" id="BLOGGER_PHOTO_ID_5361592444482244130" border="0" /&gt;&lt;/a&gt;I want to re-use these common objects in every Soa project so I choose for the resource palette option&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/Smgz6owcHQI/AAAAAAAACwE/umtvf-A0RrQ/s1600-h/soa_mds_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 238px;" src="http://1.bp.blogspot.com/_earSixbe3dw/Smgz6owcHQI/AAAAAAAACwE/umtvf-A0RrQ/s320/soa_mds_3.png" alt="" id="BLOGGER_PHOTO_ID_5361592438850592002" border="0" /&gt;&lt;/a&gt;select the seed folder in the integration folder&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/Smgz6RSZ50I/AAAAAAAACv8/z31xVOGU-as/s1600-h/soa_mds_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 239px;" src="http://1.bp.blogspot.com/_earSixbe3dw/Smgz6RSZ50I/AAAAAAAACv8/z31xVOGU-as/s320/soa_mds_4.png" alt="" id="BLOGGER_PHOTO_ID_5361592432550602562" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Here we can see our common application objects.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SmgzzRg7bSI/AAAAAAAACv0/v3CkxnbFPnE/s1600-h/soa_mds_5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 219px; height: 320px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SmgzzRg7bSI/AAAAAAAACv0/v3CkxnbFPnE/s320/soa_mds_5.png" alt="" id="BLOGGER_PHOTO_ID_5361592312352435490" border="0" /&gt;&lt;/a&gt;Open the application resources window and open the adf-config.xml&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SmgzzcsHrfI/AAAAAAAACvs/3S6cilIVHSw/s1600-h/soa_mds_6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 265px; height: 320px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SmgzzcsHrfI/AAAAAAAACvs/3S6cilIVHSw/s320/soa_mds_6.png" alt="" id="BLOGGER_PHOTO_ID_5361592315352165874" border="0" /&gt;&lt;/a&gt;Here we define a new metadata namespace with apps as path. And use the integration folder as  metadata-path value.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SmgzzL7vtoI/AAAAAAAACvk/Sh1wprAzBHU/s1600-h/soa_mds_7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 186px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SmgzzL7vtoI/AAAAAAAACvk/Sh1wprAzBHU/s320/soa_mds_7.png" alt="" id="BLOGGER_PHOTO_ID_5361592310854301314" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;We are ready to use these common objects in a mediator.. Here I will use a schema from the local MDS as input parameter for the mediator.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/Smgzy-D7COI/AAAAAAAACvc/Ss-fwQ4pfhA/s1600-h/soa_mds_8.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/Smgzy-D7COI/AAAAAAAACvc/Ss-fwQ4pfhA/s320/soa_mds_8.png" alt="" id="BLOGGER_PHOTO_ID_5361592307130501346" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Import a new schema&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/Smgzyn1C_JI/AAAAAAAACvU/WBRyMzgFBvY/s1600-h/soa_mds_9.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 319px; height: 320px;" src="http://3.bp.blogspot.com/_earSixbe3dw/Smgzyn1C_JI/AAAAAAAACvU/WBRyMzgFBvY/s320/soa_mds_9.png" alt="" id="BLOGGER_PHOTO_ID_5361592301162527890" border="0" /&gt;&lt;/a&gt;Select the resource browser and here we can select our schema from the local MDS&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/Smgzr6ImGYI/AAAAAAAACvM/dwCmq1lPLdk/s1600-h/soa_mds_10.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 295px;" src="http://4.bp.blogspot.com/_earSixbe3dw/Smgzr6ImGYI/AAAAAAAACvM/dwCmq1lPLdk/s320/soa_mds_10.png" alt="" id="BLOGGER_PHOTO_ID_5361592185817274754" border="0" /&gt;&lt;/a&gt;I uncheck the Copy to project option, because this XSD already exists in the MDS&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SmgzruTgwwI/AAAAAAAACvE/bBJc5uiRSvc/s1600-h/soa_mds_11.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 318px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SmgzruTgwwI/AAAAAAAACvE/bBJc5uiRSvc/s320/soa_mds_11.png" alt="" id="BLOGGER_PHOTO_ID_5361592182641836802" border="0" /&gt;&lt;/a&gt;Our Project is ready but If we want to deploy this Soa project, we will receive a error,  it can't find the schema. So we need to export the local MDS files to the  SOA Suite database MDS.&lt;br /&gt;To do this we have 2 options , the first option is to create a MAR deployment ( Application properties ) or do this with Ant.&lt;br /&gt;I stripped the Clemens ant project so this ant build file has only two tasks , add and delete. It uses the adf-config.xml ( config folder)  for the location of the target MDS and I use the local MDS as source.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SmgzreUMGrI/AAAAAAAACu8/keQ1m2tDtys/s1600-h/soa_mds_12.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 280px; height: 312px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SmgzreUMGrI/AAAAAAAACu8/keQ1m2tDtys/s320/soa_mds_12.png" alt="" id="BLOGGER_PHOTO_ID_5361592178349710002" border="0" /&gt;&lt;/a&gt;Here is the target adf-config.xml which is located in  the config folder&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SmgzrDbpbPI/AAAAAAAACu0/VbaaNTsa08c/s1600-h/soa_mds_13.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 210px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SmgzrDbpbPI/AAAAAAAACu0/VbaaNTsa08c/s320/soa_mds_13.png" alt="" id="BLOGGER_PHOTO_ID_5361592171133234418" border="0" /&gt;&lt;/a&gt;Change the build.properties so it matches your environment&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SmgzrD_9rDI/AAAAAAAACus/IpmW36YsyLE/s1600-h/soa_mds_14.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 317px; height: 320px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SmgzrD_9rDI/AAAAAAAACus/IpmW36YsyLE/s320/soa_mds_14.png" alt="" id="BLOGGER_PHOTO_ID_5361592171285556274" border="0" /&gt;&lt;/a&gt;This will import your local MDS object to the remote MDS. After this you can deploy your Soa Suite project.&lt;br /&gt;Here you can download &lt;a href="http://www.sbsframes.nl/jdeveloper/mds.zip"&gt;my ant project&lt;/a&gt;. Thanks to Clemens.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-2852896442051654415?l=biemond.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/2852896442051654415/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=2852896442051654415" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/2852896442051654415?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/2852896442051654415?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/fJynJx8fqiY/using-shared-object-in-soa-suite-11g.html" title="Using Shared Object in Soa Suite 11g with MDS" /><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/Smgz7OvxTHI/AAAAAAAACwU/87PRv4jGCjI/s72-c/soa_mds_1.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/07/using-shared-object-in-soa-suite-11g.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMAQHY8fyp7ImA9WxJbEk0.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-6059027647420309540</id><published>2009-07-21T21:07:00.007+02:00</published><updated>2009-07-21T22:00:41.877+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-21T22:00:41.877+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="adf" /><category scheme="http://www.blogger.com/atom/ns#" term="MDS" /><title>MDS repository for ADF 11G</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8RmkrLWNMtYtjcdFpZ97ErNZpvg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8RmkrLWNMtYtjcdFpZ97ErNZpvg/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/8RmkrLWNMtYtjcdFpZ97ErNZpvg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8RmkrLWNMtYtjcdFpZ97ErNZpvg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;With Fusion Middleware 11G the MDS repository plays a important role for ADF customizations and SOA shared objects. In this blog I explain how you can create a MDS database repository, deploy customizations to this MDS database and what you can do with MDS in the Enterprise manager website.&lt;br /&gt;&lt;br /&gt;First we need to download the RCU repository creation utility and install a MDS repository in a Oracle Database.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SmYS1M4neTI/AAAAAAAACsc/-4Z7qAFU2lo/s1600-h/mds_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 239px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SmYS1M4neTI/AAAAAAAACsc/-4Z7qAFU2lo/s320/mds_1.png" alt="" id="BLOGGER_PHOTO_ID_5360993111632214322" border="0" /&gt;&lt;/a&gt;Use a sysdba account&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SmYS00ZHBQI/AAAAAAAACsU/96zfJZaXUpM/s1600-h/mds_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 239px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SmYS00ZHBQI/AAAAAAAACsU/96zfJZaXUpM/s320/mds_2.png" alt="" id="BLOGGER_PHOTO_ID_5360993105057613058" border="0" /&gt;&lt;/a&gt;We only have to select the Metadata Services and provide a prefix&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SmYS0sqWwFI/AAAAAAAACsM/WZ_fS6EdJto/s1600-h/mds_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 241px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SmYS0sqWwFI/AAAAAAAACsM/WZ_fS6EdJto/s320/mds_3.png" alt="" id="BLOGGER_PHOTO_ID_5360993102982463570" border="0" /&gt;&lt;/a&gt;Next we need to install Weblogic with the Soa, Webcenter or &lt;a href="http://biemond.blogspot.com/2009/07/adf-web-applications-and-oracle.html"&gt;Application development runtime&lt;/a&gt; extension. This extension gives us the Enterprise Manager website where we can configure the MDS repository. Select your Weblogic domain and select the MDS menu option.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SmYS0bPI2BI/AAAAAAAACsE/bbAPn2KmG8Q/s1600-h/mds_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 277px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SmYS0bPI2BI/AAAAAAAACsE/bbAPn2KmG8Q/s320/mds_4.png" alt="" id="BLOGGER_PHOTO_ID_5360993098304903186" border="0" /&gt;&lt;/a&gt;Register the just created MDS repository. In my case I will call this repository adf&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SmYSqyiH3GI/AAAAAAAACr8/VZ5Z9B2jKX0/s1600-h/mds_5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 127px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SmYSqyiH3GI/AAAAAAAACr8/VZ5Z9B2jKX0/s320/mds_5.png" alt="" id="BLOGGER_PHOTO_ID_5360992932759854178" border="0" /&gt;&lt;/a&gt;The EM website automatically create a datasource which we can use later.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SmYSqpBT54I/AAAAAAAACr0/g2s7P0B55-Y/s1600-h/mds_6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 97px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SmYSqpBT54I/AAAAAAAACr0/g2s7P0B55-Y/s320/mds_6.png" alt="" id="BLOGGER_PHOTO_ID_5360992930206312322" border="0" /&gt;&lt;/a&gt;If we have an ADF &lt;a href="http://biemond.blogspot.com/2009/07/customize-and-personalize-your-jsf.html"&gt;application with customizations&lt;/a&gt; and we deploy this to the Weblogic Server then JDeveloper detects the MDS repository&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SmYSqTIMcJI/AAAAAAAACrs/UGLbDDIesys/s1600-h/mds_7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 159px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SmYSqTIMcJI/AAAAAAAACrs/UGLbDDIesys/s320/mds_7.png" alt="" id="BLOGGER_PHOTO_ID_5360992924329603218" border="0" /&gt;&lt;/a&gt;JDeveloper automatically creates a new MDS partition and uses your ear deployment name as partition name. It also uses the just created datasource to fill the MDS database. Just press deploy&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SmYSqdGbOcI/AAAAAAAACrk/sSR6xNqHg4k/s1600-h/mds_8.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 281px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SmYSqdGbOcI/AAAAAAAACrk/sSR6xNqHg4k/s320/mds_8.png" alt="" id="BLOGGER_PHOTO_ID_5360992927006538178" border="0" /&gt;&lt;/a&gt;When we go back to the EM website we can see the just created MDS partition.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SmYSqEGHWII/AAAAAAAACrc/KBnZgrKEWEM/s1600-h/mds_9.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 141px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SmYSqEGHWII/AAAAAAAACrc/KBnZgrKEWEM/s320/mds_9.png" alt="" id="BLOGGER_PHOTO_ID_5360992920294348930" border="0" /&gt;&lt;/a&gt;The EM website also provides MBeans with some MDS operations.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SmYSf1y_6pI/AAAAAAAACrU/EBuJ3PacpOg/s1600-h/mds_10.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 132px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SmYSf1y_6pI/AAAAAAAACrU/EBuJ3PacpOg/s320/mds_10.png" alt="" id="BLOGGER_PHOTO_ID_5360992744657382034" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;For example we can query the partitions of a MDS repository.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SmYSfithg1I/AAAAAAAACrM/DBGyGwmHUfc/s1600-h/mds_11.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 183px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SmYSfithg1I/AAAAAAAACrM/DBGyGwmHUfc/s320/mds_11.png" alt="" id="BLOGGER_PHOTO_ID_5360992739534144338" border="0" /&gt;&lt;/a&gt;When we select our just deployed ADF application and go to the MDS menu option, we can administer the MDS partition of this application.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SmYSfTBcGkI/AAAAAAAACrE/3C-Hg7snIXU/s1600-h/mds_12.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 228px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SmYSfTBcGkI/AAAAAAAACrE/3C-Hg7snIXU/s320/mds_12.png" alt="" id="BLOGGER_PHOTO_ID_5360992735322708546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;We can export the MDS customization and import this to a different Weblogic server which has the same ADF application.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SmYSfIRd6uI/AAAAAAAACq8/uyP8EEtAJKQ/s1600-h/mds_13.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 114px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SmYSfIRd6uI/AAAAAAAACq8/uyP8EEtAJKQ/s320/mds_13.png" alt="" id="BLOGGER_PHOTO_ID_5360992732437146338" border="0" /&gt;&lt;/a&gt;At last we can take a look at the MDS repository, here we can see that all the customizations entries are registered in the database. But the customizations xml are still located on the server, a bit strange I would suspect that with a MDS repository in the database that everything is loaded in the database.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SmYSe72m_OI/AAAAAAAACq0/OgmCzzqpe_A/s1600-h/mds_14.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 173px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SmYSe72m_OI/AAAAAAAACq0/OgmCzzqpe_A/s320/mds_14.png" alt="" id="BLOGGER_PHOTO_ID_5360992729103269090" 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-6059027647420309540?l=biemond.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/6059027647420309540/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=6059027647420309540" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6059027647420309540?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/6059027647420309540?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/kNK_xv7JqSo/mds-repository-for-adf-11g.html" title="MDS repository for ADF 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/SmYS1M4neTI/AAAAAAAACsc/-4Z7qAFU2lo/s72-c/mds_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/07/mds-repository-for-adf-11g.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MER30_eip7ImA9WxJUGUk.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-8317107774615016932</id><published>2009-07-18T16:58:00.029+02:00</published><updated>2009-07-18T22:36:46.342+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-18T22:36:46.342+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="EclipseLink" /><title>Using an EJB Service / Reference in Soa Suite 11G</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/co8EdUDa8DA5h_D84qKDug9NKog/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/co8EdUDa8DA5h_D84qKDug9NKog/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/co8EdUDa8DA5h_D84qKDug9NKog/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/co8EdUDa8DA5h_D84qKDug9NKog/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;With Oracle Soa Suite 11G ( FMW11G R1 )  we can finally use the EJB adapter. This adapter can be used as a service or reference. This means we can start a BPEL process by calling a EJB session method or use an EJB to lookup or change data. Using an EJB as service or reference is very cool because it is fast ( RMI ) and we can use the same EJB's ( Multi Tier ) for your Java Web applications and your composites ( Who needs the Database Adapter now?)  &lt;div&gt;Here is a picture of the composite application with an EJB adapter as Service and Reference.   &lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SmHm8khn4YI/AAAAAAAACpU/dlza3kZcbts/s1600-h/soa_ejb_1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 201px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SmHm8khn4YI/AAAAAAAACpU/dlza3kZcbts/s320/soa_ejb_1.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5359818959818842498" /&gt;&lt;/a&gt;In this blog I will explain you first, how the SDO EJB is created and then how we use this as a Reference and as a Service&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold; "&gt;Create SDO Eclipse EJB&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;First step is to create an  EJB entity with Eclipselink as persistence provider. For this example I used the Employees table of the HR schema. Next step is to create an EJB Session Bean.&lt;/div&gt;&lt;div&gt;Here is an overview of my EJB model project.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SmImNxj91AI/AAAAAAAACqc/OGXYQb2bf0I/s1600-h/soa_ejb_2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 319px; height: 212px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SmImNxj91AI/AAAAAAAACqc/OGXYQb2bf0I/s320/soa_ejb_2.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5359888524608656386" /&gt;&lt;/a&gt;Select the Session Bean and generate a service interface on this&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SmImN0k7uII/AAAAAAAACqU/ydhkFUR7P38/s1600-h/soa_ejb_3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 276px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SmImN0k7uII/AAAAAAAACqU/ydhkFUR7P38/s320/soa_ejb_3.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5359888525418018946" /&gt;&lt;/a&gt;Now it goes totally wrong with the JDeveloper wizard 11G R1.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SmImNlf4faI/AAAAAAAACqM/YWAfdSIMWK8/s1600-h/soa_ejb_4.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 312px; height: 320px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SmImNlf4faI/AAAAAAAACqM/YWAfdSIMWK8/s320/soa_ejb_4.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5359888521370303906" /&gt;&lt;/a&gt;First step is fix the packages names of the SDO and SDOImpl classes, then we can refactor these classes and move it to the entities package. With this as result.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SmImNootk3I/AAAAAAAACqE/Is3HhXnAlSg/s1600-h/soa_ejb_5.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 290px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SmImNootk3I/AAAAAAAACqE/Is3HhXnAlSg/s320/soa_ejb_5.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5359888522212643698" /&gt;&lt;/a&gt;Select the session bean again and generate for the second time the service interface. Now we will get the WSDL.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SmImEcsJUxI/AAAAAAAACp8/6DuEFwne3Jk/s1600-h/soa_ejb_6.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/SmImEcsJUxI/AAAAAAAACp8/6DuEFwne3Jk/s320/soa_ejb_6.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5359888364386997010" /&gt;&lt;/a&gt;Move the EJB WSDL and XSD to the Session bean package. With this as result.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SmImEW4z2kI/AAAAAAAACp0/rKkI9FvN-lw/s1600-h/soa_ejb_7.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 253px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SmImEW4z2kI/AAAAAAAACp0/rKkI9FvN-lw/s320/soa_ejb_7.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5359888362829503042" /&gt;&lt;/a&gt;Open the Entity XSD and change the target namespace and xmlns namespace to the same name as the package name in my case /nl/whitehorses/hr/ejb/entities/.&lt;/div&gt;&lt;div&gt;before&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SmImELDBnBI/AAAAAAAACps/it7R7JnpduI/s1600-h/soa_ejb_8.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 209px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SmImELDBnBI/AAAAAAAACps/it7R7JnpduI/s320/soa_ejb_8.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5359888359651122194" /&gt;&lt;/a&gt;after&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SmImELlNU-I/AAAAAAAACpk/9pbg-CgQ28E/s1600-h/soa_ejb_9.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 206px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SmImELlNU-I/AAAAAAAACpk/9pbg-CgQ28E/s320/soa_ejb_9.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5359888359794496482" /&gt;&lt;/a&gt;Open the XSD of the WSDL and import the entity schema and fix the namespace.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SmImDxxXlOI/AAAAAAAACpc/mCC4BsSDeFY/s1600-h/soa_ejb_10.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 102px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SmImDxxXlOI/AAAAAAAACpc/mCC4BsSDeFY/s320/soa_ejb_10.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5359888352866178274" /&gt;&lt;/a&gt;Change /nl.whitehorses.hr.ejb.services/ to /nl/whitehorses/hr/ejb/services/ in  every java, XSD or WSDL file&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Create a Datasource to the HR schema in Weblogic and make sure you are using the XA Oracle Driver and target this Datasource to the Soa suite server.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Deploy the EJB to the Soa Suite instance.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-weight: bold;"&gt;Using the SDO Ejb as a reference in Soa Suite 11g&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;Open the composite application and drag the EJB adapter on the reference part of the composite.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SmIsizu4sAI/AAAAAAAACqk/EVW6_gC3wpc/s1600-h/soa_ejb_11.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 155px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SmIsizu4sAI/AAAAAAAACqk/EVW6_gC3wpc/s320/soa_ejb_11.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5359895483038347266" /&gt;&lt;/a&gt;Fill in the JNDI of the EJB on soa suite server , select the EJB jar and provide the Remote EJB interface class name. &lt;/div&gt;&lt;div&gt;Select the WSDL , Go the classes folder of the EJB model project and select the Session bean WSDL.  This will copy the WSDL and the XSD to the local project folders and also import the jar.  That's all , now you can invoke this in a BPEL process. &lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SmHmAaX6rEI/AAAAAAAACpE/mYSSrlnQxbY/s1600-h/soa_ejb_20.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 282px; height: 320px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SmHmAaX6rEI/AAAAAAAACpE/mYSSrlnQxbY/s320/soa_ejb_20.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5359817926301625410" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Using the SDO Eclipselink Ejb as a Service in Soa Suite 11g&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;We can use the same EJB as starting point of our composite application. This time Soa Suite only uses the interface and does nothing with the Session Bean methods. &lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;Drag the EJB adapter to the Services side of the composite overview.&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SmIvEH-rtkI/AAAAAAAACqs/WjTdoYZsgSI/s1600-h/soa_ejb_12.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 223px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SmIvEH-rtkI/AAAAAAAACqs/WjTdoYZsgSI/s320/soa_ejb_12.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5359898254432253506" /&gt;&lt;/a&gt;The Service ID is very important because we need this name in serviceFactory.createService, The rest is the same as in the reference part. Use this EJB Service in a BPEL process. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now we only have to make a simple java class where we call this EJB composite service. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="java"&gt;&lt;br /&gt;package nl.whitehorses.soa.ejb.service;&lt;br /&gt;&lt;br /&gt;import commonj.sdo.helper.DataFactory;&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.hr.ejb.entities.EmployeesSDO;&lt;br /&gt;import nl.whitehorses.hr.ejb.services.HrEmployeeEJB;&lt;br /&gt;&lt;br /&gt;import oracle.integration.platform.blocks.sdox.ejb.api.SOAServiceFactory;&lt;br /&gt;import oracle.integration.platform.blocks.sdox.ejb.api.SOAServiceInvokerBean;&lt;br /&gt;&lt;br /&gt;import oracle.jbo.common.sdo.SDOHelper;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class callejb {&lt;br /&gt;public callejb() {&lt;br /&gt;super();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public static void main(String[] args) {&lt;br /&gt;try {&lt;br /&gt;   // very important to load every schema you use in the EJB&lt;br /&gt;   try {&lt;br /&gt;       SDOHelper.INSTANCE.defineSchema("nl/whitehorses/hr/ejb/entities/", "EmployeesSDO.xsd");&lt;br /&gt;       SDOHelper.INSTANCE.defineSchema("nl/whitehorses/hr/ejb/services/", "HrEmployeeEJBBeanWS.xsd");&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;   Properties props = new Properties();&lt;br /&gt;   props.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");&lt;br /&gt;&lt;br /&gt; // soa suite server&lt;br /&gt;      props.put(Context.PROVIDER_URL, "t3://localhost:8001");&lt;br /&gt;   InitialContext ctx = new InitialContext(props);&lt;br /&gt;   SOAServiceInvokerBean invoker = (SOAServiceInvokerBean)ctx.lookup("SOAServiceInvokerBean#oracle.integration.platform.blocks.sdox.ejb.api.SOAServiceInvokerBean");&lt;br /&gt;&lt;br /&gt;   //--  Create a SOAServiceFactory instance&lt;br /&gt;   SOAServiceFactory serviceFactory = SOAServiceFactory.newInstance(invoker);&lt;br /&gt;&lt;br /&gt;// use the Service Id in the EJB service adapter&lt;br /&gt;   HrEmployeeEJB hrEmployeeEJB =  serviceFactory.createService("EmployeeService", HrEmployeeEJB.class);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   EmployeesSDO employeesSDO =  ( EmployeesSDO )DataFactory.INSTANCE.create(EmployeesSDO.class);&lt;br /&gt;   employeesSDO.setDepartmentId(1L);&lt;br /&gt;   employeesSDO.setEmail("aaa@aa.nl");&lt;br /&gt;   employeesSDO.setEmployeeId(1L);&lt;br /&gt;   employeesSDO.setFirstName("edwin");&lt;br /&gt;   employeesSDO.setJobId("aa");&lt;br /&gt;   employeesSDO.setLastName("biemond");&lt;br /&gt;   employeesSDO.setPhoneNumber("123");&lt;br /&gt;   employeesSDO.setSalary(1000);&lt;br /&gt;&lt;br /&gt;   EmployeesSDO resultEmployeesSDO = hrEmployeeEJB.persistEmployeesSDO(employeesSDO);&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;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here is the result of a EJB service instance.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SmHmAjRg0uI/AAAAAAAACpM/wDdcoZQEI3g/s1600-h/soa_ejb_21.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 306px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SmHmAjRg0uI/AAAAAAAACpM/wDdcoZQEI3g/s320/soa_ejb_21.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5359817928690684642" /&gt;&lt;/a&gt;&lt;br /&gt;Here the link to official &lt;a href="http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10224/sca_sdo_ejb.htm"&gt;EJB adapter documentation.&lt;/a&gt; ( This can be a lot better )&lt;br /&gt;Download here the &lt;a href="http://www.sbsframes.nl/jdeveloper/AdfEjbHr.zip"&gt;EJB project&lt;/a&gt; I used and here the  &lt;a href="http://www.sbsframes.nl/jdeveloper/SoaEjbReference.zip"&gt;Soa Suite&lt;/a&gt; project.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-8317107774615016932?l=biemond.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/8317107774615016932/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=8317107774615016932" title="10 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/8317107774615016932?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/8317107774615016932?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/x-JqCqV-M8U/using-ejb-service-reference-in-soa.html" title="Using an EJB Service / Reference 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/SmHm8khn4YI/AAAAAAAACpU/dlza3kZcbts/s72-c/soa_ejb_1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">10</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/07/using-ejb-service-reference-in-soa.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4CSXs7fCp7ImA9WxJUFEU.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-2724665957690308288</id><published>2009-07-13T07:30:00.001+02:00</published><updated>2009-07-13T14:42:48.504+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-13T14:42:48.504+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WebLogic" /><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g soa suite" /><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Service Bus" /><title>Using AQ ( JMS Text message ) in WLS 10.3.1</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/08rgEISCvvWQGhcirZhUkcfXOnk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/08rgEISCvvWQGhcirZhUkcfXOnk/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/08rgEISCvvWQGhcirZhUkcfXOnk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/08rgEISCvvWQGhcirZhUkcfXOnk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;In Oracle Application Server 10.1.3 ( OC4J)  you can use OJMS to expose AQ with JMS (text) Message as type and use it as a normal JMS Queue or Topic in Soa Suite or a Message driven Bean.  See my &lt;a href="http://biemond.blogspot.com/2008/01/oracle-jms-with-esb-and-bpel.html"&gt;previous blog&lt;/a&gt; for  more details. With the release of Weblogic 10.3.1 ( WLS FMW11g ) we can do the same with a Foreign JMS Server. Before 10.3.1 we had to make a &lt;a href="http://biemond.blogspot.com/2008/11/using-aq-in-weblogic-103.html"&gt;startup class&lt;/a&gt; to achieve this.&lt;br /&gt;First create a Queue and Queue table with &lt;span&gt;&lt;span class="string"&gt;SYS.AQ$_JMS_MESSAGE as&lt;/span&gt;&lt;/span&gt; payload type in your Oracle Database and make sure you enable enqueue /dequeue on this Queue.&lt;br /&gt;In Weblogic we have to create a JMS server and a JMS module.&lt;br /&gt;Create a new JDBC datasource with a schema user which can enqueue or dequeue the just created queue. Use the XA JDBC driver, with this driver you can use global and local transactions. with NON-XA driver you can only use local transactions, this can be problem when you want to use this Queue in Soa Suite.&lt;br /&gt;Select your JMS module in the WLS Console and create a new Foreign Server.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SlsadsoI2nI/AAAAAAAACoE/o_N6X3lQnXQ/s1600-h/aq_1.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 154px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SlsadsoI2nI/AAAAAAAACoE/o_N6X3lQnXQ/s320/aq_1.JPG" alt="" id="BLOGGER_PHOTO_ID_5357905279185377906" border="0" /&gt;&lt;/a&gt;Open the Foreign Server so we can configure this AQ server.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/Slse7hF2YvI/AAAAAAAACoU/hdViQDXnNJs/s1600-h/aq_3.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 310px; height: 320px;" src="http://2.bp.blogspot.com/_earSixbe3dw/Slse7hF2YvI/AAAAAAAACoU/hdViQDXnNJs/s320/aq_3.JPG" alt="" id="BLOGGER_PHOTO_ID_5357910189531357938" border="0" /&gt;&lt;/a&gt;Change JNDI Initial Context Factory to oracle.jms.AQjmsInitialContextFactory and  we have to provide the jndi datasource name in the JNDI Properties field, For Example datasource=jdbc/scottDS&lt;br /&gt;&lt;br /&gt;Create a JMS connection factory&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SlsgLso4OUI/AAAAAAAACoc/tckLFue9Zpg/s1600-h/aq_4.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 171px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SlsgLso4OUI/AAAAAAAACoc/tckLFue9Zpg/s320/aq_4.JPG" alt="" id="BLOGGER_PHOTO_ID_5357911567020603714" border="0" /&gt;&lt;/a&gt;As local JNDI name you can choose what you like. For Remote you have to choose one of these values. QueueConnectionFactory, TopicConnectionFactory, ConnectionFactory, XAQueueConnectionFactory, XATopicConnectionFactory or XAConnectionFactory&lt;br /&gt;&lt;br /&gt;Now we can create a new Destination.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SlsjgD5Vg8I/AAAAAAAACok/1MumzYY-hEg/s1600-h/aq_5.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 188px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SlsjgD5Vg8I/AAAAAAAACok/1MumzYY-hEg/s320/aq_5.JPG" alt="" id="BLOGGER_PHOTO_ID_5357915215395914690" border="0" /&gt;&lt;/a&gt;As Local JNDI name you can choose any  name but as Remote JNDI it needs to start with Queues or Topics after that add a / with the database queue or topic name.&lt;br /&gt;&lt;br /&gt;We are ready to use this AQ Queue in a Soa Suite Composite application. Where we will use the JMS adapter.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SlsqPi_qi5I/AAAAAAAACo8/bJ3zyzQvkJo/s1600-h/aq_6.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 140px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SlsqPi_qi5I/AAAAAAAACo8/bJ3zyzQvkJo/s320/aq_6.JPG" alt="" id="BLOGGER_PHOTO_ID_5357922628267576210" border="0" /&gt;&lt;/a&gt;Select Oracle Advanced Queuing as OEMS&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SlsqPDPVvRI/AAAAAAAACo0/39iXiPjiSTY/s1600-h/aq_7.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 266px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SlsqPDPVvRI/AAAAAAAACo0/39iXiPjiSTY/s320/aq_7.JPG" alt="" id="BLOGGER_PHOTO_ID_5357922619743386898" border="0" /&gt;&lt;/a&gt;and select the Foreign Server Destination.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SlsqO3kf4OI/AAAAAAAACos/uq2BfZ-CF7o/s1600-h/aq_8.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 289px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SlsqO3kf4OI/AAAAAAAACos/uq2BfZ-CF7o/s320/aq_8.JPG" alt="" id="BLOGGER_PHOTO_ID_5357922616610906338" border="0" /&gt;&lt;/a&gt;For more Weblogic AQ JMS details see the&lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/e13738/aq_jms.htm#JMSAD565"&gt; official documentation&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-2724665957690308288?l=biemond.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/2724665957690308288/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=2724665957690308288" title="10 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/2724665957690308288?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/2724665957690308288?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/fy7bKUBPjP8/using-aq-jms-text-message-in-wls-1031.html" title="Using AQ ( JMS Text message ) in WLS 10.3.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/SlsadsoI2nI/AAAAAAAACoE/o_N6X3lQnXQ/s72-c/aq_1.JPG" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">10</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/07/using-aq-jms-text-message-in-wls-1031.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE4ASH09eip7ImA9WxJVF0Q.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-3050876784652935952</id><published>2009-07-05T12:45:00.006+02:00</published><updated>2009-07-05T13:22:29.362+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-05T13:22:29.362+02: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 web applications and Oracle Enterprise Manager a perfect match</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/k_eGooGDlE-tls6IwxdGHqGaU0U/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/k_eGooGDlE-tls6IwxdGHqGaU0U/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/k_eGooGDlE-tls6IwxdGHqGaU0U/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/k_eGooGDlE-tls6IwxdGHqGaU0U/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;In the release of Oracle Fusion Middleware 11g the old Enterprise manager website is back. And this EM website is the bomb for ADF web applications. ( Well done) . In FMW11g EM you can off course do the standard things like deploy and undeploy, but Oracle added some extra to this site. You can now the measure performance of your ADF BC applications modules, Servlets , Web application and Task Flows. Change or tune the BC4J config parameters , change MDS or security settings ( add WSM policies ) or change the endpoint of your web service client.&lt;br /&gt;Too bad this EM website is not available in the internal WLS of JDeveloper 11g ( It can be handy for performance tuning).&lt;br /&gt;But we can install weblogic 10.3.1 and add the ADF Runtime and EM website to this WebLogic Domain. For this we need to download Application Development Runtime&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SlCIqRB9HwI/AAAAAAAACn0/K45ymYWDuj8/s1600-h/adf_em_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 41px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SlCIqRB9HwI/AAAAAAAACn0/K45ymYWDuj8/s320/adf_em_2.png" alt="" id="BLOGGER_PHOTO_ID_5354930216651005698" border="0" /&gt;&lt;/a&gt;Create a new WebLogic Domain and enable the Oracle Enterprise Manager / JRF options&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SlCIqA5BrWI/AAAAAAAACns/FLoZPHJ_OQs/s1600-h/adf_em_3.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/SlCIqA5BrWI/AAAAAAAACns/FLoZPHJ_OQs/s320/adf_em_3.png" alt="" id="BLOGGER_PHOTO_ID_5354930212318588258" border="0" /&gt;&lt;/a&gt;When you want to deploy your ADF application to this WLS server then you probably missing some java libraries. To solve this change your war deployment so the required jars are added to the web-inf/lib.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SlCIhygVMaI/AAAAAAAACnk/MQHIISvxx0Q/s1600-h/adf_em_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 226px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SlCIhygVMaI/AAAAAAAACnk/MQHIISvxx0Q/s320/adf_em_4.png" alt="" id="BLOGGER_PHOTO_ID_5354930071017959842" border="0" /&gt;&lt;/a&gt;We need to deploy the ear and not the war else the adf connections and security settings are not deployed. You can only deploy the ear from the application menu.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SlCIhqiRc6I/AAAAAAAACnc/OGVxsycBH_Y/s1600-h/adf_em_5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 242px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SlCIhqiRc6I/AAAAAAAACnc/OGVxsycBH_Y/s320/adf_em_5.png" alt="" id="BLOGGER_PHOTO_ID_5354930068878619554" border="0" /&gt;&lt;/a&gt;Here is a picture of the EM website  ( http://localhost:7001/em ) where we can see our ADF applications&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SlCIhRqCI6I/AAAAAAAACnU/ehHYItS_MFI/s1600-h/adf_em_6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 213px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SlCIhRqCI6I/AAAAAAAACnU/ehHYItS_MFI/s320/adf_em_6.png" alt="" id="BLOGGER_PHOTO_ID_5354930062200284066" border="0" /&gt;&lt;/a&gt;Overview of the deployed ADF application.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SlCIhL4E8NI/AAAAAAAACnM/R6zfKNrGmlY/s1600-h/adf_em_7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 162px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SlCIhL4E8NI/AAAAAAAACnM/R6zfKNrGmlY/s320/adf_em_7.png" alt="" id="BLOGGER_PHOTO_ID_5354930060648575186" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;we can go the ADF settings by selecting ADF menu option&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SlCIgs0JIwI/AAAAAAAACnE/Er8HO19Po3Y/s1600-h/adf_em_8.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 280px; height: 320px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SlCIgs0JIwI/AAAAAAAACnE/Er8HO19Po3Y/s320/adf_em_8.png" alt="" id="BLOGGER_PHOTO_ID_5354930052310573826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Here we can see the ADF BC AM performance&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SlCIXAwB46I/AAAAAAAACm8/57Yq84tcY-E/s1600-h/adf_em_9.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 142px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SlCIXAwB46I/AAAAAAAACm8/57Yq84tcY-E/s320/adf_em_9.png" alt="" id="BLOGGER_PHOTO_ID_5354929885863338914" border="0" /&gt;&lt;/a&gt;Overview of the Task Flow performance&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SlCIWqcCboI/AAAAAAAACm0/-RY6IqxqKhk/s1600-h/adf_em_10.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 248px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SlCIWqcCboI/AAAAAAAACm0/-RY6IqxqKhk/s320/adf_em_10.png" alt="" id="BLOGGER_PHOTO_ID_5354929879873908354" border="0" /&gt;&lt;/a&gt;We can change the BC4J configuration properties.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SlCIWeMAgdI/AAAAAAAACms/UN20O5icQI4/s1600-h/adf_em_11.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 302px; height: 320px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SlCIWeMAgdI/AAAAAAAACms/UN20O5icQI4/s320/adf_em_11.png" alt="" id="BLOGGER_PHOTO_ID_5354929876585447890" border="0" /&gt;&lt;/a&gt;My application has a web service client and here we can change the endpoint or add some WS-Security policies.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SlCIWQNthsI/AAAAAAAACmk/mP0BCQH5hZg/s1600-h/adf_em_12.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 115px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SlCIWQNthsI/AAAAAAAACmk/mP0BCQH5hZg/s320/adf_em_12.png" alt="" id="BLOGGER_PHOTO_ID_5354929872834496194" border="0" /&gt;&lt;/a&gt;And off course see the total ADF application performance.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SlCIWAK63dI/AAAAAAAACmc/CNtHcf4ACK8/s1600-h/adf_em_13.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 146px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SlCIWAK63dI/AAAAAAAACmc/CNtHcf4ACK8/s320/adf_em_13.png" alt="" id="BLOGGER_PHOTO_ID_5354929868527820242" 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-3050876784652935952?l=biemond.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/3050876784652935952/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=3050876784652935952" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/3050876784652935952?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/3050876784652935952?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/Db3iGFVAngM/adf-web-applications-and-oracle.html" title="ADF web applications and Oracle Enterprise Manager a perfect match" /><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/SlCIqRB9HwI/AAAAAAAACn0/K45ymYWDuj8/s72-c/adf_em_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/07/adf-web-applications-and-oracle.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8DQX8ycSp7ImA9WxJVFk0.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-3429263846255456774</id><published>2009-07-02T19:00:00.003+02:00</published><updated>2009-07-03T08:34:30.199+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-03T08:34:30.199+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g" /><category scheme="http://www.blogger.com/atom/ns#" term="MDS" /><title>Customize and personalize your JSF pages with MDS / FMW 11G</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/TayxzLRxKpxhkFZ7pfIunj23GaU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TayxzLRxKpxhkFZ7pfIunj23GaU/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/TayxzLRxKpxhkFZ7pfIunj23GaU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TayxzLRxKpxhkFZ7pfIunj23GaU/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/2008/07/customize-and-personalize-your-jsf.html"&gt;previous post&lt;/a&gt; ( TP4 ) I already showed how you an application user can personalize the JSF pages of the ADF 11G application and that ADF will persists these username, role or site changes in a file or database. In TP4 I had to configure MDS manually. With the July release of JDeveloper 11g we can do this with a few wizards.&lt;br /&gt;&lt;br /&gt;First we need to enable Customizations the viewcontroller project options. Enable User and Seeded Customizations&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SkzEI84cvKI/AAAAAAAACmU/Ahy4w8ffuuU/s1600-h/adf_mds_1.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 229px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SkzEI84cvKI/AAAAAAAACmU/Ahy4w8ffuuU/s320/adf_mds_1.JPG" alt="" id="BLOGGER_PHOTO_ID_5353869715097566370" border="0" /&gt;&lt;/a&gt;Open the adf-config.xml where we have to select the type of customization. We can choose user , role or site. You can always make your own customization class and select this class instead of the default options.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SkzEIpcXFMI/AAAAAAAACmM/WZFBf52Z0Eg/s1600-h/adf_mds_2.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 157px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SkzEIpcXFMI/AAAAAAAACmM/WZFBf52Z0Eg/s320/adf_mds_2.JPG" alt="" id="BLOGGER_PHOTO_ID_5353869709879481538" border="0" /&gt;&lt;/a&gt;I choose for UserCC, this means I need to enable and configure ADF Security&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SkzEIeEoyLI/AAAAAAAACmE/A4jW7_pEkLA/s1600-h/adf_mds_3.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 143px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SkzEIeEoyLI/AAAAAAAACmE/A4jW7_pEkLA/s320/adf_mds_3.JPG" alt="" id="BLOGGER_PHOTO_ID_5353869706827188402" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Select Tag Configuration and choose for example column. This mean the user can change the properties of a table column.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SkzEIEMBF1I/AAAAAAAACl8/0lk69tcpOJA/s1600-h/adf_mds_4.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 179px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SkzEIEMBF1I/AAAAAAAACl8/0lk69tcpOJA/s320/adf_mds_4.JPG" alt="" id="BLOGGER_PHOTO_ID_5353869699878819666" border="0" /&gt;&lt;/a&gt;In this case I want to enable that the user can change the column order and the width of the column.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SkzEHg8VafI/AAAAAAAACl0/TC5WD-cYv1E/s1600-h/adf_mds_5.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 191px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SkzEHg8VafI/AAAAAAAACl0/TC5WD-cYv1E/s320/adf_mds_5.JPG" alt="" id="BLOGGER_PHOTO_ID_5353869690417801714" border="0" /&gt;&lt;/a&gt;The last step is to configure MDS or the Metadata repository. for this we need to go the application properties.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SkzD-WR8DjI/AAAAAAAACls/eR9x6M_LA1Q/s1600-h/adf_mds_6.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 314px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SkzD-WR8DjI/AAAAAAAACls/eR9x6M_LA1Q/s320/adf_mds_6.JPG" alt="" id="BLOGGER_PHOTO_ID_5353869532936801842" border="0" /&gt;&lt;/a&gt;Make a new MAR deployment profile.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SkzD-GW5xbI/AAAAAAAAClk/RpGhGzG7YYY/s1600-h/adf_mds_7.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 229px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SkzD-GW5xbI/AAAAAAAAClk/RpGhGzG7YYY/s320/adf_mds_7.JPG" alt="" id="BLOGGER_PHOTO_ID_5353869528662656434" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SkzD9qZyagI/AAAAAAAAClc/qr4gJ1qOeJU/s1600-h/adf_mds_8.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 184px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SkzD9qZyagI/AAAAAAAAClc/qr4gJ1qOeJU/s320/adf_mds_8.JPG" alt="" id="BLOGGER_PHOTO_ID_5353869521158564354" border="0" /&gt;&lt;/a&gt;Select the MDS option where we can select the just created MAR profile.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SkzD9SYUkzI/AAAAAAAAClU/8P6spN4374Q/s1600-h/adf_mds_9.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 229px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SkzD9SYUkzI/AAAAAAAAClU/8P6spN4374Q/s320/adf_mds_9.JPG" alt="" id="BLOGGER_PHOTO_ID_5353869514709963570" border="0" /&gt;&lt;/a&gt;Finally we can run your ADF application and change the column order of a ADF table. We can see these changes on our file system.  ( JDEV_USER_HOME  JDeveloper\system11.1.1.1.33.54.07\o.mds.dt\adrs )&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SkzD9BirWeI/AAAAAAAAClM/WFy57fcZGLk/s1600-h/adf_mds_10.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 152px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SkzD9BirWeI/AAAAAAAAClM/WFy57fcZGLk/s320/adf_mds_10.JPG" alt="" id="BLOGGER_PHOTO_ID_5353869510189996514" 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-3429263846255456774?l=biemond.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/3429263846255456774/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=3429263846255456774" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/3429263846255456774?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/3429263846255456774?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/97oalyyEmQA/customize-and-personalize-your-jsf.html" title="Customize and personalize your JSF pages with MDS / FMW 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://2.bp.blogspot.com/_earSixbe3dw/SkzEI84cvKI/AAAAAAAACmU/Ahy4w8ffuuU/s72-c/adf_mds_1.JPG" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">7</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/07/customize-and-personalize-your-jsf.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8CQHc-fyp7ImA9WxJVFEs.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-147475878478848876</id><published>2009-07-01T18:51:00.011+02:00</published><updated>2009-07-01T19:21:01.957+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-01T19:21:01.957+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jdeveloper 11g soa suite" /><title>Unit Test your composite application with Test Suite in Soa Suite 11g</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/61xVgOyImyCmkD6iLtsKSjvbnXU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/61xVgOyImyCmkD6iLtsKSjvbnXU/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/61xVgOyImyCmkD6iLtsKSjvbnXU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/61xVgOyImyCmkD6iLtsKSjvbnXU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;With  the release of Soa Suite 11g you can make a unit tests to test your Soa Composite Application. In this blog I will show all the steps you have to do, to make a successfull unit test. For this I made a simple Composite application which retrieves the last name of an employee. The Composite application with an exposed BPEL process has EmployeeId as input and BPEL invokes a database adapter to get the Employee’s lastname and return this as response.&lt;br /&gt;First we start by making a XML schema with a input and response element&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SkuVY4svE-I/AAAAAAAACk8/hrxXQYnyxq8/s1600-h/testsuite_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 196px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SkuVY4svE-I/AAAAAAAACk8/hrxXQYnyxq8/s320/testsuite_1.png" alt="" id="BLOGGER_PHOTO_ID_5353536836829385698" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Add a BPEL process to the Composite xml and use the above XML schema as input and output and expose this BPEL as a webservice.  After this I created a Database adapter which has employeeId as input and returns the lastname of the employee. Add a wire between the BPEL process and the Database adapter so I can invoke this adapter in the BPEL process&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SkuVYnJDRNI/AAAAAAAACk0/3mRHWLyqLyI/s1600-h/testsuite_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 138px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SkuVYnJDRNI/AAAAAAAACk0/3mRHWLyqLyI/s320/testsuite_2.png" alt="" id="BLOGGER_PHOTO_ID_5353536832116311250" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Open the BPEL process and add the invoke operation. I use an assign operation to fill the input variable of the database adapter and an other assign operation to retrieve the lastname and add this to the response of the BPEL process&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SkuYDO7SsFI/AAAAAAAAClE/_UFgrRV-rXg/s1600-h/testsuite_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 258px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SkuYDO7SsFI/AAAAAAAAClE/_UFgrRV-rXg/s320/testsuite_3.png" alt="" id="BLOGGER_PHOTO_ID_5353539763373781074" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The employee Composite application is finished and now I can create a new Test Suite.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SkuVL882NII/AAAAAAAACks/wxCfqw5BQNM/s1600-h/testsuite_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 263px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SkuVL882NII/AAAAAAAACks/wxCfqw5BQNM/s320/testsuite_4.png" alt="" id="BLOGGER_PHOTO_ID_5353536614632404098" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The Test Suite creates a copy of the Composite xml.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SkuVLsKwvGI/AAAAAAAACkk/_LPUO-uvo4o/s1600-h/testsuite_5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 144px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SkuVLsKwvGI/AAAAAAAACkk/_LPUO-uvo4o/s320/testsuite_5.png" alt="" id="BLOGGER_PHOTO_ID_5353536610127363170" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Select the Exposed Service where we can create a new input request&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SkuVLQNftnI/AAAAAAAACkc/VI-k7xfN0KI/s1600-h/testsuite_6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 173px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SkuVLQNftnI/AAAAAAAACkc/VI-k7xfN0KI/s320/testsuite_6.png" alt="" id="BLOGGER_PHOTO_ID_5353536602622637682" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In this dialog I can generate a sample xml and change the EmployeeId with a real value&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SkuVLJVV01I/AAAAAAAACkU/w4dBiDfmOjI/s1600-h/testsuite_7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 261px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SkuVLJVV01I/AAAAAAAACkU/w4dBiDfmOjI/s320/testsuite_7.png" alt="" id="BLOGGER_PHOTO_ID_5353536600776495954" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Select the wire of the database adapter where we add a input and output assertion so the unit test can compare this to the adapter values&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SkuVLOlTIKI/AAAAAAAACkM/8FsDHcxao6M/s1600-h/testsuite_8.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 152px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SkuVLOlTIKI/AAAAAAAACkM/8FsDHcxao6M/s320/testsuite_8.png" alt="" id="BLOGGER_PHOTO_ID_5353536602185605282" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;First we create the input assert, use the generate Sample button and change the employeeId value&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SkuU6k6koGI/AAAAAAAACkE/GVGppE4JeD8/s1600-h/testsuite_9.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 283px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SkuU6k6koGI/AAAAAAAACkE/GVGppE4JeD8/s320/testsuite_9.png" alt="" id="BLOGGER_PHOTO_ID_5353536316122636386" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Do the same for the output of the Database adapter.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SkuU6dJf80I/AAAAAAAACj8/qA4Su83UIso/s1600-h/testsuite_10.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 303px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SkuU6dJf80I/AAAAAAAACj8/qA4Su83UIso/s320/testsuite_10.png" alt="" id="BLOGGER_PHOTO_ID_5353536314037760834" border="0" /&gt;&lt;/a&gt;Do the same for the exposed Service and the BPEL process&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SkuU6TrTe-I/AAAAAAAACj0/9DkV8lW9sk8/s1600-h/testsuite_11.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 170px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SkuU6TrTe-I/AAAAAAAACj0/9DkV8lW9sk8/s320/testsuite_11.png" alt="" id="BLOGGER_PHOTO_ID_5353536311495195618" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In this wire I want to compare the output of the BPEL process with the Callback Assert.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SkuU6E5rDUI/AAAAAAAACjs/EqzGDZxQfr0/s1600-h/testsuite_12.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 255px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SkuU6E5rDUI/AAAAAAAACjs/EqzGDZxQfr0/s320/testsuite_12.png" alt="" id="BLOGGER_PHOTO_ID_5353536307528928578" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now we only have to deploy the whole composite application. The just created Test Suite is part of this deployment.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SkuU58AguiI/AAAAAAAACjk/FF1Li_rx-Ks/s1600-h/testsuite_13.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 126px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SkuU58AguiI/AAAAAAAACjk/FF1Li_rx-Ks/s320/testsuite_13.png" alt="" id="BLOGGER_PHOTO_ID_5353536305141692962" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;To  test this unit test I have to go to the new improved EM website of the Soa Suite server where I can select the Employee Composite&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SkuUl5xvWyI/AAAAAAAACjU/TmNJCJL6-IU/s1600-h/testsuite_15.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 207px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SkuUl5xvWyI/AAAAAAAACjU/TmNJCJL6-IU/s320/testsuite_15.png" alt="" id="BLOGGER_PHOTO_ID_5353535960945482530" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Select the Unit Test tab of the Employee Composite and select the testcase and press the Execute Button&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SkuUmOXX4iI/AAAAAAAACjc/EUWvdDC2ufw/s1600-h/testsuite_14.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 84px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SkuUmOXX4iI/AAAAAAAACjc/EUWvdDC2ufw/s320/testsuite_14.png" alt="" id="BLOGGER_PHOTO_ID_5353535966472036898" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Take a look at the Test Runs to see the results of the test.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SkuUl2J0YWI/AAAAAAAACjM/Jb7PQ2qRUEM/s1600-h/testsuite_16.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 86px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SkuUl2J0YWI/AAAAAAAACjM/Jb7PQ2qRUEM/s320/testsuite_16.png" alt="" id="BLOGGER_PHOTO_ID_5353535959972733282" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;We can see the test4 is successfull and the assertions are succesfull too.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SkuUltFB87I/AAAAAAAACjE/AL_8HjtHGXE/s1600-h/testsuite_17.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 202px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SkuUltFB87I/AAAAAAAACjE/AL_8HjtHGXE/s320/testsuite_17.png" alt="" id="BLOGGER_PHOTO_ID_5353535957536732082" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Finally we can compare the expected and actual Value by selecting an assertion&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SkuUlRLbV7I/AAAAAAAACi8/kx3wKFtx9-4/s1600-h/testsuite_18.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 206px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SkuUlRLbV7I/AAAAAAAACi8/kx3wKFtx9-4/s320/testsuite_18.png" alt="" id="BLOGGER_PHOTO_ID_5353535950047369138" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;That’s all&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-147475878478848876?l=biemond.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/147475878478848876/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=147475878478848876" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/147475878478848876?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/147475878478848876?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/Y6VSfjjWLXA/unit-test-your-composite-application.html" title="Unit Test your composite application with Test Suite 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://4.bp.blogspot.com/_earSixbe3dw/SkuVY4svE-I/AAAAAAAACk8/hrxXQYnyxq8/s72-c/testsuite_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/07/unit-test-your-composite-application.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUFRnY4fCp7ImA9WxNVFEs.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-5899439396539566640</id><published>2009-06-24T20:55:00.017+02:00</published><updated>2009-10-25T11:23:37.834+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-25T11:23:37.834+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Service Bus" /><title>WS security in OSB</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Rnx6FmhdnF2i2tMkUZhFnTLarIY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Rnx6FmhdnF2i2tMkUZhFnTLarIY/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/Rnx6FmhdnF2i2tMkUZhFnTLarIY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Rnx6FmhdnF2i2tMkUZhFnTLarIY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;In OSB you can protect your WSDL proxy services with XML Signature / encryption, authentication or your own custom ws-policy. In this blog entry I will give you all the information how to do this.&lt;br /&gt;First we start by adding a standard OSB WS-Policy. Open the WSDL of a proxy service where we add for example the signing policy. We always need to add wsp:UsingPolicy element else OSB won't detect the wanted security policy&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;definitions targetNamespace="http://saml.ws.whitehorses.nl/"&lt;br /&gt;name="HelloWorldService" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"&lt;br /&gt;xmlns:tns="http://saml.ws.whitehorses.nl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&lt;br /&gt;xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"&amp;gt;&lt;br /&gt;&amp;lt;wsp:UsingPolicy wsdl:Required="true" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/&amp;gt;&lt;br /&gt;&amp;lt;types&amp;gt;&lt;br /&gt; &amp;lt;xsd:schema&amp;gt;&lt;br /&gt;  &amp;lt;xsd:import namespace="http://saml.ws.whitehorses.nl/" schemaLocation="Helloworld.xsd"/&amp;gt;&lt;br /&gt; &amp;lt;/xsd:schema&amp;gt;&lt;br /&gt;&amp;lt;/types&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Add the Signing policy to a operation or put this in a other part of the WSDL see &lt;a href="http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/security/ws_policy.html#wp1067934"&gt;this url&lt;/a&gt; for more information. In this case I can use wsp:Policy with a PolicyReference and the URI is policy:Sign.xml . If you want encryption then you can use policy:Encrypt.xml as URI or use policy:Auth.xml for ws authentication. Off course you can combine policies.&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;binding name="HelloWorldServiceSoapHttpPortBinding" type="tns:HelloWorldService"&amp;gt;&lt;br /&gt; &amp;lt;soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/&amp;gt;&lt;br /&gt; &amp;lt;operation name="sayHello"&amp;gt;&lt;br /&gt;       &amp;lt;wsp:Policy&amp;gt;&lt;br /&gt;         &amp;lt;wsp:PolicyReference URI="policy:Sign.xml"/&amp;gt;&lt;br /&gt;       &amp;lt;/wsp:Policy&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You don't have to use the OSB standard policies, you can also add your own ws-policy ( in OSB 10.3 you can only use the policy definition of WLS 9, so don't expect you can make policies which uses the 2005 or 2007 WS-Security standard). Here is a example of a custom policy.&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;&amp;lt;wsp:Policy wsu:Id="X509v3"&lt;br /&gt;xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"&lt;br /&gt;xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"&lt;br /&gt;xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"&amp;gt;&lt;br /&gt;&amp;lt;sp:InitiatorToken&amp;gt;&lt;br /&gt; &amp;lt;wsp:Policy&amp;gt;&lt;br /&gt;  &amp;lt;sp:X509Token&lt;br /&gt;   sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"&amp;gt;&lt;br /&gt;   &amp;lt;wsp:Policy&amp;gt;&lt;br /&gt;    &amp;lt;sp:RequireThumbprintReference /&amp;gt;&lt;br /&gt;    &amp;lt;sp:WssX509V3Token10 /&amp;gt;&lt;br /&gt;   &amp;lt;/wsp:Policy&amp;gt;&lt;br /&gt;  &amp;lt;/sp:X509Token&amp;gt;&lt;br /&gt; &amp;lt;/wsp:Policy&amp;gt;&lt;br /&gt;&amp;lt;/sp:InitiatorToken&amp;gt;&lt;br /&gt;&amp;lt;sp:RecipientToken&amp;gt;&lt;br /&gt; &amp;lt;wsp:Policy&amp;gt;&lt;br /&gt;  &amp;lt;sp:X509Token&lt;br /&gt;   sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never"&amp;gt;&lt;br /&gt;   &amp;lt;wsp:Policy&amp;gt;&lt;br /&gt;    &amp;lt;sp:RequireThumbprintReference /&amp;gt;&lt;br /&gt;    &amp;lt;sp:WssX509V3Token10 /&amp;gt;&lt;br /&gt;   &amp;lt;/wsp:Policy&amp;gt;&lt;br /&gt;  &amp;lt;/sp:X509Token&amp;gt;&lt;br /&gt; &amp;lt;/wsp:Policy&amp;gt;&lt;br /&gt;&amp;lt;/sp:RecipientToken&amp;gt;&lt;br /&gt;&amp;lt;sp:AlgorithmSuite&amp;gt;&lt;br /&gt; &amp;lt;wsp:Policy&amp;gt;&lt;br /&gt;  &amp;lt;sp:TripleDesRsa15 /&amp;gt;&lt;br /&gt; &amp;lt;/wsp:Policy&amp;gt;&lt;br /&gt;&amp;lt;/sp:AlgorithmSuite&amp;gt;&lt;br /&gt;&amp;lt;sp:Layout&amp;gt;&lt;br /&gt; &amp;lt;wsp:Policy&amp;gt;&lt;br /&gt;  &amp;lt;sp:Strict /&amp;gt;&lt;br /&gt; &amp;lt;/wsp:Policy&amp;gt;&lt;br /&gt;&amp;lt;/sp:Layout&amp;gt;&lt;br /&gt;&amp;lt;sp:IncludeTimestamp /&amp;gt;&lt;br /&gt;&amp;lt;sp:OnlySignEntireHeadersAndBody /&amp;gt;&lt;br /&gt;&amp;lt;/wsp:Policy&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The value of the wsu:Id attribute if important for the WS policy reference in the WSDL of the proxy service&lt;br /&gt;&lt;pre name="code" class="xml"&gt;&lt;br /&gt;&amp;lt;binding name="HelloWorldServiceSoapHttpPortBinding" type="tns:HelloWorldService"&amp;gt;&lt;br /&gt; &amp;lt;soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/&amp;gt;&lt;br /&gt; &amp;lt;operation name="sayHello"&amp;gt;&lt;br /&gt;       &amp;lt;wsp:Policy&amp;gt;&lt;br /&gt;         &amp;lt;wsp:PolicyReference URI="policy:X509v3"/&amp;gt;&lt;br /&gt;       &amp;lt;/wsp:Policy&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In this case the URI has policy:X509v3 as value&lt;br /&gt;&lt;br /&gt;The next step is to make some keystores for WebLogic and OSB. We need to create 509 v3 certificates and import these certificates in a java 1.6 keystore for signing and encryption.&lt;br /&gt;We need to have 509 version 3 certificates because we need the SubjectKeyIdentifier extension. This is only supported in version 3 of 509 and only OpenSSL can generate these certificates.&lt;br /&gt;&lt;br /&gt;You can use self signed v3 certificates, for more info see this &lt;a href="http://www.jroller.com/gmazza/date/20080805"&gt;Glen Mazza's weblog&lt;/a&gt;. I'll use a CA.&lt;br /&gt;#first make a CA request&lt;br /&gt;C:\tools\OpenSSL\bin\openssl genrsa -des3 -out C:\projecten\certs2\ca.key 4096 -rand random&lt;br /&gt;#self sign our CA certificate&lt;br /&gt;C:\tools\OpenSSL\bin\\openssl req -new -x509 -days 3650 -config C:\projecten\certs2\ca.conf -key C:\projecten\certs2\ca.key -out C:\projecten\certs2\ca.crt&lt;br /&gt;&lt;br /&gt;# make serial.txt file in C:\projecten\certs2\ and add 01 in this file&lt;br /&gt;&lt;br /&gt;# make an empty index.txt file in C:\projecten\certs2\&lt;br /&gt;&lt;br /&gt;Download the &lt;a href="http://www.sbsframes.nl/jdeveloper/ca.conf"&gt;ca.conf&lt;/a&gt; which will be used to sign the certificates&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# generate a server request and use servername with the domain name as common name CN&lt;br /&gt;c:\tools\openssl\bin\openssl genrsa -des3 -out C:\projecten\certs2\server.key 4096&lt;br /&gt;c:\tools\openssl\bin\openssl req -newkey rsa:1024 -nodes -keyout C:\projecten\certs2\server.key -out C:\projecten\certs2\server.csr -config C:\projecten\certs2\ca.conf&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# sign the server request with your CA key&lt;br /&gt;c:\tools\openssl\bin\openssl ca -in C:\projecten\certs2\server.csr -out C:\projecten\certs2\server.pem -keyfile C:\projecten\certs2\ca.key -cert c:\projecten\certs2\ca.crt -config C:\projecten\certs2\ca.conf&lt;br /&gt;&lt;br /&gt;# export server&lt;br /&gt;c:\tools\openssl\bin\openssl pkcs12 -export -inkey C:\projecten\certs2\server.key -in C:\projecten\certs2\server.pem -out C:\projecten\certs2\server.p12 -name server&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;C:\java\jdk160_05\bin\keytool -importkeystore -destkeystore C:\projecten\certs2\keystore.jks -deststorepass welcome -srckeystore C:\projecten\certs2\server.p12 -srcstorepass welcome -srcstoretype pkcs12&lt;br /&gt;C:\java\jdk160_05\bin\keytool -list -keystore C:\projecten\certs2\keystore.jks -storepass welcome&lt;br /&gt;C:\java\jdk160_05\bin\keytool -exportcert -alias server -storepass welcome -keystore C:\projecten\certs2\keystore.jks -file C:\projecten\certs2\server.cer&lt;br /&gt;C:\java\jdk160_05\bin\keytool -printcert -file C:\projecten\certs2\server.cer&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# generate client request&lt;br /&gt;c:\tools\openssl\bin\openssl genrsa -des3 -out C:\projecten\certs2\client.key 4096&lt;br /&gt;c:\tools\openssl\bin\openssl req -newkey rsa:1024 -nodes -keyout C:\projecten\certs2\client.key -out C:\projecten\certs2\client.csr -config C:\projecten\certs2\ca.conf&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# sign client request&lt;br /&gt;c:\tools\openssl\bin\openssl ca -in C:\projecten\certs2\client.csr -out C:\projecten\certs2\client.pem -keyfile C:\projecten\certs2\ca.key -cert c:\projecten\certs2\ca.crt -config C:\projecten\certs2\ca.conf&lt;br /&gt;&lt;br /&gt;# export client&lt;br /&gt;c:\tools\openssl\bin\openssl pkcs12 -export -inkey C:\projecten\certs2\client.key -in C:\projecten\certs2\client.pem -out C:\projecten\certs2\client.p12 -name client&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;C:\java\jdk160_05\bin\keytool -importkeystore -destkeystore C:\projecten\certs2\keystore.jks -deststorepass welcome -srckeystore C:\projecten\certs2\client.p12 -srcstorepass welcome -srcstoretype pkcs12&lt;br /&gt;C:\java\jdk160_05\bin\keytool -list -keystore C:\projecten\certs2\keystore.jks -storepass welcome&lt;br /&gt;C:\java\jdk160_05\bin\keytool -exportcert -alias client -storepass welcome -keystore C:\projecten\certs2\keystore.jks -file C:\projecten\certs2\client.cer&lt;br /&gt;C:\java\jdk160_05\bin\keytool -printcert -file C:\projecten\certs2\client.cer&lt;br /&gt;&lt;br /&gt;# make a truststore with the ca and the public keys&lt;br /&gt;C:\java\jdk160_05\bin\keytool -import -file c:\projecten\certs2\ca.crt -alias ca -trustcacerts -keystore C:\projecten\certs2\trust.jks -storepass welcome -keypass welcome&lt;br /&gt;C:\java\jdk160_05\bin\keytool -import -file C:\projecten\certs2\client.cer -alias client -keystore C:\projecten\certs2\trust.jks -storepass welcome -keypass welcome&lt;br /&gt;C:\java\jdk160_05\bin\keytool -import -file C:\projecten\certs2\server.cer -alias server -keystore C:\projecten\certs2\trust.jks -storepass welcome -keypass welcome&lt;br /&gt;C:\java\jdk160_05\bin\keytool -list -keystore C:\projecten\certs2\trust.jks -storepass welcome&lt;br /&gt;&lt;br /&gt;The next step is to configure Weblogic. First we add the new keystores and configure SSL and  add a new PKI Credential mapping provider. The PKI Credential mapping provider will be used by OSB for the XMLsignature and encryption. The trust keystore will be used to check if the signer certificate is trusted.&lt;br /&gt;Go to the OSB server in the WLS console&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SkPXE_OSfdI/AAAAAAAAChM/K1JVyFBnMdI/s1600-h/osb_sec_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SkPXE_OSfdI/AAAAAAAAChM/K1JVyFBnMdI/s320/osb_sec_1.png" alt="" id="BLOGGER_PHOTO_ID_5351357262937095634" border="0" /&gt;&lt;/a&gt;In the keystore tab we will add our keystores&lt;br /&gt;&lt;br /&gt;In the SSL tab  we will use the server certificate which has the server + domain name as Common name so Internet explorer won't complain that the certificate and server name does not match.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SkPXFcEZeRI/AAAAAAAAChc/ffltXxeR8ss/s1600-h/osb_sec_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 274px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SkPXFcEZeRI/AAAAAAAAChc/ffltXxeR8ss/s320/osb_sec_3.png" alt="" id="BLOGGER_PHOTO_ID_5351357270680238354" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Select the myrealm Security Realm where we will add a new PKI Credential Mapping provider&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SkPXFu0sLDI/AAAAAAAAChk/c86Cw5_FT6Y/s1600-h/osb_sec_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 272px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SkPXFu0sLDI/AAAAAAAAChk/c86Cw5_FT6Y/s320/osb_sec_4.png" alt="" id="BLOGGER_PHOTO_ID_5351357275714628658" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In the Providers tab we will create a new PKI Credential Mapping&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SkPXF3Gg_CI/AAAAAAAAChs/1BHgibjDdA0/s1600-h/osb_sec_5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 193px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SkPXF3Gg_CI/AAAAAAAAChs/1BHgibjDdA0/s320/osb_sec_5.png" alt="" id="BLOGGER_PHOTO_ID_5351357277936876578" border="0" /&gt;&lt;/a&gt;Select the just created PKI credential mapping and fill the values in the Provider Specific tab. Use the keystore and not the trust keystore for this&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SkPXJ2PuY-I/AAAAAAAACh0/zD9_k1z8YbE/s1600-h/osb_sec_6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 264px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SkPXJ2PuY-I/AAAAAAAACh0/zD9_k1z8YbE/s320/osb_sec_6.png" alt="" id="BLOGGER_PHOTO_ID_5351357346426545122" border="0" /&gt;&lt;/a&gt;We are finished in the Weblogic Console and we can go the OSB console where we have to create a new Service Key provider and configure the Proxy service so it uses this provider.&lt;br /&gt;&lt;br /&gt;Create a new Service Key provider. This how it looks like in the Workshop but this does not work because eclipse can't retrieve the certificates of the PKI credential mapping provider.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SkPaRVhgppI/AAAAAAAACiM/bZXg5z0Pek8/s1600-h/osb_sec_7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 108px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SkPaRVhgppI/AAAAAAAACiM/bZXg5z0Pek8/s320/osb_sec_7.png" alt="" id="BLOGGER_PHOTO_ID_5351360773616608914" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;So we have to use the OSB console to add the right certificate for signing and encryption to the Service Key Provider.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SkPaRNqzpeI/AAAAAAAACiE/8tawOpvTZO0/s1600-h/osb_sec_8.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 204px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SkPaRNqzpeI/AAAAAAAACiE/8tawOpvTZO0/s320/osb_sec_8.png" alt="" id="BLOGGER_PHOTO_ID_5351360771508119010" border="0" /&gt;&lt;/a&gt;Now we see the certificates of the Weblogic PKI Credential mapping. If you don't see this then probably you don't use 509 version 3 certifcates.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SkPaQxj8jaI/AAAAAAAACh8/2ESR7eCAlxs/s1600-h/osb_sec_9.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 154px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SkPaQxj8jaI/AAAAAAAACh8/2ESR7eCAlxs/s320/osb_sec_9.png" alt="" id="BLOGGER_PHOTO_ID_5351360763963149730" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The last step is to configure the proxy service. Here we have to disable XOP/MTOM support&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SkPdc_w1xsI/AAAAAAAACi0/IJ0fpe3Lrnk/s1600-h/osb_sec_10.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 196px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SkPdc_w1xsI/AAAAAAAACi0/IJ0fpe3Lrnk/s320/osb_sec_10.png" alt="" id="BLOGGER_PHOTO_ID_5351364272468641474" border="0" /&gt;&lt;/a&gt;And select the Service Key Provider&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SkPdcg5nIkI/AAAAAAAACis/hBaPJELCicw/s1600-h/osb_sec_11.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 168px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SkPdcg5nIkI/AAAAAAAACis/hBaPJELCicw/s320/osb_sec_11.png" alt="" id="BLOGGER_PHOTO_ID_5351364264183931458" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now we can test the proxy service by invoking the WS and selecting the Service Key Provider.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SkPc-Q5sMDI/AAAAAAAACik/8FQiYcJTzII/s1600-h/osb_sec_12.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 319px; height: 320px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SkPc-Q5sMDI/AAAAAAAACik/8FQiYcJTzII/s320/osb_sec_12.png" alt="" id="BLOGGER_PHOTO_ID_5351363744493219890" 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/SkPc-M7kR7I/AAAAAAAACic/4RDVdzSJk9k/s1600-h/osb_sec_13.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 253px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SkPc-M7kR7I/AAAAAAAACic/4RDVdzSJk9k/s320/osb_sec_13.png" alt="" id="BLOGGER_PHOTO_ID_5351363743427348402" border="0" /&gt;&lt;/a&gt;And this is how the WSDL with signing  looks like&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SkPc-EOzauI/AAAAAAAACiU/KB2kIxPbWiM/s1600-h/osb_sec_14.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 224px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SkPc-EOzauI/AAAAAAAACiU/KB2kIxPbWiM/s320/osb_sec_14.png" alt="" id="BLOGGER_PHOTO_ID_5351363741092113122" border="0" /&gt;&lt;/a&gt;That's all.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you want to use OSB 10.3 security with Soa Suite 11g R1 then you should read this 11g &lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/b32511/interop.htm#WSSEC2760"&gt;documentation&lt;/a&gt;, This explains how to change the OSB encrypt and sign policy so it works with FMW 11g.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-5899439396539566640?l=biemond.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/5899439396539566640/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=5899439396539566640" title="13 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/5899439396539566640?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/5899439396539566640?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/_b1AJckMz28/ws-security-in-osb.html" title="WS security in 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://3.bp.blogspot.com/_earSixbe3dw/SkPXE_OSfdI/AAAAAAAAChM/K1JVyFBnMdI/s72-c/osb_sec_1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">13</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/06/ws-security-in-osb.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0ANR3gyeip7ImA9WxJWEU0.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-5067600461146285095</id><published>2009-06-15T21:07:00.016+02:00</published><updated>2009-06-15T23:36:36.692+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-15T23:36:36.692+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="Oracle Service Bus" /><title>OSB &amp; ESB Performance comparison</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OqqhtrRc48ZoYbDSsC6wbmTD-38/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OqqhtrRc48ZoYbDSsC6wbmTD-38/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/OqqhtrRc48ZoYbDSsC6wbmTD-38/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OqqhtrRc48ZoYbDSsC6wbmTD-38/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;With the release of OSB 1.3.1 with JCA adapter support I can finally compare the OSB with the ESB. I will run this performance test on my Dell laptop ( Core2Duo T9400 2.53 GHz with 3,5 Gb memory ) and try to use the same components in the OSB and the ESB. For example I will use a memory JMS Queue in the Oracle Application server as starting point for the ESB and a file based JMS Queue in WLS as starting point for the OSB process. Both OSB and ESB processes has to fill the same four tables in the Oracle 11G database and they will use the same Toplink database mappings.&lt;br /&gt;For the test I will disable the JMS adapter in the ESB console or stop the queue consumption in the WLS console. Then fill the Queues and start the Service Bus processes . Before the test I will do some test runs so I know everything is alright and the Service Bus is warmed up.&lt;br /&gt;Here is a picture of the ESB process. This process reads the Queue and pass it asynchronous to the next Router. This message with a XML anytype element is transformed with XSLT to a specific message schema and the last Router transforms it to the database adapter XSD.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/Sjacp4NO3qI/AAAAAAAAChE/jTMhdE4jvVk/s1600-h/performance_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 284px;" src="http://2.bp.blogspot.com/_earSixbe3dw/Sjacp4NO3qI/AAAAAAAAChE/jTMhdE4jvVk/s320/performance_1.png" alt="" id="BLOGGER_PHOTO_ID_5347633850825498274" border="0" /&gt;&lt;/a&gt;The OSB process works almost the same as the ESB process but in the OSB I will use XQuery instead of XLST and use Proxy Services as Routers and a Business service as Database Adapter.&lt;br /&gt;Here you see a process schema of Messaging proxy service. It start with a PipelinePair to do some XSD validation on the incoming message. Then the Proxy Service determines the message type in in the RouteNode, do the first XQuery transformation to make the specific message XML and start the next specific Message Proxy Service.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SjacpvV6L9I/AAAAAAAACg0/xG2sUII0cpc/s1600-h/performance_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 224px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SjacpvV6L9I/AAAAAAAACg0/xG2sUII0cpc/s320/performance_3.png" alt="" id="BLOGGER_PHOTO_ID_5347633848445972434" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The specific message Proxy Service validates the XML and in the RouteNode ( Mapped to the JCA database adapter Business Service )  the next XQuery takes place, so the Business Service get the right XML for the Toplink database mapping.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/Sjacp9UpwSI/AAAAAAAACg8/-byNXXDgFP0/s1600-h/performance_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 182px; height: 320px;" src="http://1.bp.blogspot.com/_earSixbe3dw/Sjacp9UpwSI/AAAAAAAACg8/-byNXXDgFP0/s320/performance_2.png" alt="" id="BLOGGER_PHOTO_ID_5347633852198797602" border="0" /&gt;&lt;/a&gt;Here are my test results&lt;br /&gt;OSB 10.3.1 with JRocket JVM&lt;br /&gt;&lt;table style="width: 500px; height: 254px;" border="1" cellpadding="0" cellspacing="0"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Total Messages&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Size Message in KB&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Time in Seconds&lt;br /&gt;With validation&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Time in Seconds&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;10&lt;/td&gt;&lt;br /&gt;&lt;td&gt;1100&lt;/td&gt;&lt;br /&gt;&lt;td&gt;9&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;5&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;20&lt;/td&gt;&lt;br /&gt;&lt;td&gt;1100&lt;/td&gt;&lt;br /&gt;&lt;td&gt;19&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;18&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;10&lt;/td&gt;&lt;br /&gt;&lt;td&gt;2000&lt;/td&gt;&lt;br /&gt;&lt;td&gt;12&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;10&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;20&lt;/td&gt;&lt;br /&gt;&lt;td&gt;2000&lt;/td&gt;&lt;br /&gt;&lt;td&gt;35&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;28&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;10&lt;/td&gt;&lt;br /&gt;&lt;td&gt;2700&lt;/td&gt;&lt;br /&gt;&lt;td&gt;15&lt;/td&gt;&lt;br /&gt;&lt;td&gt;12&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;1000&lt;/td&gt;&lt;br /&gt;&lt;td&gt;4&lt;/td&gt;&lt;br /&gt;&lt;td&gt;19&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;ESB 10.1.3.4 MLR7&lt;br /&gt;&lt;table style="width: 500px; height: 254px;" border="1" cellpadding="0" cellspacing="0"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Total Messages&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Size Message in KB&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Time in Seconds&lt;br /&gt;With validation&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Time in Seconds&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;10&lt;/td&gt;&lt;br /&gt;&lt;td&gt;1100&lt;/td&gt;&lt;br /&gt;&lt;td&gt;15&lt;/td&gt;&lt;br /&gt;&lt;td&gt;14&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;20&lt;/td&gt;&lt;br /&gt;&lt;td&gt;1100&lt;/td&gt;&lt;br /&gt;&lt;td&gt;33&lt;/td&gt;&lt;br /&gt;&lt;td&gt;28&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;10&lt;/td&gt;&lt;br /&gt;&lt;td&gt;2000&lt;/td&gt;&lt;br /&gt;&lt;td&gt;23&lt;/td&gt;&lt;br /&gt;&lt;td&gt;18&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;20&lt;/td&gt;&lt;br /&gt;&lt;td&gt;2000&lt;/td&gt;&lt;br /&gt;&lt;td&gt;48&lt;/td&gt;&lt;br /&gt;&lt;td&gt;44&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;10&lt;/td&gt;&lt;br /&gt;&lt;td&gt;2700&lt;/td&gt;&lt;br /&gt;&lt;td&gt;35&lt;/td&gt;&lt;br /&gt;&lt;td&gt;28&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;1000&lt;/td&gt;&lt;br /&gt;&lt;td&gt;4&lt;/td&gt;&lt;br /&gt;&lt;td&gt;22&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Conclusion&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;The OSB is the overall winner with 15% a 90% better performance than the ESB. Off course this is  not the best testcase and there are other areas of the Service Bus where you can do tests for, but with this case the OSB is much faster especially with big messages ( even with JRockit ) . This OSB process does even more then the ESB process, the OSB process returns a message with the result of the database adapter and put this message in a WLS Queue.&lt;br /&gt;Don't know why OSB has a better performance, maybe Weblogic is faster or the ESB instance logging is the problem. In the next Soa Suite patchset 10.1.3.5, I can test the ESB processes on WebLogic server and compare this with these results.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-5067600461146285095?l=biemond.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/5067600461146285095/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=5067600461146285095" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/5067600461146285095?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/5067600461146285095?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/1-j_j3K5Who/osb-esb-performance-comparison.html" title="OSB &amp; ESB Performance comparison" /><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/Sjacp4NO3qI/AAAAAAAAChE/jTMhdE4jvVk/s72-c/performance_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/06/osb-esb-performance-comparison.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYGQ3czfCp7ImA9WxJXF08.&quot;"><id>tag:blogger.com,1999:blog-1839316484051079047.post-4499978683960482882</id><published>2009-06-11T00:15:00.013+02:00</published><updated>2009-06-11T14:42:02.984+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-11T14:42:02.984+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Service Bus" /><title>Using AQ in an OSB 10.3.1 Proxy Service</title><content type="html">
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9_u_lGKVaUzvWmordlj2cwGJbas/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9_u_lGKVaUzvWmordlj2cwGJbas/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/9_u_lGKVaUzvWmordlj2cwGJbas/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9_u_lGKVaUzvWmordlj2cwGJbas/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;In &lt;a href="http://biemond.blogspot.com/2009/06/osb-1031-with-database-adapter.html"&gt;my previous blogpost&lt;/a&gt; I already showed you how to use a JCA Database adapter in a Business Service. In this blog I will use the AQ resource adapter in a OSB 10.3.1 Proxy Service. To make this work I use the Oracle Workshop for the OSB configuration and JDeveloper 10.1.3.4 for AQ adapter configuration. I heard from Oracle that in one of the next 11g releases you can do this all in JDeveloper. &lt;br /&gt;We start in the WLS console of the OSB Server. Go to the deployments and find the AqAdapter resource adapter.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SjAxTOoXu1I/AAAAAAAACgs/qNOs0-qs_qg/s1600-h/aq_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 271px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SjAxTOoXu1I/AAAAAAAACgs/qNOs0-qs_qg/s320/aq_1.png" alt="" id="BLOGGER_PHOTO_ID_5345826964103478098" border="0" /&gt;&lt;/a&gt;Open the AqAdapter and select the configuration Tab where we will create a new outbound connection pool.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SjAxS8xpFpI/AAAAAAAACgk/0f7A81mF054/s1600-h/aq_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 181px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SjAxS8xpFpI/AAAAAAAACgk/0f7A81mF054/s320/aq_2.png" alt="" id="BLOGGER_PHOTO_ID_5345826959310526098" border="0" /&gt;&lt;/a&gt;Provide the JNDI name, I'll use the JDeveloper name convention. eis/AQ/xxxx , xxxx is the database connection name in JDeveloper.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SjAxSxpkW6I/AAAAAAAACgc/E8k-aHpOVSE/s1600-h/aq_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 149px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SjAxSxpkW6I/AAAAAAAACgc/E8k-aHpOVSE/s320/aq_3.png" alt="" id="BLOGGER_PHOTO_ID_5345826956323871650" border="0" /&gt;&lt;/a&gt;Give the resource adapter plan a unique name and save this AQ plan.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SjAxFq66sUI/AAAAAAAACgU/fpTwdA0JOEI/s1600-h/aq_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 273px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SjAxFq66sUI/AAAAAAAACgU/fpTwdA0JOEI/s320/aq_4.png" alt="" id="BLOGGER_PHOTO_ID_5345826731179290946" border="0" /&gt;&lt;/a&gt;Select the just created JDNI configuration.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_earSixbe3dw/SjAxFWTf7NI/AAAAAAAACgM/CrhbOtz1ris/s1600-h/aq_5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 310px;" src="http://3.bp.blogspot.com/_earSixbe3dw/SjAxFWTf7NI/AAAAAAAACgM/CrhbOtz1ris/s320/aq_5.png" alt="" id="BLOGGER_PHOTO_ID_5345826725645249746" border="0" /&gt;&lt;/a&gt;We have provide the xADatasourceName. This is a datasource of WLS which connects to a Oracle schema user which has access to the AQ queues. Or you can provide the jdbc url , username and password.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SjAxFQiYWPI/AAAAAAAACgE/1Vxfbi8iG30/s1600-h/aq_6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 120px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SjAxFQiYWPI/AAAAAAAACgE/1Vxfbi8iG30/s320/aq_6.png" alt="" id="BLOGGER_PHOTO_ID_5345826724097054962" border="0" /&gt;&lt;/a&gt;We are finished with the Weblogic configuration and we can switch to JDeveloper 10.1.3.4 where we will make the AQ configuration files which we have to import in our OSB project.&lt;br /&gt;Make a new ESB project where we will add the AQ adapter to the ESB configuration. The JNDI name in the AQ adapter wizard must match with the JNDI eis name of the AQ resource adapter in the WLS console.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SjAxFP36_ZI/AAAAAAAACf8/Bj5TNugsW5o/s1600-h/aq_7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 238px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SjAxFP36_ZI/AAAAAAAACf8/Bj5TNugsW5o/s320/aq_7.png" alt="" id="BLOGGER_PHOTO_ID_5345826723918970258" border="0" /&gt;&lt;/a&gt;This OSB proxy service read from the queue so we need to dequeue.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SjAxEyPKRBI/AAAAAAAACf0/9WL7HitywhA/s1600-h/aq_8.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 238px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SjAxEyPKRBI/AAAAAAAACf0/9WL7HitywhA/s320/aq_8.png" alt="" id="BLOGGER_PHOTO_ID_5345826715963376658" border="0" /&gt;&lt;/a&gt;Browse or provide the schema /queue name&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_earSixbe3dw/SjAwykaH9cI/AAAAAAAACfs/pjnPP3TJB90/s1600-h/aq_9.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 239px;" src="http://4.bp.blogspot.com/_earSixbe3dw/SjAwykaH9cI/AAAAAAAACfs/pjnPP3TJB90/s320/aq_9.png" alt="" id="BLOGGER_PHOTO_ID_5345826403013621186" border="0" /&gt;&lt;/a&gt;And select a XSD which matches with the AQ messages.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SjAwyQrN6II/AAAAAAAACfk/wsOmpCxPPEA/s1600-h/aq_10.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 238px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SjAwyQrN6II/AAAAAAAACfk/wsOmpCxPPEA/s320/aq_10.png" alt="" id="BLOGGER_PHOTO_ID_5345826397716605058" border="0" /&gt;&lt;/a&gt;Delete the router service we don't need this.&lt;br /&gt;&lt;br /&gt;The last part is to use this AQ queue in a OSB proxy service, Start the Oracle workshop and import AQ wsdl's and schema's into your OSB project.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SjAwyeUGWFI/AAAAAAAACfc/zA0E9ZyzweA/s1600-h/aq_11.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 318px; height: 166px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SjAwyeUGWFI/AAAAAAAACfc/zA0E9ZyzweA/s320/aq_11.png" alt="" id="BLOGGER_PHOTO_ID_5345826401377736786" border="0" /&gt;&lt;/a&gt;Create a new Proxy service and use the AQ WSDL. OSB will detect the JCA adapter configuration.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_earSixbe3dw/SjAwyOIrx7I/AAAAAAAACfU/QSl08IN3hC8/s1600-h/aq_12.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 182px;" src="http://2.bp.blogspot.com/_earSixbe3dw/SjAwyOIrx7I/AAAAAAAACfU/QSl08IN3hC8/s320/aq_12.png" alt="" id="BLOGGER_PHOTO_ID_5345826397034891186" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now we only have to provide the JNDI name in my case eis/AQ/xxxxx&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_earSixbe3dw/SjAwx32DV4I/AAAAAAAACfM/VHdAIktaSXU/s1600-h/aq_13.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 222px;" src="http://1.bp.blogspot.com/_earSixbe3dw/SjAwx32DV4I/AAAAAAAACfM/VHdAIktaSXU/s320/aq_13.png" alt="" id="BLOGGER_PHOTO_ID_5345826391051163522" border="0" /&gt;&lt;/a&gt;That's all for the AQ configuration.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1839316484051079047-4499978683960482882?l=biemond.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://biemond.blogspot.com/feeds/4499978683960482882/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=1839316484051079047&amp;postID=4499978683960482882" title="10 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/4499978683960482882?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1839316484051079047/posts/default/4499978683960482882?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/Java/OracleSoaBlog/~3/lDz27yag_Ak/using-aq-in-osb-1031-proxy-service.html" title="Using AQ in an OSB 10.3.1 Proxy 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://2.bp.blogspot.com/_earSixbe3dw/SjAxTOoXu1I/AAAAAAAACgs/qNOs0-qs_qg/s72-c/aq_1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">10</thr:total><feedburner:origLink>http://biemond.blogspot.com/2009/06/using-aq-in-osb-1031-proxy-service.html</feedburner:origLink></entry></feed>
