I'm running into an issue where duplicate properties are being generated in
the WSDL for a subtype.  For example, I have a class called Employee which
contains a name and id, and a subclass called Manager which adds a role
property.  Hence they look like this:

*********************************
public class Employee {
   protected String name;
   protected Long id;

   // accessors
}

public class Manager extends Employee {
   protected String role;
  
   // accessors
}
********************************


Now, I have a service that returns a List of Managers back, e.g.:

public List<Manager> getManagers(String query);

This service is exposed as a WS using jsr181 annotations.  I'm also using
servicemix (which uses xfire 1.2.2 internally) .  When I deploy this on the
server, the generated WSDL looks like this:

******************************************
<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified"
targetNamespace="http://people.test.com";>
        <xsd:complexType name="ArrayOfManager">
        <xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="Manager"
nillable="true" type="ns3:Manager"/>
</xsd:sequence>
</xsd:complexType>
        <xsd:complexType name="Manager">
        <xsd:sequence>
<xsd:element minOccurs="0" name="name" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="id" nillable="true" type="xsd:long"/>
<xsd:element minOccurs="0" name="role" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="id" nillable="true" type="xsd:long"/>
<xsd:element minOccurs="0" name="name" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>

...

<xsd:complexType name="Employee">

        <xsd:sequence>
<xsd:element minOccurs="0" name="name" nillable="true" type="xsd:string"/>
<xsd:element minOccurs="0" name="id" nillable="true" type="xsd:long"/>
</xsd:sequence>
</xsd:complexType>
******************************************

Notice that for Manager's complex type there are duplicates for name and
id-- all of the superclass's properties have been duplicated.  However, the
Employee complex type (used in another jsr181 service) generated in the WSDL
is correct.

Any hints on the duplicates in the WSDL?  Thanks in advance.

-los

-- 
View this message in context: 
http://www.nabble.com/Xfire-generates-duplicate-properties-in-WSDL-for-subclasses-tf2940007.html#a8220052
Sent from the XFire - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to