For the benefit of those searching the archive:-

Ok after a bit of digging and checking the source it doesn`t seem possible to 
use the org.codehaus.xfire.spring.remoting.Jsr181HandlerMapping to 
automatically detect class hierarchies you have to explicitly specify them for 
your webservice.

Therefore you can use the following configuration to specify annotations for a 
webservice and have parent child relationships. MyServiceBean is the Spring 
bean service defined elsewhere. MyDerivedClass is a child class of the base 
class which is to be extended in the schema. 

<bean name="jsr181ServiceFactory"
              class="org.codehaus.xfire.annotations.AnnotationServiceFactory">
                <constructor-arg ref="xfire.transportManager"
                                 
type="org.codehaus.xfire.transport.TransportManager" index="0" />
                <constructor-arg ref="aegisTypeConfiguration" index="1"
                                 
type="org.codehaus.xfire.aegis.type.Configuration" />
        </bean>
        
    <bean id="xfireExporter" 
class="org.codehaus.xfire.spring.remoting.XFireExporter">
                   <property name="serviceFactory">
                    <ref bean="jsr181ServiceFactory"/>
                </property>
                  
                    <property name="serviceClass" 
value="com.service.MyServiceInterface "/>
                <property name="serviceBean" ref="MyServiceBean"/>

                <!-- the XFire bean is defined in the xfire.xml file -->
            <property name="xfire" ref="xfire"/>
                
                <!-- THIS IS WHERE THE CLASS WHICH IS EXTENDED IS DEFINED AS 
WELL AS ACTIVATING xsi type FOR extension IN wsdl -->
                <property name="properties">
                 <map>
                     <entry key="writeXsiType">
                         <value type="java.lang.Boolean">true</value>
                         </entry>
                     <entry key="overrideTypesList">
                         <list>
                                                
<value>com.derived.MyDerivedClass </value>
                         </list>
                     </entry>
                 </map>
                </property>
    </bean>
    
        <bean 
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
                <property name="urlMap">
                        <map>
                                <entry key="/"><ref 
bean="xfireExporter"/></entry>
                        </map>
                </property>
        </bean>  

This produces entries in the WSDL like 
<xsd:complexType name="MyDerivedClass">
−
        <xsd:complexContent>
−
        <xsd:extension base="ns1:MyBaseClass">
−
        <xsd:sequence>
<xsd:element name="someMyDerivedClassMethod" type="xsd:boolean"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>

Regards

Darran

-----Original Message-----
From: White, Darran [mailto:[EMAIL PROTECTED] 
Sent: 09 January 2008 12:09
To: user@xfire.codehaus.org
Subject: [xfire-user] Annotations using inheritence and Aegis Binding

Hi,

I`m using Aegis Annotations to define a webservice for XFire 1.2.6.
When I deploy the service and run it the WSDL is incorrect as it doesn`t
take into account class inheritance.

I also read http://xfire.codehaus.org/Aegis+Inheritance which defines
how to use pojo inheritance using the Aegis binding.

However the example uses the XFireExporter bean and note a service
defined using the annotations. Is it possible  to use this functionality
when defining a service using annotations??If so how as I couldn`t get
the example to work and no exceptions were being thrown.

Regards

Darran


--------------------------------------------------------------------------------
The information contained herein is confidential and is intended solely for the
addressee. Access by any other party is unauthorised without the express 
written permission of the sender. If you are not the intended recipient, please 
contact the sender either via the company switchboard on +44 (0)20 7623 8000, or
via e-mail return. If you have received this e-mail in error or wish to read our
e-mail disclaimer statement and monitoring policy, please refer to 
http://www.dresdnerkleinwort.com/disc/email/ or contact the sender. 
--------------------------------------------------------------------------------


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

    http://xircles.codehaus.org/manage_email


--------------------------------------------------------------------------------
The information contained herein is confidential and is intended solely for the
addressee. Access by any other party is unauthorised without the express 
written permission of the sender. If you are not the intended recipient, please 
contact the sender either via the company switchboard on +44 (0)20 7623 8000, or
via e-mail return. If you have received this e-mail in error or wish to read our
e-mail disclaimer statement and monitoring policy, please refer to 
http://www.dresdnerkleinwort.com/disc/email/ or contact the sender. 
--------------------------------------------------------------------------------

Reply via email to