cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [CONF] Apache CXF Documentation > Configuration of the Bus
Date Thu, 10 May 2012 01:52:00 GMT
    <base href="">
            <link rel="stylesheet" href="/confluence/s/2042/9/1/_/styles/combined.css?spaceKey=CXF20DOC&amp;forWysiwyg=true"
<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="">Configuration
of the Bus</a></h2>
    <h4>Page <b>edited</b> by             <a href="">Daniel
                         <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
            <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>
    </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>
<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;ref bean=<span class="code-quote">"myLoggingInterceptor"</span>/&gt;

&lt;bean id=<span class="code-quote">"myLogHandler"</span> class=<span
<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 id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href=""
class="grey">Change Notification Preferences</a>
        <a href="">View
        <a href="">View
        <a href=";showCommentArea=true#addcomment">Add

View raw message