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 2003/03/03 12:15:31 UTC

DO NOT REPLY [Bug 17586] New: - Unable to remove options from subclasses of WSDL2Java

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=17586>.
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=17586

Unable to remove options from subclasses of WSDL2Java

           Summary: Unable to remove options from subclasses of WSDL2Java
           Product: Axis
           Version: 1.1RC1
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: WSDL processing
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: antelder@apache.org


If you subclass WSDL2Java there is no way to remove command line options that
have been registered already.

The command line options are stored in org.apache.axis.wsdl.gen.WSDL2.java
instance variable 'options'. This is protected so its intended to be available
to subclasses, and WSDL2 has an addOptions method to add extra CLOptions to it.
WSDL2Java extends WSDL2, and WSDL2Java also has a variable named 'options' which
it adds to the WSDL2 'options', and its the WSDL2 'options' that actually gets
used by the tool.

With both WSDL2 and WSDL2Java both having variables named 'options' means
subclasses of WSDL2Java can not access the WSDL2 instance variable, and
therefore have no way of removing or altering and existing options.

I can see 2 ways of fixing this
- change the name of the 'options' variable in WSDL2 or WSDL2Java
- add a method to either WSDL2 or WSDL2Java allowing an existing option to be
removed

changing the variable name probably isn't acceptable as it could break any
existing subclasses that people have made. So here's a patch that adds a
removeOption method to WSDL2.

(or is there some clever way for a WSDL2Java subclass to access the WSDL2
instance variable? Something like super.super.options?)