cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r1028294 - in /websites/production/cxf/content: cache/docs.pageCache docs/developing-a-service.html docs/features.html
Date Thu, 12 Apr 2018 09:57:35 GMT
Author: buildbot
Date: Thu Apr 12 09:57:35 2018
New Revision: 1028294

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    websites/production/cxf/content/docs/developing-a-service.html
    websites/production/cxf/content/docs/features.html

Modified: websites/production/cxf/content/cache/docs.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/cxf/content/docs/developing-a-service.html
==============================================================================
--- websites/production/cxf/content/docs/developing-a-service.html (original)
+++ websites/production/cxf/content/docs/developing-a-service.html Thu Apr 12 09:57:35 2018
@@ -118,11 +118,11 @@ Apache CXF -- Developing a Service
            <!-- Content -->
            <div class="wiki-content">
 <div id="ConfluenceContent"><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1523451415283 {padding: 0px;}
-div.rbtoc1523451415283 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1523451415283 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1523527016814 {padding: 0px;}
+div.rbtoc1523527016814 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1523527016814 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1523451415283">
+/*]]>*/</style></p><div class="toc-macro rbtoc1523527016814">
 <ul class="toc-indentation"><li><a shape="rect" href="#DevelopingaService-DevelopingaServiceusingJAX-WS">Developing
a Service using JAX-WS</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#DevelopingaService-WSDLFirstDevelopment">WSDL
First Development</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#DevelopingaService-GeneratingtheStartingPointCode">Generating
the Starting Point Code</a>
@@ -258,7 +258,7 @@ public interface QuoteReporter
   public Quote getQuote(String ticker);
 }
 </pre>
-</div></div><h5 id="DevelopingaService-DefiningParameterPropertieswithAnnotations">Defining
Parameter Properties with Annotations</h5><p>The method parameters in the SEI
correspond to the <code>wsdl:message</code> elements and their <code>wsdl:part</code>
elements. JAX-WS provides annotations that allow you to describe the <code>wsdl:part</code>
elements that are generated for the method parameters.</p><h5 id="DevelopingaService-The@WebParamannotation">The
<code>@WebParam</code> annotation</h5><p>The <code>@WebParam</code>
annotation is defined by the <code>javax.jws.WebParam</code> interface. It is
placed on the parameters on the methods defined in the SEI. The <code>@WebParam</code>
annotation allows you to specify the direction of the parameter, if the parameter will be
placed in the SOAP header, and other properties of the generated <code>wsdl:part</code>.</p><p>The
following table describes the properties of the <code>@WebParam</code> annotation.</p><div
class="table-wrap"><tab
 le class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Property</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Values</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>name</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Specifies the name of the parameter as it appears
in the WSDL. For RPC bindings, this is name of the <code>wsdl:part</code> representing
the parameter. For document bindings, this is the local name of the XML element representing
the parameter. Per the JAX-WS specification, the default is <em>argN</em>, where
<em>N</em> is replaced with the zero-based argument index (i.e., <em>arg0</em>,
<em>arg1</em>, etc.)</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>targetNamespace</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>&
 #160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies
the namespace for the parameter. It is only used with document bindings where the parameter
maps to an XML element. The defaults is to use the service's namespace.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>mode</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>Mode.IN</code> (default) <br
clear="none" class="atl-forced-newline"> <code>Mode.OUT</code><br clear="none"
class="atl-forced-newline"> <code>Mode.INOUT</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the direction of the parameter.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>header</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code> (default)
<br clear="none" class="atl-forced-newline"> <code>true</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Specifies if the parameter is passed
as part of the SOAP header.</p
 ></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>partName</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the value of the name attribute
of the <code>wsdl:part</code> element for the parameter when the binding is document.</p></td></tr></tbody></table></div><h5
id="DevelopingaService-The@WebResultannotation">The <code>@WebResult</code>
annotation</h5><p>The <code>@WebResult</code> annotation is defined
by the <code>javax.jws.WebResult</code> interface. It is placed on the methods
defined in the SEI. The <code>@WebResult</code> annotation allows you to specify
the properties of the generated <code>wsdl:part</code> that is generated for the
method's return value.</p><p>The following table describes the properties of the
<code>@WebResult</code> annotation.</p><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Prop
 erty</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>name</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Specifies the name of the return value as it
