Jim Ma created CXF-8944:
---------------------------

             Summary: wsdl2java frontend jaxws21 doesn't work
                 Key: CXF-8944
                 URL: https://issues.apache.org/jira/browse/CXF-8944
             Project: CXF
          Issue Type: Bug
          Components: Tooling
    Affects Versions: 4.0.3
            Reporter: Jim Ma
            Assignee: Jim Ma
             Fix For: 4.0.4


When pass the -fe jaxws21 to wsdl2java , wsdl2java tool deons't work and there 
is error from jaxb xjc :
{code:java}
>> apache-cxf-4.0.4-SNAPSHOT/bin/wsdl2java -verbose  -frontend jaxws21 
>> TestService.wsdl


Loading FrontEnd jaxws21 ...
Loading DataBinding jaxb ...
wsdl2java -verbose -frontend jaxws21 TestService.wsdl
wsdl2java - Apache CXF 4.0.4-SNAPSHOT-c429d51aa11b667a0a55d78e6f894eba246569db


Oct 10, 2023 7:38:21 PM org.apache.cxf.wsdl11.WSDLServiceBuilder checkForWrapped
INFO: Operation {http://www.openuri.org/2004/04/HelloWorld}echo cannot be 
unwrapped, input message must reference global element declaration with same 
localname as operation


WSDLToJava Error: XJC reported 'BadCommandLineException' for -xjc 
argument:-extension -target 2.1


Available 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 
@jakarta.annotation.Generated
                      -noDate            : do not add date
                      -Xann <annotation> : generate <annotation> instead of 
@jakarta.annotation.Generated
  -episode <FILE>     :  generate the episode file for separate compilation
  -Xpropertyaccessors :  Use XmlAccessType PROPERTY instead of FIELD for 
generated classes
  -Xdv                 : Initialize fields mapped from elements with their 
default values
  -Xdv:optional        : Initialize fields mapped from elements with their 
default values
                         for elements with minOccurs=0 but with complexTypes 
containing
                         fields with default values.
  -Xts                 : Activate plugin to add a toString() method to 
generated classes
         equivalent to: 
-Xts:style:org.apache.cxf.xjc.runtime.JAXBToStringStyle.DEFAULT_STYLE
  -Xts:style:multiline : Have toString produce multi line output
         equivalent to: 
-Xts:style:org.apache.cxf.xjc.runtime.JAXBToStringStyle.MULTI_LINE_STYLE
  -Xts:style:simple    : Have toString produce single line terse output
         equivalent to: 
-Xts:style:org.apache.cxf.xjc.runtime.JAXBToStringStyle.SIMPLE_STYLE
  -Xts:style:org.apache.commons.lang3.builder.ToStringStyle.FIELD : The full 
class+field
         name of the ToStringStyle to use.
  -Xbug671             : Activate plugin to map package names that contain 
keywords
  -Xbg                 : Generate getters methods for Booleans
  -Xbgi                 : Generate getXXX and isXXX methods for Booleans
  -Xjavadoc            :  Generates Javadocs based on xsd:documentation.




org.apache.cxf.tools.common.ToolException: XJC reported 
'BadCommandLineException' for -xjc argument:-extension -target 2.1


Available 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 
@jakarta.annotation.Generated
                      -noDate            : do not add date
                      -Xann <annotation> : generate <annotation> instead of 
@jakarta.annotation.Generated
  -episode <FILE>     :  generate the episode file for separate compilation
  -Xpropertyaccessors :  Use XmlAccessType PROPERTY instead of FIELD for 
generated classes
  -Xdv                 : Initialize fields mapped from elements with their 
default values
  -Xdv:optional        : Initialize fields mapped from elements with their 
default values
                         for elements with minOccurs=0 but with complexTypes 
containing
                         fields with default values.
  -Xts                 : Activate plugin to add a toString() method to 
generated classes
         equivalent to: 
-Xts:style:org.apache.cxf.xjc.runtime.JAXBToStringStyle.DEFAULT_STYLE
  -Xts:style:multiline : Have toString produce multi line output
         equivalent to: 
-Xts:style:org.apache.cxf.xjc.runtime.JAXBToStringStyle.MULTI_LINE_STYLE
  -Xts:style:simple    : Have toString produce single line terse output
         equivalent to: 
-Xts:style:org.apache.cxf.xjc.runtime.JAXBToStringStyle.SIMPLE_STYLE
  -Xts:style:org.apache.commons.lang3.builder.ToStringStyle.FIELD : The full 
class+field
         name of the ToStringStyle to use.
  -Xbug671             : Activate plugin to map package names that contain 
keywords
  -Xbg                 : Generate getters methods for Booleans
  -Xbgi                 : Generate getXXX and isXXX methods for Booleans
  -Xjavadoc            :  Generates Javadocs based on xsd:documentation.


        at 
org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:426)
        at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:711)
        at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:259)
        at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:156)
        at 
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:402)
        at 
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:105)
        at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
        at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
        at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
Caused by: com.sun.tools.xjc.BadCommandLineException: "2.1" is not a valid 
target version. "3.0" is supported.
        at com.sun.tools.xjc.Options.parseArgument(Options.java:617)
        at com.sun.tools.xjc.Options.parseArguments(Options.java:853)
        at 
org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:410)
        ... 8 more {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to