axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Urena" <>
Subject WSDL2Java possible issue when generating beans from 'union' description
Date Thu, 19 Aug 2004 13:39:54 GMT

I'm new in the Web Services, so I hope my question is not a well known topic.

I have a structured wsdl file referencing an xsd definition. The WSDL2Java tool, used with
no parameter, generates the beans and the services skeletons java classes. What is great of
course. But this generation is not good. It generates non valid code. The first kind of problem
is around 'union' complex type as below:

-- in the XSD file
  <xsd:simpleType name="ActivationFunction">
    <xsd:union memberTypes="ActivationFunctionStd EnumerationExtension"/>

The code generated associated to this 'ActivationFunction' the following code:
    public ActivationFunction(XXX.ActivationFunctionStd value) {
    public ActivationFunction(XXX.EnumerationExtension value) {

But the method setValue() doesn't exist. The tool generated two other set method
    public void setActivationFunctionStdValue(XXX.ActivationFunctionStd value) { ... }
    public void setEnumerationExtensionValue(XXX.EnumerationExtension value) { ... }

This forces me to modify a lot of classes generated by the WSDL2Java by renaming the set methods
with the name setValue or by renaming the setValue invocations by a valid function name.

Does this represent a bug in the WSDL2Java tool or 'union' are not supported.

The second problem is that the generated bean classes have get methods malformed. The 'return'
key is catenated with the name of the package:
    public XXX.ActivationFunctionStd getActivationFunctionStdValue() {
Is this a known issue in the tool?

Thanks for your answers and comments.

David UreƱa
Software Engineer

View raw message