appears in the WSDL. For RPC bindings, this is name of the <code>wsdl:part</code>
representing the return value. For document bindings, this is the local name of the XML element
representing the return value. The default value is return.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>targetNamespace</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the namespace for the return
value. It is only used with document bindings where the return value maps to an XML element.
The defaults is to use the service's namespace.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>header</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Specifies if the return value is
passed as
  part of the SOAP header.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>partName</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Specifies the value of the name attribute of the <code>wsdl:part</code>
element for the return value when the binding is document.</p></td></tr></tbody></table></div><h5
id="DevelopingaService-Example.2">Example</h5><p>The next example shows an
SEI that is fully annotated.</p><p><span class="confluence-anchor-link" id="DevelopingaService-Example8"></span></p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader
pdl" style="border-bottom-width: 1px;"><b>Fully Annotated SEI</b></div><div
class="codeContent panelContent pdl">
+</div></div><h5 id="DevelopingaService-DefiningParameterPropertieswithAnnotations">Defining
Parameter Properties with Annotations</h5><p>The method parameters in the SEI
correspond to the <code>wsdl:message</code> elements and their <code>wsdl:part</code>
elements. JAX-WS provides annotations that allow you to describe the <code>wsdl:part</code>
elements that are generated for the method parameters.</p><h5 id="DevelopingaService-The@WebParamannotation">The
<code>@WebParam</code> annotation</h5><p>The <code>@WebParam</code>
annotation is defined by the <code>javax.jws.WebParam</code> interface. It is
placed on the parameters on the methods defined in the SEI. The <code>@WebParam</code>
annotation allows you to specify the direction of the parameter, if the parameter will be
placed in the SOAP header, and other properties of the generated <code>wsdl:part</code>.</p><p>The
following table describes the properties of the <code>@WebParam</code> annotation.</p><div
class="table-wrap"><tab
 le class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Property</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Values</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>name</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>&#160;</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Specifies the name of the parameter as it appears
in the WSDL. For RPC bindings, this is name of the <code>wsdl:part</code> representing
the parameter. For document bindings, this is the local name of the XML element representing
the parameter. Per the JAX-WS specification, the default is <em>argN</em>, where
<em>N</em> is replaced with the zero-based argument index (i.e., <em>arg0</em>,
<em>arg1</em>, etc.)</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>targetNamespace</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>&
 #160;</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies
the namespace for the parameter. It is only used with document bindings where the parameter
maps to an XML element. The default is to use the service's namespace.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>mode</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>Mode.IN</code> (default) <br
clear="none" class="atl-forced-newline"> <code>Mode.OUT</code><br clear="none"
class="atl-forced-newline"> <code>Mode.INOUT</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the direction of the parameter.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>header</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code> (default)
<br clear="none" class="atl-forced-newline"> <code>true</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Specifies if the parameter is passed
as part of the SOAP header.</p>
 </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>partName</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the value of the name attribute
of the <code>wsdl:part</code> element for the parameter when the binding is document.</p></td></tr></tbody></table></div><h5
id="DevelopingaService-The@WebResultannotation">The <code>@WebResult</code>
annotation</h5><p>The <code>@WebResult</code> annotation is defined
by the <code>javax.jws.WebResult</code> interface. It is placed on the methods
defined in the SEI. The <code>@WebResult</code> annotation allows you to specify
the properties of the generated <code>wsdl:part</code> that is generated for the
method's return value.</p><p>The following table describes the properties of the
<code>@WebResult</code> annotation.</p><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Prope
 rty</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>name</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Specifies the name of the return value as it
