axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lee Coomber <>
Subject Re: WSDL2Java possible issue when generating beans from 'union' description
Date Thu, 19 Aug 2004 14:00:37 GMT
Hi David,

This has been recently fixed:-

Using the latest CVS version should solve your problem.


David Urena wrote:

>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"/>
>  </xsd:simpleType>
>The code generated associated to this 'ActivationFunction' the following code:
>    public ActivationFunction(XXX.ActivationFunctionStd value) {
>        setValue(value);
>    }
>    public ActivationFunction(XXX.EnumerationExtension value) {
>        setValue(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
>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() {
>        returnXXX.ActivationFunctionStd.fromString(value);
>    }
>Is this a known issue in the tool?
>Thanks for your answers and comments.
>David UreƱa
>Software Engineer


  [][][] Lee Coomber    | Tel: +44 (0)20 7729 7060
    [][] LShift Ltd     | Email:
  []  [] |

View raw message