You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bu...@apache.org on 2013/07/04 03:48:08 UTC

svn commit: r868328 - in /websites/production/cxf/content: cache/docs.pageCache docs/maven-cxf-codegen-plugin-wsdl-to-java.html

Author: buildbot
Date: Thu Jul  4 01:48:07 2013
New Revision: 868328

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 Thu Jul  4 01:48:07 2013
@@ -166,6 +166,7 @@ Apache CXF -- Maven cxf-codegen-plugin (
     <wsdlOptions>
 	<wsdlOption>
 		<wsdl>${basedir}/src/main/resources/wsdl/myService.wsdl</wsdl>
+                <!-- you can set the options of wsdl2java command by using the <extraargs> --> 
                 <extraargs>
                     <extraarg>-impl</extraarg>
                     <extraarg>-verbose</extraarg>
@@ -198,7 +199,27 @@ Apache CXF -- Maven cxf-codegen-plugin (
 
 <p>In this example we're specifying that we want CXF to use our JAX-WS binding file. Binding files are a way to customize the output of the artifacts that CXF generates. For instance, it allows you to change the package name CXF uses.</p>
 
-<h3><a shape="rect" name="Mavencxf-codegen-plugin%28WSDLtoJava%29-Example2%3ASpecifyingaservicetogenerateartifactsfor"></a>Example 2: Specifying a service to generate artifacts for</h3>
+<h3><a shape="rect" name="Mavencxf-codegen-plugin%28WSDLtoJava%29-Example2%3ASpecifythedatabinding"></a>Example 2: Specify the data binding </h3>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
+&lt;configuration&gt;
+  &lt;wsdlOptions&gt;
+    &lt;wsdlOption&gt;
+      &lt;wsdl&gt;${basedir}/src/main/resources/wsdl/myService.wsdl&lt;/wsdl&gt;
+      &lt;extraargs&gt;
+        &lt;extraarg&gt;-databinding&lt;/extraarg&gt;
+        &lt;extraarg&gt;jibx&lt;/extraarg&gt;
+      &lt;/extraargs&gt;
+    &lt;/wsdlOption&gt;
+  &lt;/wsdlOptions&gt;
+&lt;/configuration&gt;
+]]></script>
+</div></div>
+
+<p>In this example we're specifying that we want CXF to use our data binding jibx. You can also using the data binding of xmlbeans, domsources, sdo etc.</p>
+
+<h3><a shape="rect" name="Mavencxf-codegen-plugin%28WSDLtoJava%29-Example3%3ASpecifyingaservicetogenerateartifactsfor"></a>Example 3: Specifying a service to generate artifacts for</h3>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
@@ -216,7 +237,7 @@ Apache CXF -- Maven cxf-codegen-plugin (
 
 <p>To avoid copy/paste in multiple &lt;wsdlOption&gt; you can also declare a &lt;defaultOption&gt; element.</p>
 
-<h3><a shape="rect" name="Mavencxf-codegen-plugin%28WSDLtoJava%29-Example3%3AUsingdefaultOptiontoavoidrepetition"></a>Example 3: Using defaultOption to avoid repetition</h3>
+<h3><a shape="rect" name="Mavencxf-codegen-plugin%28WSDLtoJava%29-Example4%3AUsingdefaultOptiontoavoidrepetition"></a>Example 4: Using defaultOption to avoid repetition</h3>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
@@ -245,7 +266,7 @@ Apache CXF -- Maven cxf-codegen-plugin (
 
 <p>At least, you can declare a common wsdlRoot folder where you store your WSDL files and use includes/excludes patterns to select the files to get used by the code generator</p>
 
-<h3><a shape="rect" name="Mavencxf-codegen-plugin%28WSDLtoJava%29-Example4%3AUsingwsdlRootwithincludes%2Fexcludespatterns"></a>Example 4: Using wsdlRoot with includes/excludes patterns</h3>
+<h3><a shape="rect" name="Mavencxf-codegen-plugin%28WSDLtoJava%29-Example5%3AUsingwsdlRootwithincludes%2Fexcludespatterns"></a>Example 5: Using wsdlRoot with includes/excludes patterns</h3>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
@@ -266,7 +287,7 @@ Apache CXF -- Maven cxf-codegen-plugin (
 
 <p>wsdlRoot default value is <tt>src/main/resources/wsdl</tt> so you may omit this declaration.</p>
 
-<h3><a shape="rect" name="Mavencxf-codegen-plugin%28WSDLtoJava%29-Example5%3ALoadingawsdlfromthemavenrepository"></a>Example 5: Loading a wsdl from the maven repository</h3>
+<h3><a shape="rect" name="Mavencxf-codegen-plugin%28WSDLtoJava%29-Example6%3ALoadingawsdlfromthemavenrepository"></a>Example 6: Loading a wsdl from the maven repository</h3>
 
 <p>For CXF 2.3 and latter there is a new config element &lt;wsdlArtifact&gt; which can be used to load a wsdl file from the maven repository.</p>
 
@@ -288,7 +309,7 @@ Apache CXF -- Maven cxf-codegen-plugin (
 
 <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><a shape="rect" name="Mavencxf-codegen-plugin%28WSDLtoJava%29-Example6%3AUsingxjcextensions"></a>Example 6: Using xjc extensions</h3>
+<h3><a shape="rect" name="Mavencxf-codegen-plugin%28WSDLtoJava%29-Example7%3AUsingxjcextensions"></a>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>
 
@@ -337,7 +358,7 @@ Apache CXF -- Maven cxf-codegen-plugin (
 </div></div>
 
 
-<h3><a shape="rect" name="Mavencxf-codegen-plugin%28WSDLtoJava%29-Example7UsingJAXB%2FJAXWS2.2withJava6"></a>Example 7 - Using JAXB/JAX-WS 2.2 with Java 6</h3>
+<h3><a shape="rect" name="Mavencxf-codegen-plugin%28WSDLtoJava%29-Example8UsingJAXB%2FJAXWS2.2withJava6"></a>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>