cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache CXF Documentation > Annotations
Date Fri, 14 Aug 2009 14:53:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CXF20DOC&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/CXF20DOC/Annotations">Annotations</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~dkulp">Daniel
Kulp</a>
    </h4>
     
          <br/>
     <div class="notificationGreySide">
         <p>CXF provides several custom annotations that can be used to configure and
customize the CXF runtime.</p>

<h3><a name="Annotations-org.apache.cxf.feature.Features"></a>org.apache.cxf.feature.Features</h3>
<p>The @Features annotation is used to add <a href="/confluence/display/CXF20DOC/Features"
title="Features">Features</a>.   See the <a href="/confluence/display/CXF20DOC/FeaturesList"
title="FeaturesList">FeaturesList</a> for the list of Features we provide "out of
the box", but you can easily create your own.   In many cases, however, those features have
Annotations themselves which can be used and provide greater control over configuration.</p>

<h3><a name="Annotations-org.apache.cxf.interceptor.InInterceptors%2C%5C%5Corg.apache.cxf.interceptor.OutInterceptors%2C%5C%5Corg.apache.cxf.interceptor.OutFaultInterceptors%2C%5C%5Corg.apache.cxf.interceptor.InFaultInterceptors"></a>org.apache.cxf.interceptor.InInterceptors,
<br clear="all" /> org.apache.cxf.interceptor.OutInterceptors, <br clear="all" />
org.apache.cxf.interceptor.OutFaultInterceptors, <br clear="all" /> org.apache.cxf.interceptor.InFaultInterceptors</h3>
<p>Add interceptors to the various chains used to process messages.  See <a href="/confluence/display/CXF20DOC/Interceptors"
title="Interceptors">Interceptors</a> for more detail.</p>


<h3><a name="Annotations-org.apache.cxf.annotations.WSDLDocumentation%5C%5Corg.apache.cxf.annotations.WSDLDocumentationCollection"></a>org.apache.cxf.annotations.WSDLDocumentation
<br clear="all" /> org.apache.cxf.annotations.WSDLDocumentationCollection</h3>
<p>For "java first" scenarios where the WSDL is derived from the Java interfaces/code,
these annotations allow adding wsd:documentation elements to various locations in the generated
wsdl.  </p>

<p>For example:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
@WebService
@WSDLDocumentationCollection(
    {
        @WSDLDocumentation(<span class="code-quote">"My portType documentation"</span>),
        @WSDLDocumentation(value = <span class="code-quote">"My top level documentation"</span>,
                           placement = WSDLDocumentation.Placement.TOP),
        @WSDLDocumentation(value = <span class="code-quote">"My binding doc"</span>,
                           placement = WSDLDocumentation.Placement.BINDING)
    }
)
<span class="code-keyword">public</span> <span class="code-keyword">interface</span>
MyService {

    @WSDLDocumentation(<span class="code-quote">"The docs <span class="code-keyword">for</span>
echoString"</span>)
    <span class="code-object">String</span> echoString(<span class="code-object">String</span>
s);

}
</pre>
</div></div>

<h3><a name="Annotations-org.apache.cxf.annotations.SchemaValidation"></a>org.apache.cxf.annotations.SchemaValidation</h3>
<p>Turns on SchemaValidation for messages.   By default, for performance reasons, CXF
does not validate message against the schema.   By turning on validation, problems with messages
not matching the schema are easier to determine.</p>


<h3><a name="Annotations-org.apache.cxf.annotations.DataBinding"></a>org.apache.cxf.annotations.DataBinding</h3>
<p>Sets the DataBinding class that is associated with the service.   By default, CXF
assumes you are using the JAXB data binding.   However, CXF supports different databindings
such as XMLBeans, Aegis, SDO, and possibly more.   This annotation can be used in place of
configuration to select the databinding class.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
@DataBinding(org.apache.cxf.sdo.SDODataBinding.class)
<span class="code-keyword">public</span> <span class="code-keyword">interface</span>
MyService {
    <span class="code-keyword">public</span> commonj.sdo.DataObject echoStruct(
        commonj.sdo.DataObject struct
    );
}
</pre>
</div></div>

<h3><a name="Annotations-org.apache.cxf.annotations.Logging"></a>org.apache.cxf.annotations.Logging</h3>

<h3><a name="Annotations-org.apache.cxf.annotations.GZIP"></a>org.apache.cxf.annotations.GZIP</h3>

<h3><a name="Annotations-org.apache.cxf.annotations.FastInfoset"></a>org.apache.cxf.annotations.FastInfoset</h3>

     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/CXF20DOC/Annotations">View
Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=2330263&revisedVersion=3&originalVersion=2">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/CXF20DOC/Annotations?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message