axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Woinoski (JIRA)" <>
Subject [jira] Created: (AXIS-1651) When fault defines element named "message", WSDL2Java generates method getMessage1
Date Fri, 05 Nov 2004 14:29:32 GMT
When fault defines element named "message", WSDL2Java generates method getMessage1 

         Key: AXIS-1651
     Project: Axis
        Type: Bug
    Versions: 1.2RC1    
 Environment: Win2K Pro, Axis 1.2RC1
    Reporter: Michael Woinoski
    Priority: Minor

For a wrapped/literal operation, if a fault type defines an element named "message":

      <complexType name="TestException">
          <element name="message" nillable="true" type="xsd:string"/>

the exception generated by WSDL2Java defines a new field named message1 and a method named
getMessage1. This results in "unnatural" client code:

    catch (TestException ex) {   
I'm not sure if this is a bug or a wish list item, but the generated exception class could
use the superclass's message field instead of generating a new field. That would permit the
use of getMessage() as usual. If that's not possible because of the way the bean is deserialized,
the generated exception class could simply generate a getMessage override:

    public String getMessage() {
        return getMessage1();

The superclass message field will always be null anyway, so we're not losing anything with
this approach.            

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

View raw message