appears in the WSDL. For RPC bindings, this is name of the <code>wsdl:part</code>
representing the return value. For document bindings, this is the local name of the XML element
representing the return value. The default value is return.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>targetNamespace</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Specifies the namespace for the return
value. It is only used with document bindings where the return value maps to an XML element.
The defaults is to use the service's namespace.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>header</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Specifies if the return value is
passed as 
 part of the SOAP header.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>partName</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Specifies the value of the name attribute of the <code>wsdl:part</code>
element for the return value when the binding is document.</p></td></tr></tbody></table></div><h5
id="DevelopingaService-Example.2">Example</h5><p>The next example shows an
SEI that is fully annotated.</p><p><span class="confluence-anchor-link" id="DevelopingaService-Example8"></span></p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader
pdl" style="border-bottom-width: 1px;"><b>Fully Annotated SEI</b></div><div
class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">package
org.apache.cxf;
 
 import javax.jws.*;

Modified: websites/production/cxf/content/docs/features.html
==============================================================================
--- websites/production/cxf/content/docs/features.html (original)
+++ websites/production/cxf/content/docs/features.html Thu Apr 12 09:57:35 2018
@@ -32,8 +32,8 @@
 <link type="text/css" rel="stylesheet" href="/resources/highlighter/styles/shThemeCXF.css">
 
 <script src='/resources/highlighter/scripts/shCore.js'></script>
-<script src='/resources/highlighter/scripts/shBrushXml.js'></script>
 <script src='/resources/highlighter/scripts/shBrushJava.js'></script>
+<script src='/resources/highlighter/scripts/shBrushXml.js'></script>
 <script>
   SyntaxHighlighter.defaults['toolbar'] = false;
   SyntaxHighlighter.all();
@@ -117,24 +117,26 @@ Apache CXF -- Features
          <td height="100%">
            <!-- Content -->
            <div class="wiki-content">
