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 > Configuration of the Bus
Date Thu, 10 May 2012 01:52:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/1/_/styles/combined.css?spaceKey=CXF20DOC&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/CXF20DOC/Configuration+of+the+Bus">Configuration
of the Bus</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~dkulp">Daniel
Kulp</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >For example, by replacing the bus
bean defined in {{cxf.xml}} with this bean in your configuration file: <br>{code} <br></td></tr>
            <tr><td class="diff-changed-lines" >&lt;bean id=&quot;cxf&quot;
<span class="diff-changed-words">class=&quot;org.apache.cxf.bus.spring.SpringBus<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">Impl</span>&quot;&gt;</span>
<br></td></tr>
            <tr><td class="diff-unchanged" >    &lt;property name=&quot;outInterceptors&quot;&gt;
<br>           &lt;list&gt; <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>By creating a bus with your own bean configuration file, i.e. using the factory
method </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">SpringBeanFactory.createBus(<span class="code-quote">"mycxf.xml"</span>)</pre>
</div></div>
<p> you can complement or overwrite the bean definitions that CXF would use by default.
In this case <tt>mycxf.xml</tt> must be on the classpath, but you can also use
a factory method taking a URL that points to your bean configuration file.</p>

<p>For example, by replacing the bus bean defined in <tt>cxf.xml</tt> with
this bean in your configuration file:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;bean id=<span class="code-quote">"cxf"</span> class=<span class="code-quote">"org.apache.cxf.bus.spring.SpringBus"</span>&gt;
    &lt;property name=<span class="code-quote">"outInterceptors"</span>&gt;
           &lt;list&gt;
              &lt;ref bean=<span class="code-quote">"myLoggingInterceptor"</span>/&gt;
           &lt;/list&gt;
        &lt;/property&gt;
&lt;/bean&gt;

&lt;bean id=<span class="code-quote">"myLogHandler"</span> class=<span
class="code-quote">"org.mycompany.com.cxf.logging.LoggingInterceptor"</span>&gt;
    ...
&lt;/bean&gt;
</pre>
</div></div>
<p>the constructed bus will use a list of out interceptors consisting of your LoggingInterceptor
(the default list of out interceptors at the bus level is empty).</p>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/CXF20DOC/Configuration+of+the+Bus">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=46351&revisedVersion=3&originalVersion=2">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/CXF20DOC/Configuration+of+the+Bus?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message