wsdl2java tool always generates types, even, for example, when client stubs are
required only (-client argument)
----------------------------------------------------------------------------------------------------------------
Key: CXF-2428
URL: https://issues.apache.org/jira/browse/CXF-2428
Project: CXF
Issue Type: Bug
Components: Tooling
Affects Versions: 2.2.3, 2.1.6
Environment: the issue is not environment related
Reporter: Michael Klimiuk
SCENARIO:
The following ant task is executed to generate client artifacts:
<java classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="true">
<arg value="-client" />
<arg value="-db" />
<arg value="xmlbeans" />
<arg value="-d" />
<arg value="${gen.dir}" />
<arg value="${wsdl.file}" />
<classpath>
<path refid="ws.classpath" />
</classpath>
</java>
ACTUAL RESULT:
Generated artifacts include data types (XmlObjects generated by XmlBeans during
the WSDLToJava process).
EXPECTED RESULT:
Generated artifacts must not include data types. Furthermore, there must be an
additional argument to specify whether to generate types or not.
ANALYSIS:
Start point is the following class:
org.apache.cxf.tools.wsdlto.WSDLToJavaContainer
WSDLToJavaContainer.generateTypes() method uses the
WSDLToJavaContainer.passthrough() method which decides whether to generate
types or not.
Please have a look at this method. It's logic is correct, but ToolConstants
used there have no common with command line arguments. In this issue the most
important are CFG_GEN_TYPES and CFG_GEN_CLIENT - I cannot specify these from
the command line.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.