-<div id="ConfluenceContent"><h1 id="Features-FeaturesinCXF">Features in CXF</h1><p>A
Feature in CXF is a way of adding capabilities to a Server, Client or Bus. For example, you
could add the ability to log messages for each of these objects, by configuring them with
a LoggingFeature. To implement a Feature, you must subclass AbstractFeature below. By default
the initialize methods all delegate to initializeProvider(InterceptorProvider), so if you're
simply adding interceptors to a Server, Client, or Bus, this allows you to add them easily.</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public
abstract class AbstractFeature {
+<div id="ConfluenceContent"><h1 id="Features-FeaturesinCXF">Features in CXF</h1><p>A
Feature in CXF is a way of adding capabilities to a Server, Client or Bus. For example, you
could add the ability to log messages for each of these objects, by configuring them with
a LoggingFeature. To implement a Feature, you must subclass <a shape="rect" class="external-link"
href="https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/feature/AbstractFeature.java"
rel="nofollow">AbstractFeature</a> below. By default the initialize methods all delegate
to initializeProvider(InterceptorProvider), so if you're simply adding interceptors to a Server,
Client, or Bus, this allows you to add them easily.</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public
abstract class AbstractFeature extends WebServiceFeature implements Feature {
+    public String getID() {
+        return getClass().getName();
+    }
     public void initialize(Server server, Bus bus) {
         initializeProvider(server.getEndpoint(), bus);
     }
-
     public void initialize(Client client, Bus bus) {
         initializeProvider(client, bus);
     }
-
+    public void initialize(InterceptorProvider interceptorProvider, Bus bus) {
+        initializeProvider(interceptorProvider, bus);
+    }
     public void initialize(Bus bus) {
         initializeProvider(bus, bus);
     }
-
     protected void initializeProvider(InterceptorProvider provider, Bus bus) {
-        // you could customized the interceptors in the provider here
+        // you could customize the interceptors in the provider here
     }
-
     /**
      * Convenience method to extract a feature by type from an active list.
      *
@@ -142,11 +144,11 @@ Apache CXF -- Features
      * @param type the feature type required
      * @return the feature of the specified type if active
      */
-    public static &lt;T&gt; T getActive(List&lt;AbstractFeature&gt; features,
+    public static &lt;T&gt; T getActive(List&lt;? extends Feature&gt; features,
                                   Class&lt;T&gt; type) {
         T active = null;
         if (features != null) {
-            for (AbstractFeature feature : features) {
+            for (Feature feature : features) {
                 if (type.isInstance(feature)) {
                     active = type.cast(feature);
                     break;
@@ -156,9 +158,8 @@ Apache CXF -- Features
         return active;
     }
 }
-
 </pre>
-</div></div><h1 id="Features-WritingandconfiguringtheFeature">Writing and
configuring the Feature</h1><p>CXF provides several features to configure commonly
used capabilities, such as logging, failover, policies, addressing, and reliable messaging.
You can go to the <a shape="rect" href="featureslist.html">FeaturesList</a> for
more information.</p><h2 id="Features-WritingaFeature">Writing a Feature</h2><p>It
is very easy to write a new feature; your feature just needs to extends the AbstractFeature
and implement initializeProvider or write customizing code for configuring client or server
interceptors. Here is an example for implementing the logging feature.</p><div class="code
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h1 id="Features-WritingandconfiguringtheFeature">Writing and
configuring the Feature</h1><p>CXF provides several features to configure commonly
used capabilities, such as logging, failover, policies, addressing, and reliable messaging.
You can go to the <a shape="rect" href="featureslist.html">FeaturesList</a> for
more information.</p><h2 id="Features-WritingaFeature">Writing a Feature</h2><p>It
is very easy to write a new feature; your feature just needs to extends the&#160;<a
shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/feature/AbstractFeature.java"
rel="nofollow">AbstractFeature</a> and implement initializeProvider or write customizing
code for configuring client or server interceptors. Here is an example for implementing the
logging feature.</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">public
class LoggingFeature extends AbstractFeature {
     private static final int DEFAULT_LIMIT = 100 * 1024;
     private static final LoggingInInterceptor IN = new LoggingInInterceptor(DEFAULT_LIMIT);
@@ -201,13 +202,12 @@ Apache CXF -- Features
 }
 </pre>
 </div></div><h2 id="Features-AddingaFeatureprogrammatically">Adding a Feature
programmatically</h2><p>To add the feature to both server and client, you can
use the Feature annotation on the service class</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">  
 @org.apache.cxf.feature.Features (features = "org.apache.cxf.jaxws.service.AnnotationFeature")
-    public class HelloServiceImpl implements HelloService {
-        public String sayHi() {
-            return "HI";
-        }
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">@org.apache.cxf.feature.Features
(features = "org.apache.cxf.jaxws.service.AnnotationFeature")
+public class HelloServiceImpl implements HelloService {
+    public String sayHi() {
+        return "HI";
     }
-
+}
 </pre>
 </div></div><p>You can also add the feature to the server by using ServerFactoryBean,
or the client by using the ClientFactoryBean</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">import
org.apache.cxf.frontend.ServerFactoryBean;
@@ -222,7 +222,6 @@ serverFactoryBean.setFeatures(new ArrayL
 ClientFactoryBean clientFactoryBean = new ClientFactoryBean();
 clientFactoryBean.setFeatures(new ArrayList().add(myFeature));
 ...
-
 </pre>
 </div></div><h2 id="Features-AddingaFeaturethroughconfiguration">Adding
a Feature through configuration</h2><p>Here are some examples on using configuration
files to add features. You can find more information about the CXF provides features at <a
shape="rect" href="featureslist.html">FeaturesList</a>.</p><div class="code
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">&lt;beans
xmlns="http://www.springframework.org/schema/beans"
@@ -233,7 +232,8 @@ clientFactoryBean.setFeatures(new ArrayL
 http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
 http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"&gt;
-    &lt;!-- adding the feature to the bus--&gt;
+
+   &#160;&lt;!-- adding the feature to the bus--&gt;
     &lt;cxf:bus&gt;
         &lt;cxf:features&gt;
             &lt;cxf:logging/&gt;



Mime
View raw message