Hi,

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)
        {
                this.one = one;
        }
}
-----------

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

<types>
 <schema targetNamespace="http://degenring.de";
xmlns="http://www.w3.org/2001/XMLSchema";>
 <complexType name="TestResult">
  <complexContent>
   <extension base="tns1:TestAbstractResult">
    <sequence>
      <element name="one" nillable="true" type="xsd:string" /> 
!!!!  <element name="someInfo" nillable="true" type="xsd:string" />
!!!!
    </sequence>
   </extension>
  </complexContent>
 </complexType>
 <complexType name="TestAbstractResult">
  <sequence>
   <element name="someInfo" nillable="true" type="xsd:string" /> 
  </sequence>
 </complexType>
 <element name="TestResult" nillable="true" type="tns1:TestResult" /> 
 </schema>
</types>

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?

Arne

Reply via email to