Hi all,
I have a problem generating java code from a wsdl in cxf 2.2.5. It seems
the command line tool and the maven plugin accept different options.
I am especially missing the -Xts option in maven. I also would like the
simple binding "xjc -extension simpleBinding.schemalet abc.xsd". Like
described in
http://weblogs.java.net/blog/kohsuke/archive/2006/03/simple_and_bett.html
Is that possible?
When I call the command line tool wsdl2java -xjc-X
"C:\java\apache-cxf-2.2.5\samples\wsdl_first\wsdl\CustomerService.wsdl"
I get the following list of arguments:
----------------
WSDLToJava Error:
avaliable plugin options:
-Xts : Activate plugin to add a toString() method to
generated classes
-Xts:style:multiline : Have toString produce multi line output
-Xts:style:simple : Have toString produce single line terse output
-Xbug671 : Activate plugin to map package names that
contain keywords
-Xbg : Generate getters methods for Booleans
-Xdv : Initialize fields mapped from elements with
their default values
-Xinject-code : inject specified Java code fragments into the
generated code
-Xlocator : enable source location support for generated code
-Xsync-methods : generate accessor methods with the
'synchronized' keyword
-mark-generated : mark the generated code as
@javax.annotation.Generated
-episode <FILE> : generate the episode file for separate compilation
----------------
When I do the same with the codgen plugin I get:
--------------
avaliable plugin options:
-Xinject-code : inject specified Java code fragments into the
generated code
-Xlocator : enable source location support for generated code
-Xsync-methods : generate accessor methods with the
'synchronized' keyword
-mark-generated : mark the generated code as
@javax.annotation.Generated
-episode <FILE> : generate the episode file for separate compilation
----------------
I would have thought that the same options are accepted. Is it possible
to somehow use the -Xts option from maven?
Below you find the plugin section in my maven pom
-----------------------
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/wsdl/CustomerService.wsdl</wsdl>
<extraargs>
<extraarg>-xjc-X</extraarg>
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
--
Christian Schneider
---
http://www.liquid-reality.de