cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r1014314 - in /websites/production/cxf/content: cache/docs.pageCache docs/maven-cxf-codegen-plugin-wsdl-to-java.html
Date Wed, 21 Jun 2017 07:47:46 GMT
Author: buildbot
Date: Wed Jun 21 07:47:46 2017
New Revision: 1014314

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    websites/production/cxf/content/docs/maven-cxf-codegen-plugin-wsdl-to-java.html

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

Modified: websites/production/cxf/content/docs/maven-cxf-codegen-plugin-wsdl-to-java.html
==============================================================================
--- websites/production/cxf/content/docs/maven-cxf-codegen-plugin-wsdl-to-java.html (original)
+++ websites/production/cxf/content/docs/maven-cxf-codegen-plugin-wsdl-to-java.html Wed Jun
21 07:47:46 2017
@@ -232,14 +232,14 @@ Apache CXF -- Maven cxf-codegen-plugin (
       <wsdlOption>
        <wsdlArtifact>
         <groupId>org.apache.pizza</groupId>
-	<artifactId>PizzaService</artifactId>
-	<version>1.0.0</version>
+	    <artifactId>PizzaService</artifactId>
+	    <version>1.0.0</version>
        </wsdlArtifact>
       </wsdlOption>
      </wsdlOptions>
     </configuration>
 </pre>
-</div></div><p>This will load the wsdl /org/apache/pizza/PizzaService-1.0.0.wsdl
into your local maven repository and generate java code from it.</p><h3 id="Mavencxf-codegen-plugin(WSDLtoJava)-Example7:Usingxjcextensions">Example
7: Using xjc extensions</h3><p>Standard JAXB command-line customizations can be
added via &lt;extraarg&gt; elements, either one per line or comma separated. CXF also
offers some JAXB extensions for the code generation. They have to be added as dependencies
and then activated by using an extraarg with content -xjc-X&lt;extension id&gt;</p><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh"><p>artifact id</p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p>description</p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p>extension id</p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>cxf-xjc-boolean</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Adds ge
 tters for booleans</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>boolean</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>cxf-xjc-bug671</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Workaroung for JAXB bug 671</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>bug671</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>cxf-xjc-dv</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Default value support</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>dv</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>cxf-xjc-ts</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Adds toString to objects</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>ts</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>cxf-xjc-wsdlextension</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>WsdlExtension support</p></td><td
colspan="1" rowspan="1" class="co
 nfluenceTd"><p>wsdlextension</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>jaxb-fluent-api</p></td><th colspan="1"
rowspan="1" class="confluenceTh"><p>Fluent API for setters</p></th><td
colspan="1" rowspan="1" class="confluenceTd"><p>fluent-api</p></td></tr></tbody></table></div><p>An
example showing attachment of a JAXB binding file and the CXF toString() extension is below:</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
+</div></div><p>This will load the wsdl /org/apache/pizza/PizzaService-1.0.0.wsdl
into your local maven repository and generate java code from it.</p><h3 id="Mavencxf-codegen-plugin(WSDLtoJava)-Example7:Usingxjcextensions">Example
7: Using xjc extensions</h3><p>Standard JAXB command-line customizations can be
added via &lt;extraarg&gt; elements, either one per line or comma separated. <a
shape="rect" href="../xjc-utils.html">CXF also offers some JAXB extensions for the code
generation</a>. They have to be added as dependencies and then activated by using an
extraarg with content -xjc-X&lt;extension id&gt;</p><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>artifact
id</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>description</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>extension id</p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>cxf-xjc-boolean</p></td><td
colspan="1
 " rowspan="1" class="confluenceTd"><p>Adds getters for booleans</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>boolean</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>cxf-xjc-bug671</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Workaroung for JAXB bug 671</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>bug671</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>cxf-xjc-dv</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Default value support</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>dv</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>cxf-xjc-ts</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>Adds toString to objects</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>ts</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>cxf-xjc-wsdlextension</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>WsdlExtension support<
 /p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>wsdlextension</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>jaxb-fluent-api</p><p>(<img
class="emoticon emoticon-warning" src="https://cwiki.apache.org/confluence/s/en_GB/5997/6f42626d00e36f53fe51440403446ca61552e2a2.1/_/images/icons/emoticons/warning.png"
data-emoticon-name="warning" alt="(warning)"> not part of CXF:</p><p>group
id is net.java.dev.jaxb2-commons)</p></td><td colspan="1" rowspan="1" class="confluenceTd">Fluent
API for setters</td><td colspan="1" rowspan="1" class="confluenceTd">fluent-api</td></tr></tbody></table></div><p>An
example showing attachment of a JAXB binding file and the CXF toString() extension is below:</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
 <pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;plugin&gt;
 &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
 &lt;artifactId&gt;cxf-codegen-plugin&lt;/artifactId&gt;
@@ -253,7 +253,6 @@ Apache CXF -- Maven cxf-codegen-plugin (
         &lt;wsdlOption&gt;
           &lt;wsdl&gt;${basedir}/src/main/resources/wsdl/myService.wsdl&lt;/wsdl&gt;
           &lt;extraargs&gt;
-            &lt;extraarg&gt;-xjc-b,binding.xjb&lt;/extraarg&gt;
             &lt;extraarg&gt;-xjc-Xts&lt;/extraarg&gt;
           &lt;/extraargs&gt; 
         &lt;/wsdlOption&gt;
@@ -268,11 +267,17 @@ Apache CXF -- Maven cxf-codegen-plugin (
     &lt;dependency&gt;
         &lt;groupId&gt;org.apache.cxf.xjcplugins&lt;/groupId&gt;
         &lt;artifactId&gt;cxf-xjc-ts&lt;/artifactId&gt;
-        &lt;version&gt;${cxf.version}&lt;/version&gt;
+        &lt;version&gt;${cxf-xjc.version}&lt;/version&gt;
      &lt;/dependency&gt;
 &lt;/dependencies&gt;
 &lt;/plugin&gt;
 </pre>
+</div></div><p>In addition you need to add the cxf-xjc-runtime as a dependency
to your project:</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;dependency&gt;
+   &lt;groupId&gt;org.apache.cxf.xjc-utils&lt;/groupId&gt;
+   &lt;artifactId&gt;cxf-xjc-runtime&lt;/artifactId&gt;
+   &lt;version&gt;${cxf-xjc.version}&lt;/version&gt;
+&lt;/dependency&gt;</pre>
 </div></div><h3 id="Mavencxf-codegen-plugin(WSDLtoJava)-Example8-UsingJAXB/JAX-WS2.2withJava6">Example
8 - Using JAXB/JAX-WS 2.2 with Java 6</h3><p>Java 6 includes JAXB/JAX-WS 2.1 API's
and a 2.1 implementations. However, sometimes it's desirable to use JAXB or JAX-WS 2.2 instead
to obtain various bug fixes and enhancements. Using 2.2 with Java 6 and Maven can be a bit
tricky as it requires endorsing the API jars which requires configuration of a bunch of plugins,
requires use of "forking", etc... First off, both Surefire and the Compiler plugins need to
be setup to point at an endorsed dir:</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;pluginManagement&gt;
     &lt;plugins&gt;



Mime
View raw message