summaryrefslogtreecommitdiffstats
path: root/site/trunk/site-publish/documentation-2x/sca-java-definitionsxml.html
diff options
context:
space:
mode:
Diffstat (limited to 'site/trunk/site-publish/documentation-2x/sca-java-definitionsxml.html')
-rw-r--r--site/trunk/site-publish/documentation-2x/sca-java-definitionsxml.html271
1 files changed, 271 insertions, 0 deletions
diff --git a/site/trunk/site-publish/documentation-2x/sca-java-definitionsxml.html b/site/trunk/site-publish/documentation-2x/sca-java-definitionsxml.html
new file mode 100644
index 0000000000..6474cfcd7f
--- /dev/null
+++ b/site/trunk/site-publish/documentation-2x/sca-java-definitionsxml.html
@@ -0,0 +1,271 @@
+
+
+
+
+
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+ <HEAD>
+ <META name="description" content="Apache Tuscany">
+ <META name="keywords" content="apache, apache tuscany, tuscany, service, services, fabric, soa, service oriented architecture, sca, service component architecture, das, sdo, csa, ruby, opensource">
+
+ <LINK type="text/css" rel="stylesheet" href="http://tuscany.apache.org/stylesheets/default.css">
+ <LINK rel="SHORTCUT ICON" href="https://cwiki.apache.org/confluence/display/TUSCANYxDOCx2x/$images/favicon.ico">
+ <TITLE>SCA Java definitions.xml : Apache Tuscany</TITLE>
+ <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+
+ <STYLE>
+ .spacetree * ul {
+ padding-left:0px;
+ margin-left: 0px;
+ }
+ .spacetree * li {
+ margin-left: 5px;
+ padding-left:5px;
+ }
+ </STYLE>
+
+ <BODY onload="init()">
+ <!-- topNav -->
+ <TABLE border="0" cellpadding="2" cellspacing="0" width="100%">
+ <TR class="topBar">
+ <TD align="left" valign="middle" class="topBarDiv" align="left" nowrap="">
+ <A href="https://cwiki.apache.org/geronimo"> Home</A> &gt;&nbsp;<A href="index.html" title="Apache Tuscany Docs 2.x">Apache Tuscany Docs 2.x</A>&nbsp;&gt;&nbsp;<A href="index.html" title="Index">Index</A>&nbsp;&gt;&nbsp;<A href="sca-java-extensions-guide.html" title="SCA Java Extensions Guide">SCA Java Extensions Guide</A>&nbsp;&gt;&nbsp;<A href="" title="SCA Java definitions.xml">SCA Java definitions.xml</A>
+ </TD>
+ <TD align="right" valign="middle" nowrap="">
+ <FORM name="search" action="http://www.google.com/search" method="get">
+ <INPUT type="hidden" name="ie" value="UTF-8">
+ <INPUT type="hidden" name="oe" value="UTF-8">
+ <INPUT type="hidden" name="domains" value="">
+ <INPUT type="hidden" name="sitesearch" value="">
+ <INPUT type="text" name="q" maxlength="255" value="">
+ <INPUT type="submit" name="btnG" value="Google Search">
+ </FORM>
+ </TD>
+ </TR>
+ </TABLE>
+
+
+ <TABLE border="0" cellpadding="2" cellspacing="0" width="100%">
+ <TR class="topBar">
+ <TD align="left" valign="middle" class="topBarDiv" nowrap="true" width="100%">
+ &nbsp;<A href="index.html" title="Apache Tuscany Docs 2.x">Apache Tuscany Docs 2.x</A>&nbsp;&gt;&nbsp;<A href="index.html" title="Index">Index</A>&nbsp;&gt;&nbsp;<A href="sca-java-extensions-guide.html" title="SCA Java Extensions Guide">SCA Java Extensions Guide</A>&nbsp;&gt;&nbsp;<A href="" title="SCA Java definitions.xml">SCA Java definitions.xml</A>
+ </TD>
+
+ <TD align="right" valign="middle" class="topBarDiv" align="left" nowrap="true">
+ <A href="http://tuscany.apache.org/">Tuscany Home</A> | <A href="http://mail-archives.apache.org/mod_mbox/tuscany-user">User List</A> | <A href="http://mail-archives.apache.org/mod_mbox/tuscany-dev">Dev List</A> | <A href="http://issues.apache.org/jira/browse/Tuscany">Issue Tracker</A>&nbsp;&nbsp;
+ </TD>
+ </TR>
+ </TABLE>
+
+ <TABLE border="0" cellpadding="0" width="100%" bgcolor="#FFFFFF">
+ <TR>
+ <TD valign="top" align="left" width="22%" bgcolor="#F9F9F9" class="noprint">
+ <DIV class="tabletitle">Table of Contents</DIV>
+ <DIV class="spacetree">
+
+
+ </DIV>
+ </TD>
+ <TD align="left" valign="top" width="78%">
+ <!-- pageContent -->
+ <DIV id="PageContent">
+ <DIV class="pageheader" style="padding: 6px 0px 0px 0px;">
+ <!-- We'll enable this once we figure out how to access (and save) the logo resource -->
+ <!--img src="http://geronimo.apache.org/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
+ <DIV style="margin: 0px 10px 0px 10px" class="smalltext">Apache Tuscany Docs 2.x</DIV>
+ <DIV style="margin: 0px 10px 8px 10px" class="pagetitle">SCA Java definitions.xml</DIV>
+
+ <DIV class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
+<!-- -->
+ <A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=5964975">
+ <IMG src="http://geronimo.apache.org/images/icons/notep_16.gif" height="16" width="16" border="0" align="absmiddle" title="Edit Page"></A>
+ <A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=5964975">Edit Page</A>
+ &nbsp;
+ <A href="https://cwiki.apache.org/confluence/pages/listpages.action?key=TUSCANYxDOCx2x">
+ <IMG src="http://geronimo.apache.org/images/icons/browse_space.gif" height="16" width="16" border="0" align="absmiddle" title="Browse Space"></A>
+ <A href="https://cwiki.apache.org/confluence/pages/listpages.action?key=TUSCANYxDOCx2x">Browse Space</A>
+ &nbsp;
+ <A href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=TUSCANYxDOCx2x&fromPageId=5964975">
+ <IMG src="http://geronimo.apache.org/images/icons/add_page_16.gif" height="16" width="16" border="0" align="absmiddle" title="Add Page"></A>
+ <A href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=TUSCANYxDOCx2x&fromPageId=5964975">Add Page</A>
+ &nbsp;
+ <A href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=TUSCANYxDOCx2x&fromPageId=5964975">
+ <IMG src="http://geronimo.apache.org/images/icons/add_blogentry_16.gif" height="16" width="16" border="0" align="absmiddle" title="Add News"></A>
+ <A href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=TUSCANYxDOCx2x&fromPageId=5964975">Add News</A>
+<!-- -->
+ </DIV>
+ </DIV>
+
+ <DIV class="pagecontent">
+ <DIV class="wiki-content">
+ <H1><A name="SCAJavadefinitions.xml-definitions.xml"></A>definitions.xml</H1>
+
+<P>Section 1.8 describes the definitions.xml file as holding all of the artifacts that are useful for configuring an SCA domain but that are not specific to a particular composite or component. It goes on to say that &quot;All of these artifacts within and SCA Domain are defined in a global, SCA Domain-wide file named definitions.xml&quot;. To achieve our extensibility goals we, in Tuscany, consider the SCA Domain wide definitions.xml file to be a logical concept that is constructed at runtime from the contents of definitions.xml files provided in contributions and in Tuscany extensions. </P>
+
+<P>Each definitions.xml file may contain.</P>
+
+<UL>
+ <LI>Intents</LI>
+ <LI>Policy sets</LI>
+ <LI>Predefined binding specifications</LI>
+ <LI>Binding type descriptions</LI>
+ <LI>Implementation type descriptions</LI>
+</UL>
+
+
+<H2><A name="SCAJavadefinitions.xml-CompleteFeatures"></A>Complete Features</H2>
+
+<H3><A name="SCAJavadefinitions.xml-AddIntentsandPolicySetswithanExtension"></A>Add Intents and Policy Sets with an Extension</H3>
+
+<P>An extension, such as the modules/policy-security extension relies on some policy sets and intents being available in the SCA Domain. The definitions.xml is the place to define these and hence if you look in this extension module you will find the following. </P>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+&lt;definitions xmlns=<SPAN class="code-quote">&quot;http:<SPAN class="code-comment">//www.osoa.org/xmlns/sca/1.0&quot;</SPAN>
+</SPAN> targetNamespace=<SPAN class="code-quote">&quot;http:<SPAN class="code-comment">//www.osoa.org/xmlns/sca/1.0&quot;</SPAN>
+</SPAN> xmlns:sca=<SPAN class="code-quote">&quot;http:<SPAN class="code-comment">//www.osoa.org/xmlns/sca/1.0&quot;</SPAN>
+</SPAN> xmlns:tuscany=<SPAN class="code-quote">&quot;http:<SPAN class="code-comment">//tuscany.apache.org/xmlns/sca/1.0&quot;</SPAN>&gt;
+</SPAN>
+ &lt;!-- POLICY SETS --&gt;
+ &lt;policySet name=<SPAN class="code-quote">&quot;runAs&quot;</SPAN> appliesTo=<SPAN class="code-quote">&quot;sca:implementation.java&quot;</SPAN>/&gt;
+ &lt;policySet name=<SPAN class="code-quote">&quot;allow&quot;</SPAN> appliesTo=<SPAN class="code-quote">&quot;sca:implementation.java&quot;</SPAN>/&gt;
+ &lt;policySet name=<SPAN class="code-quote">&quot;rolesAllowed&quot;</SPAN> appliesTo=<SPAN class="code-quote">&quot;sca:implementation.java&quot;</SPAN>/&gt;
+ &lt;policySet name=<SPAN class="code-quote">&quot;permitAll&quot;</SPAN> appliesTo=<SPAN class="code-quote">&quot;sca:implementation.java&quot;</SPAN>/&gt;
+ &lt;policySet name=<SPAN class="code-quote">&quot;denyAll&quot;</SPAN> appliesTo=<SPAN class="code-quote">&quot;sca:implementation.java&quot;</SPAN>/&gt;
+
+ &lt;!-- Policy Intents Defined by the SCA <SPAN class="code-object">Runtime</SPAN> --&gt;
+ &lt;intent name=<SPAN class="code-quote">&quot;authentication&quot;</SPAN>
+ constrains=<SPAN class="code-quote">&quot;sca:binding&quot;</SPAN>&gt;
+ &lt;description&gt;
+ Specifying <SPAN class="code-keyword">this</SPAN> intent on references requires necessary authentication information
+ to be sent along with outgoing messages. Specifying <SPAN class="code-keyword">this</SPAN> intent on service requires
+ incoming messages to be authenticated
+ &lt;/description&gt;
+ &lt;/intent&gt;
+
+ &lt;intent name=<SPAN class="code-quote">&quot;confidentiality&quot;</SPAN>
+ constrains=<SPAN class="code-quote">&quot;sca:binding&quot;</SPAN>&gt;
+ &lt;description&gt;
+ Specifying <SPAN class="code-keyword">this</SPAN> intent requires message exchanged to be encrypted
+ &lt;/description&gt;
+ &lt;/intent&gt;
+
+ &lt;intent name=<SPAN class="code-quote">&quot;integrity&quot;</SPAN>
+ constrains=<SPAN class="code-quote">&quot;sca:binding&quot;</SPAN>&gt;
+ &lt;description&gt;
+ Specifying <SPAN class="code-keyword">this</SPAN> intent requires message exchanged to be signed
+ &lt;/description&gt;
+ &lt;/intent&gt;
+&lt;/definitions&gt;
+</PRE>
+</DIV></DIV>
+
+<P>When this module is loaded at runtime the contents of this file are made generally available and hence in you composite you can use statements such at. </P>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+
+&lt;component name=<SPAN class="code-quote">&quot;CalculatorServiceComponent&quot;</SPAN>&gt;
+ &lt;implementation.java class=<SPAN class="code-quote">&quot;calculator.CalculatorServiceImpl&quot;</SPAN>/&gt;
+ &lt;reference name=<SPAN class="code-quote">&quot;addService&quot;</SPAN> &gt;
+ &lt;<SPAN class="code-keyword">interface</SPAN>.java <SPAN class="code-keyword">interface</SPAN>=<SPAN class="code-quote">&quot;calculator.AddService&quot;</SPAN> /&gt;
+ &lt;binding.ws uri=<SPAN class="code-quote">&quot;http:<SPAN class="code-comment">//localhost:8080/sample-calculator-ws-secure-webapp/AddServiceComponent&quot;</SPAN>
+</SPAN> requires=<SPAN class="code-quote">&quot;authentication&quot;</SPAN> /&gt;
+ &lt;/reference&gt;
+&lt;/component&gt;
+</PRE>
+</DIV></DIV>
+
+<P>Where <TT>requires=&quot;authentication&quot;</TT> refers to <TT>intent name=&quot;authentication&quot;</TT> which is now available as an SCA Domain level definition.</P>
+
+<H2><A name="SCAJavadefinitions.xml-TODOFeatures"></A>TODO Features</H2>
+
+<H3><A name="SCAJavadefinitions.xml-AddIntentsandPolicySetswithaContribution"></A>Add Intents and Policy Sets with a Contribution</H3>
+
+<P>If contributionA provides a file such as:</P>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+&lt;sca:definitions xmlns=<SPAN class="code-quote">&quot;http:<SPAN class="code-comment">//www.osoa.org/xmlns/sca/1.0&quot;</SPAN>
+</SPAN> targetNamespace=<SPAN class="code-quote">&quot;http:<SPAN class="code-comment">//tuscany.apache.org/xmlns/sca/1.0&quot;</SPAN>
+</SPAN> xmlns:sca=<SPAN class="code-quote">&quot;http:<SPAN class="code-comment">//www.osoa.org/xmlns/sca/1.0&quot;</SPAN>
+</SPAN> xmlns:tuscany=<SPAN class="code-quote">&quot;http:<SPAN class="code-comment">//tuscany.apache.org/xmlns/sca/1.0&quot;</SPAN>&gt;
+</SPAN>
+&lt;sca:intent name=<SPAN class="code-quote">&quot;specialAuthentication&quot;</SPAN>
+ constrains=<SPAN class="code-quote">&quot;sca:binding.ws&quot;</SPAN>&gt;
+ &lt;description&gt;
+ Communitcation thro <SPAN class="code-keyword">this</SPAN> binding required Authentication.
+ &lt;/description&gt;
+&lt;/sca:intent&gt;
+
+&lt;/sca:definitions&gt;
+</PRE>
+</DIV></DIV>
+
+<P>and ContributionB provides a file such as:</P>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+&lt;sca:policySet name=<SPAN class="code-quote">&quot;specialAuthenticationPolicy&quot;</SPAN>
+ provides=<SPAN class="code-quote">&quot;tuscany:wsAuthentication&quot;</SPAN>
+ appliesTo=<SPAN class="code-quote">&quot;<SPAN class="code-comment">//sca:binding.ws&quot;</SPAN>&gt;
+</SPAN> &lt;tuscany:wsConfigParam&gt;
+ &lt;parameter name=<SPAN class="code-quote">&quot;OutflowSecurity&quot;</SPAN>&gt;
+ &lt;action&gt;
+ &lt;items&gt;UsernameToken&lt;/items&gt;
+ &lt;user&gt;TuscanyWsUser&lt;/user&gt;
+ &lt;passwordCallbackClass&gt;my.PWCBHandler&lt;/passwordCallbackClass&gt;&quot;
+ &lt;passwordType&gt;PasswordText&lt;/passwordType&gt;
+ &lt;/action&gt;
+ &lt;/parameter&gt;
+ &lt;/tuscany:wsConfigParam&gt;
+&lt;/sca:policySet&gt;
+</PRE>
+</DIV></DIV>
+
+<P>Then both the itent and the policySet should be available in the logical SCA Domain-wide definitions.xml and the policySet &quot;specialAuthenticationPolicy&quot; should successfully find the intent &quot;tuscany:wsAuthentication&quot;. Composite files contributed to the domain will successfully be able to reference both the intent and the policy set. </P>
+
+<P>See: </P>
+
+<P><A href="https://issues.apache.org/jira/browse/TUSCANY-2499" class="external-link" rel="nofollow">https://issues.apache.org/jira/browse/TUSCANY-2499</A><BR>
+<A href="http://www.mail-archive.com/dev@tuscany.apache.org/msg01077.html" class="external-link" rel="nofollow">http://www.mail-archive.com/dev%40tuscany.apache.org/msg01077.html</A></P>
+ </DIV>
+
+ </DIV>
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+
+ <!-- footer -->
+ <TABLE border="0" cellpadding="2" cellspacing="0" width="100%">
+ <TR>
+ <TD align="left" valign="middle" class="footer">
+ &nbsp;&nbsp;
+ <IMG src="http://static.delicious.com/img/delicious.small.gif" height="10" width="10" alt="Delicious">
+ <A href="http://delicious.com/save" onclick="window.open('http://delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title),'delicious','toolbar=no,width=550,height=550'); return false;">Bookmark this on Delicious</A>
+ &nbsp;&nbsp;
+ <IMG src="http://digg.com/img/badges/16x16-digg-guy.gif" width="16" height="16" alt="Digg!">
+ <A href="" onclick="window.open('http://digg.com/submit?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)+'&topic=programming');">Digg this</A>
+ <!-- Slicker, but no text
+ <script type="text/javascript">
+ digg_skin = 'icon';
+ digg_window = 'new';
+ digg_title = 'Apache Geronimo v2.2 Documentation : SCA Java definitions.xml';
+ digg_topic = 'programming';
+ </script>
+ <script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
+ -->
+ &nbsp;&nbsp;
+ </TD>
+ <TD align="right" valign="middle" class="footer">
+ <A href="http://cwiki.apache.org/GMOxPMGT/geronimo-privacy-policy.html">Privacy Policy</A>&nbsp;&nbsp;-&nbsp;&nbsp;
+ Copyright &copy; 2003-2010, The Apache Software Foundation, Licensed under <A href="http://www.apache.org/licenses/LICENSE-2.0">ASL 2.0.</A>&nbsp;&nbsp;
+ </TD>
+ </TR>
+ </TABLE>
+
+ </BODY>
+</HTML> \ No newline at end of file