You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2002/09/03 09:38:17 UTC

DO NOT REPLY [Bug 12246] New: - Wsdl2Java generates buggy subclass constructor

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12246>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12246

Wsdl2Java generates buggy subclass constructor

           Summary: Wsdl2Java generates buggy subclass constructor
           Product: Axis
           Version: current (nightly)
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: WSDL processing
        AssignedTo: axis-dev@xml.apache.org
        ReportedBy: tgerber@informatica.com


I have an exception InfApiIllegalArgumentException which extends the abstract 
InfApiException, which extends java.lang.Exception. Both exceptions have public 
default and string argument constructors. The subclass exception is thrown by 
the methods in my service. 
Bug is: Wsdl2Java does not generate correct Java code for the client side 
InfApiIllegalArgumentException class.

WSDL looks like this:
   <complexType name="InfApiIllegalArgumentException">
    <complexContent>
     <extension base="tns1:InfApiException">
      <sequence>
       <element name="localizedMessage" nillable="true" type="xsd:string"/>
       <element name="message" nillable="true" type="xsd:string"/>
      </sequence>
     </extension>
    </complexContent>
   </complexType>
   <complexType abstract="true" name="InfApiException">
    <sequence/>
   </complexType>
   <element name="InfApiIllegalArgumentException" nillable="true" 
type="tns1:InfApiIllegalArgumentException"/>

Generated constructor in InfApiIllegalArgumentException.java:

    public InfApiIllegalArgumentException(
           java.lang.String localizedMessage,
           java.lang.String message) {
        super(
        this.localizedMessage = localizedMessage;
        this.message = message;
    }