Title: deserialisation problems with derived types

Hi all!
I have encountered the following problem: having used wsdl2java I have created stub-classes to deserialize a soap response. These stubs seem to be perfectly ok as they contain all necessary fields - however the deserialization does not work correctly, i.e. some attribute-fields donīt get filled (although there is no exception thrown). Those are the fields that are generated from the attributes of the complex type KTAbstractTopicType in the following excerpt, which is taken from the wsdl-file. Note that this type is abstract, meaning, that these fields are to be filled from derived types, such as 'eventType'. Could it be, that axis does not support this behaviour? Then the idea of extending types would be lost, so I guess, I am doing something wrong. Any suggestion will be greatly appreciated!

Jan

PS: The wsdl is mine, so I can alter it if necessary.

        <xsd:element name="topicMap">
                <xsd:complexType>
                        <xsd:sequence>
                                <xsd:element name="topic" type="KTAbstractTopicType" minOccurs="0" maxOccurs="unbounded"/>

                        </xsd:sequence>
                        <xsd:attribute name="lang" type="xsd:string"/>
                </xsd:complexType>
        </xsd:element>
        <xsd:complexType name="KTAbstractTopicType" abstract="true">
                <xsd:sequence>
                        <xsd:element name="topName" maxOccurs="unbounded">
                                <xsd:complexType>
                                        <xsd:sequence>
                                                <xsd:element name="base" type="KTtopicNameType"/>
                                                <xsd:element name="display" type="KTtopicNameType" minOccurs="0"/>
                                        </xsd:sequence>
                                        <xsd:attribute name="lang" type="xsd:string"/>
                                        <xsd:attribute name="icon" type="xsd:anyURI"/>
                                </xsd:complexType>
                        </xsd:element>
                </xsd:sequence>
                <xsd:attribute name="path" type="xsd:string"/>
                <xsd:attribute name="id" type="xsd:string" use="required"/>
                <xsd:attribute name="sumClfd" type="xsd:int" use="optional" default="0"/>
                <xsd:attribute name="sumAssoc" type="xsd:int" use="optional" default="0"/>
                <xsd:attribute name="expired" type="xsd:boolean" use="optional" default="false"/>
                <xsd:attribute name="handler" type="xsd:string" fixed="com.slb.taxi.tme.data.Topic"/>
        </xsd:complexType>
        <xsd:complexType name="eventType">
                <xsd:complexContent>
                        <xsd:extension base="KTAbstractTopicType"/>
                </xsd:complexContent>
        </xsd:complexType>

Reply via email to