axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arne M. Degenring" <>
Subject Bug in Bean Mapping when using inheritance
Date Mon, 20 May 2002 15:02:32 GMT

I think I found a bug in the Bean Mapping when inheritance is used. The
Java bean TestResult is descendant of TestAbstractResult:

public class TestAbstractResult
	private String someInfo;
	public String getSomeInfo()
		return someInfo;

	public void setSomeInfo(String someInfo)
		this.someInfo = someInfo;

public class TestResult extends TestAbstractResult
    private String one;
	public String getOne()
		return one;

	public void setOne(String one)
	{ = one;

This is mapped to the following WSDL types (when accessed through HTTP
GET ?wsdl):

 <schema targetNamespace=""
 <complexType name="TestResult">
   <extension base="tns1:TestAbstractResult">
      <element name="one" nillable="true" type="xsd:string" /> 
!!!!  <element name="someInfo" nillable="true" type="xsd:string" />
 <complexType name="TestAbstractResult">
   <element name="someInfo" nillable="true" type="xsd:string" /> 
 <element name="TestResult" nillable="true" type="tns1:TestResult" /> 

The "someInfo" element is in the complexType "TestAbstractResult" *and*
in the complexType "TestResult", which inherits from TestAbstractResult.
So the "someInfo" element is twice in "TestResult": Once inherited from
TestAbstractResult, and one defined in TestResult. I think the line
marked with "!!!!" is too much. Do you agree?


View raw message